Meta_Cassandra - Version 1.0.0

Version Notes

This is first stable release

Download this release

Release Info

Developer Vladyslav
Extension Meta_Cassandra
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (17) hide show
  1. app/code/community/Meta/Cassandra/Model/Adapter/Cassandra.php +458 -0
  2. app/code/community/Meta/Cassandra/Model/Adapter/Libs/Cassandra.php +3766 -0
  3. app/code/community/Meta/Cassandra/Model/Adapter/Libs/CassandraModel.php +579 -0
  4. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/Thrift.php +787 -0
  5. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/autoload.php +51 -0
  6. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.deps +0 -0
  7. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/php_thrift_protocol.o +0 -0
  8. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.la +1 -0
  9. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.lai +35 -0
  10. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.so +0 -0
  11. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile +172 -0
  12. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.fragments +0 -0
  13. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.global +119 -0
  14. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.objects +8 -0
  15. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/acinclude.m4 +2885 -0
  16. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/aclocal.m4 +9251 -0
  17. app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/autom4te.cache/output.0 +14803 -0
app/code/community/Meta/Cassandra/Model/Adapter/Cassandra.php ADDED
@@ -0,0 +1,458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cassandra Resource
4
+ *
5
+ * @author Vlad Miller <vmiller@meta-labs.org>
6
+ * @version 1.0.0
7
+ * @category Meta_Cassandra_Model_Adapter
8
+ * @package Meta_Cassandra_Model_Adapter_Cassandra
9
+ */
10
+
11
+ require_once 'Libs/Cassandra.php';
12
+
13
+ class Meta_Cassandra_Model_Adapter_Cassandra extends Cassandra implements Varien_Db_Adapter_Interface
14
+ {
15
+ /**
16
+ * Servers cluster
17
+ *
18
+ * @var <array> $_servers = array()
19
+ */
20
+ private $_servers = array();
21
+
22
+ /**
23
+ * Instance name
24
+ *
25
+ * @var <string> $_name = null
26
+ */
27
+ private $_name = null;
28
+
29
+ /**
30
+ * Keyspace
31
+ *
32
+ * @var <string> $_keyspace = null
33
+ */
34
+ private $_keyspace = null;
35
+
36
+ public function __construct($config)
37
+ {
38
+ $this->_servers = $config['servers'];
39
+ $this->_name = isset($config['name']) ? $config['name'] : 'main';
40
+
41
+ if (!isset($config['keyspace'])) {
42
+ throw new Exception("Please provide keyspace");
43
+ }
44
+
45
+ $this->_keyspace = $config['keyspace'];
46
+
47
+ self::$instances[$this->_name] = $this;
48
+ parent::__construct($this->_servers);
49
+
50
+ $this->useKeyspace($this->_keyspace);
51
+ }
52
+
53
+ public static function createInstance($servers = null)
54
+ {
55
+ if ($servers === null) {
56
+ $servers = $this->_servers;
57
+ }
58
+
59
+ return parent::createInstance($servers);
60
+ }
61
+
62
+ public function beginTransaction()
63
+ {
64
+ return false;
65
+ }
66
+
67
+ public function commit()
68
+ {
69
+ return false;
70
+ }
71
+
72
+ public function rollBack()
73
+ {
74
+ return false;
75
+ }
76
+
77
+ public function newTable($tableName = null, $schemaName = null)
78
+ {
79
+ return false;
80
+ }
81
+
82
+ public function createTable(Varien_Db_Ddl_Table $table)
83
+ {
84
+ return false;
85
+ }
86
+
87
+ public function dropTable($tableName, $schemaName = null)
88
+ {
89
+ $keySpace = $tableName;
90
+
91
+ if ($schemaName !== null) {
92
+ $keySpace = $schemaName . '_' . $tableName;
93
+ }
94
+
95
+ if ($keySpace === null) {
96
+ return false;
97
+ }
98
+
99
+ $this->dropKeyspace($keySpace);
100
+ return true;
101
+ }
102
+
103
+ public function truncateTable($tableName, $schemaName = null)
104
+ {
105
+ $keySpace = $tableName;
106
+
107
+ if ($schemaName !== null) {
108
+ $keySpace = $schemaName . '_' . $tableName;
109
+ }
110
+
111
+ if ($keySpace === null) {
112
+ return false;
113
+ }
114
+
115
+ $this->truncate($keySpace);
116
+ return true;
117
+ }
118
+
119
+ public function isTableExists($tableName, $schemaName = null)
120
+ {
121
+ throw new Exception('Functionality does not implemented yet');
122
+ }
123
+
124
+ public function showTableStatus($tableName, $schemaName = null)
125
+ {
126
+ throw new Exception('Functionality does not implemented yet');
127
+ }
128
+
129
+ public function describeTable($tableName, $schemaName = null)
130
+ {
131
+ $keySpace = $tableName;
132
+
133
+ if ($schemaName !== null) {
134
+ $keySpace = $schemaName . '_' . $tableName;
135
+ }
136
+
137
+ if ($keySpace === null) {
138
+ return false;
139
+ }
140
+
141
+ return $this->getKeyspaceSchema($keySpace);
142
+ }
143
+
144
+ public function createTableByDdl($tableName, $newTableName)
145
+ {
146
+ return false;
147
+ }
148
+
149
+ public function modifyColumnByDdl($tableName, $columnName, $definition, $flushData = false, $schemaName = null)
150
+ {
151
+ return false;
152
+ }
153
+
154
+ public function renameTable($oldTableName, $newTableName, $schemaName = null)
155
+ {
156
+ return false;
157
+ }
158
+
159
+ public function addColumn($tableName, $columnName, $definition, $schemaName = null)
160
+ {
161
+ return false;
162
+ }
163
+
164
+ public function changeColumn($tableName, $oldColumnName, $newColumnName, $definition, $flushData = false, $schemaName = null)
165
+ {
166
+ ;
167
+ }
168
+
169
+ public function modifyColumn($tableName, $columnName, $definition, $flushData = false, $schemaName = null)
170
+ {
171
+ ;
172
+ }
173
+
174
+ public function dropColumn($tableName, $columnName, $schemaName = null)
175
+ {
176
+ ;
177
+ }
178
+
179
+ public function tableColumnExists($tableName, $columnName, $schemaName = null)
180
+ {
181
+ ;
182
+ }
183
+
184
+ public function addIndex($tableName, $indexName, $fields, $indexType = null, $schemaName = null)
185
+ {
186
+ ;
187
+ }
188
+
189
+ public function dropIndex($tableName, $keyName, $schemaName = null)
190
+ {
191
+ ;
192
+ }
193
+
194
+ public function getIndexList($tableName, $schemaName = null)
195
+ {
196
+ ;
197
+ }
198
+
199
+ public function addForeignKey($fkName, $tableName, $columnName, $refTableName, $refColumnName, $onDelete = '', $onUpdate = '', $purge = false, $schemaName = null, $refSchemaName = null)
200
+ {
201
+ ;
202
+ }
203
+
204
+ public function dropForeignKey($tableName, $fkName, $schemaName = null)
205
+ {
206
+ ;
207
+ }
208
+
209
+ public function getForeignKeys($tableName, $schemaName = null)
210
+ {
211
+ ;
212
+ }
213
+
214
+ public function select()
215
+ {
216
+
217
+ }
218
+
219
+ public function insertOnDuplicate($table, array $data, array $fields = array())
220
+ {
221
+ ;
222
+ }
223
+
224
+ public function insertMultiple($table, array $data)
225
+ {
226
+ ;
227
+ }
228
+
229
+ public function insertArray($table, array $columns, array $data)
230
+ {
231
+ ;
232
+ }
233
+
234
+ public function insert($table, array $bind)
235
+ {
236
+ if (isset($bind['key'])) {
237
+ throw new Exception('Parameters should provide key value');
238
+ }
239
+
240
+ $key = $bind['key'];
241
+ unset($bind['key']);
242
+ $this->cf($table)->set($bind['key'], $bind);
243
+ }
244
+
245
+ public function insertForce($table, array $bind)
246
+ {
247
+ ;
248
+ }
249
+
250
+ public function update($table, array $bind, $where = '')
251
+ {
252
+ ;
253
+ }
254
+
255
+ public function allowDdlCache() {
256
+
257
+ }
258
+
259
+ public function decodeVarbinary($value) {
260
+
261
+ }
262
+
263
+ public function delete($table, $where = '') {
264
+
265
+ }
266
+
267
+ public function deleteFromSelect(Varien_Db_Select $select, $table) {
268
+
269
+ }
270
+
271
+ public function disableTableKeys($tableName, $schemaName = null) {
272
+
273
+ }
274
+
275
+ public function disallowDdlCache() {
276
+
277
+ }
278
+
279
+ public function enableTableKeys($tableName, $schemaName = null) {
280
+
281
+ }
282
+
283
+ public function endSetup() {
284
+
285
+ }
286
+
287
+ public function fetchAll($sql, $bind = array(), $fetchMode = null) {
288
+
289
+ }
290
+
291
+ public function fetchAssoc($sql, $bind = array()) {
292
+
293
+ }
294
+
295
+ public function fetchCol($sql, $bind = array()) {
296
+
297
+ }
298
+
299
+ public function fetchOne($sql, $bind = array()) {
300
+
301
+ }
302
+
303
+ public function fetchPairs($sql, $bind = array()) {
304
+
305
+ }
306
+
307
+ public function fetchRow($sql, $bind = array(), $fetchMode = null) {
308
+
309
+ }
310
+
311
+ public function forUpdate($sql) {
312
+
313
+ }
314
+
315
+ public function formatDate($date, $includeTime = true) {
316
+
317
+ }
318
+
319
+ public function getCheckSql($condition, $true, $false) {
320
+
321
+ }
322
+
323
+ public function getConcatSql(array $data, $separator = null) {
324
+
325
+ }
326
+
327
+ public function getDateAddSql($date, $interval, $unit) {
328
+
329
+ }
330
+
331
+ public function getDateExtractSql($date, $unit) {
332
+
333
+ }
334
+
335
+ public function getDateFormatSql($date, $format) {
336
+
337
+ }
338
+
339
+ public function getDatePartSql($date) {
340
+
341
+ }
342
+
343
+ public function getDateSubSql($date, $interval, $unit) {
344
+
345
+ }
346
+
347
+ public function getForeignKeyName($priTableName, $priColumnName, $refTableName, $refColumnName) {
348
+
349
+ }
350
+
351
+ public function getGreatestSql(array $data) {
352
+
353
+ }
354
+
355
+ public function getIfNullSql($expression, $value = 0) {
356
+
357
+ }
358
+
359
+ public function getIndexName($tableName, $fields, $indexType = '') {
360
+
361
+ }
362
+
363
+ public function getLeastSql(array $data) {
364
+
365
+ }
366
+
367
+ public function getLengthSql($string) {
368
+
369
+ }
370
+
371
+ public function getPrimaryKeyName($tableName, $schemaName = null) {
372
+
373
+ }
374
+
375
+ public function getSuggestedZeroDate() {
376
+
377
+ }
378
+
379
+ public function getTableName($tableName) {
380
+
381
+ }
382
+
383
+ public function getTablesChecksum($tableNames, $schemaName = null) {
384
+
385
+ }
386
+
387
+ public function insertFromSelect(Varien_Db_Select $select, $table, array $fields = array(), $mode = false) {
388
+
389
+ }
390
+
391
+ public function loadDdlCache($tableCacheKey, $ddlType) {
392
+
393
+ }
394
+
395
+ public function multiQuery($sql) {
396
+
397
+ }
398
+
399
+ public function orderRand(Varien_Db_Select $select, $field = null) {
400
+
401
+ }
402
+
403
+ public function prepareColumnValue(array $column, $value) {
404
+
405
+ }
406
+
407
+ public function prepareSqlCondition($fieldName, $condition) {
408
+
409
+ }
410
+
411
+ public function query($sql, $bind = array()) {
412
+
413
+ }
414
+
415
+ public function quote($value, $type = null) {
416
+
417
+ }
418
+
419
+ public function quoteColumnAs($ident, $alias, $auto = false) {
420
+
421
+ }
422
+
423
+ public function quoteIdentifier($ident, $auto = false) {
424
+
425
+ }
426
+
427
+ public function quoteInto($text, $value, $type = null, $count = null) {
428
+
429
+ }
430
+
431
+ public function quoteTableAs($ident, $alias = null, $auto = false) {
432
+
433
+ }
434
+
435
+ public function resetDdlCache($tableName = null, $schemaName = null) {
436
+
437
+ }
438
+
439
+ public function saveDdlCache($tableCacheKey, $ddlType, $data) {
440
+
441
+ }
442
+
443
+ public function setCacheAdapter($adapter) {
444
+
445
+ }
446
+
447
+ public function startSetup() {
448
+
449
+ }
450
+
451
+ public function supportStraightJoin() {
452
+
453
+ }
454
+
455
+ public function updateFromSelect(Varien_Db_Select $select, $table) {
456
+
457
+ }
458
+ }
app/code/community/Meta/Cassandra/Model/Adapter/Libs/Cassandra.php ADDED
@@ -0,0 +1,3766 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cassandra-PHP-Client Library (CPCL).
4
+ *
5
+ * Cassandra PHP-based client library for managing and querying your Cassandra
6
+ * cluster. It's a high-level library performing all the rather complex
7
+ * low-level lifting and providing a simple to learn and use interface.
8
+ *
9
+ * Includes ideas and code snippets from PHPCassa project.
10
+ *
11
+ * Copyright (C) 2011 by Priit Kallas <kallaspriit@gmail.com>
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ * copies of the Software, and to permit persons to whom the Software is
18
+ * furnished to do so, subject to the following conditions:
19
+
20
+ * The above copyright notice and this permission notice shall be included in
21
+ * all copies or substantial portions of the Software.
22
+
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+ * THE SOFTWARE.
30
+ *
31
+ * @author Priit Kallas <kallaspriit@gmail.com>
32
+ * @package Cassandra
33
+ * @version 1.0
34
+ */
35
+
36
+ // set the globals that the thrift library uses
37
+ $GLOBALS['THRIFT_ROOT'] = dirname(__FILE__) . '/thrift';
38
+ define('THRIFT_PATH', $GLOBALS['THRIFT_ROOT']);
39
+
40
+ // require thrift packages
41
+ require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php';
42
+ require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
43
+ require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
44
+
45
+ /**
46
+ * Represents a connection to a single Cassandra node.
47
+ *
48
+ * Provides direct access to the low-level Cassandra client.
49
+ */
50
+ class CassandraConnection {
51
+
52
+ /**
53
+ * Hostname or IP of the node.
54
+ *
55
+ * @var string
56
+ */
57
+ protected $host;
58
+
59
+ /**
60
+ * Port of the instance, defaults to 9160.
61
+ *
62
+ * @var integer
63
+ */
64
+ protected $port;
65
+
66
+ /**
67
+ * Should framed or buffered transport be used.
68
+ *
69
+ * @var boolean
70
+ */
71
+ protected $useFramedTransport;
72
+
73
+ /**
74
+ * Timeout of send operations in milliseconds.
75
+ *
76
+ * @var integer
77
+ */
78
+ protected $sendTimeoutMs;
79
+
80
+ /**
81
+ * Timeout of receive operations in milliseconds.
82
+ *
83
+ * @var integer
84
+ */
85
+ protected $receiveTimeoutMs;
86
+
87
+ /**
88
+ * Socket to the node.
89
+ *
90
+ * @var TSocket
91
+ */
92
+ protected $socket;
93
+
94
+ /**
95
+ * Transport method.
96
+ *
97
+ * @var TTransport
98
+ */
99
+ protected $transport;
100
+
101
+ /**
102
+ * Used communication protocol.
103
+ *
104
+ * @var TBinaryProtocolAccelerated
105
+ */
106
+ protected $protocol;
107
+
108
+ /**
109
+ * The low-level cassandra client.
110
+ *
111
+ * @var cassandra_CassandraClient
112
+ */
113
+ protected $client;
114
+
115
+ /**
116
+ * Is the connection currently open.
117
+ *
118
+ * @var boolean
119
+ */
120
+ protected $isOpen;
121
+
122
+ /**
123
+ * Constructs the connection, setting access parameters.
124
+ *
125
+ * @param string $host Hostname or IP of the node
126
+ * @param integer $port Port of the instance
127
+ * @param boolean $useFramedTransport Use framed or buffered transport
128
+ * @param integer $sendTimeoutMs Timeout of send operations in milliseconds
129
+ * @param integer $receiveTimeoutMs Timeout of receive operations
130
+ */
131
+ public function __construct(
132
+ $host = '127.0.0.1',
133
+ $port = 9160,
134
+ $useFramedTransport = true,
135
+ $sendTimeoutMs = null,
136
+ $receiveTimeoutMs = null
137
+ ) {
138
+ $this->host = $host;
139
+ $this->port = $port;
140
+ $this->useFramedTransport = $useFramedTransport;
141
+ $this->sendTimeoutMs = $sendTimeoutMs;
142
+ $this->receiveTimeoutMs = $receiveTimeoutMs;
143
+ $this->isOpen = false;
144
+
145
+ $this->socket = $this->createSocket(
146
+ $host,
147
+ $port,
148
+ $sendTimeoutMs,
149
+ $receiveTimeoutMs
150
+ );
151
+
152
+ if ($useFramedTransport) {
153
+ $this->transport = $this->createFramedTransport($this->socket);
154
+ } else {
155
+ $this->transport = $this->createBufferedTransport($this->socket);
156
+ }
157
+
158
+ $this->transport->open();
159
+ $this->isOpen = true;
160
+
161
+ $this->protocol = new TBinaryProtocolAccelerated($this->transport);
162
+ $this->client = new cassandra_CassandraClient($this->protocol);
163
+ }
164
+
165
+ /**
166
+ * Closes the connection on destruction.
167
+ */
168
+ public function __destruct() {
169
+ $this->close();
170
+ }
171
+
172
+ /**
173
+ * Forces the connection to close.
174
+ *
175
+ * Generally there's no need to call it yourself as it will be closed on
176
+ * termination.
177
+ */
178
+ public function close() {
179
+ if ($this->isOpen) {
180
+ $this->transport->flush();
181
+ $this->transport->close();
182
+
183
+ $this->isOpen = false;
184
+ }
185
+ }
186
+
187
+ /**
188
+ * Is the connection open.
189
+ *
190
+ * @return boolean
191
+ */
192
+ public function isOpen() {
193
+ return $this->isOpen;
194
+ }
195
+
196
+ /**
197
+ * Returns the low-level Cassandra client used by the wrapper.
198
+ *
199
+ * @return cassandra_CassandraClient
200
+ */
201
+ public function getClient() {
202
+ if (!$this->isOpen) {
203
+ throw new CassandraConnectionClosedException(
204
+ 'The connection has been closed'
205
+ );
206
+ }
207
+
208
+ return $this->client;
209
+ }
210
+
211
+ /**
212
+ * Returns the used transport method.
213
+ *
214
+ * @return TTransport
215
+ */
216
+ public function getTransport() {
217
+ return $this->transport;
218
+ }
219
+
220
+ /**
221
+ * Returns the used transportation protocol.
222
+ *
223
+ * @return TBinaryProtocolAccelerated
224
+ */
225
+ public function getProtocol() {
226
+ return $this->transport;
227
+ }
228
+
229
+ /**
230
+ * Attempts to start using given keyspace.
231
+ *
232
+ * Using the keyspace is attempted three times before giving up.
233
+ *
234
+ * @param string $keyspace Name of the keyspace
235
+ * @param string $username Optional username in case authentication is used
236
+ * @param string $password Optional password
237
+ */
238
+ public function useKeyspace(
239
+ $keyspace,
240
+ $username = null,
241
+ $password = null
242
+ ) {
243
+ $attempts = 3;
244
+ $success = false;
245
+
246
+ while($attempts-- > 0 && !$success) {
247
+ try {
248
+ $this->client->set_keyspace($keyspace);
249
+ $success = true;
250
+ } catch (cassandra_InvalidRequestException $e) {
251
+ continue;
252
+ }
253
+ }
254
+
255
+ if (!$success) {
256
+ throw new CassandraSettingKeyspaceFailedException(
257
+ 'Using keyspace "'.$keyspace.'" failed after several attempts'
258
+ );
259
+ }
260
+
261
+ if ($username !== null) {
262
+ $request = new cassandra_AuthenticationRequest(
263
+ array('credentials' => array($username, $password))
264
+ );
265
+
266
+ $this->client->login($request);
267
+ }
268
+ }
269
+
270
+ /**
271
+ * Creates the socket to use.
272
+ *
273
+ * @param string $host Hostname/IP
274
+ * @param integer $port Port number
275
+ * @param integer $sendTimeoutMs Send operations timeout
276
+ * @param integer $receiveTimeoutMs Receive operations timeout
277
+ * @return TSocket Initiated socket connection
278
+ */
279
+ protected function createSocket(
280
+ $host,
281
+ $port,
282
+ $sendTimeoutMs,
283
+ $receiveTimeoutMs
284
+ ) {
285
+ $socket = new TSocket($host, $port);
286
+
287
+ if ($sendTimeoutMs !== null) {
288
+ $socket->setSendTimeout($sendTimeoutMs);
289
+ }
290
+
291
+ if ($receiveTimeoutMs !== null) {
292
+ $socket->setRecvTimeout($receiveTimeoutMs);
293
+ }
294
+
295
+ return $socket;
296
+ }
297
+
298
+ /**
299
+ * Creates framed transport.
300
+ *
301
+ * @param TSocket $socket Socket to base the transport on
302
+ * @return TFramedTransport Instance of the transport
303
+ */
304
+ protected function createFramedTransport(TSocket $socket) {
305
+ require_once THRIFT_PATH.'/transport/TFramedTransport.php';
306
+
307
+ return new TFramedTransport($socket, true, true);
308
+ }
309
+
310
+ /**
311
+ * Creates buffered transport.
312
+ *
313
+ * @param TSocket $socket Socket to base the transport on
314
+ * @return TBufferedTransport Instance of the transport
315
+ */
316
+ protected function createBufferedTransport(TSocket $socket) {
317
+ require_once THRIFT_PATH.'/transport/TBufferedTransport.php';
318
+
319
+ return new TBufferedTransport($socket, 512, 512);
320
+ }
321
+ }
322
+
323
+ /**
324
+ * A cluster is a collection of servers and connections to them.
325
+ *
326
+ * Provides handling the pool of connections.
327
+ */
328
+ class CassandraCluster {
329
+
330
+ /**
331
+ * Currently used keyspace name.
332
+ *
333
+ * @var string
334
+ */
335
+ protected $keyspace;
336
+
337
+ /**
338
+ * Currently used username if using authentication.
339
+ *
340
+ * @var string
341
+ */
342
+ protected $username;
343
+
344
+ /**
345
+ * Currently used password if using authentication.
346
+ *
347
+ * @var string
348
+ */
349
+ protected $password;
350
+
351
+ /**
352
+ * Array of server connection information used to connect to them.
353
+ *
354
+ * @var array
355
+ */
356
+ protected $servers = array();
357
+
358
+ /**
359
+ * Array of open connections to servers.
360
+ *
361
+ * The connections are reused if already opened.
362
+ *
363
+ * @var array
364
+ */
365
+ protected $connections = array();
366
+
367
+ /**
368
+ * Sets the list of servers to use.
369
+ *
370
+ * You could add the servers one-by-one using
371
+ * {@see CassandraCluster::registerServer()}.
372
+ *
373
+ * @param array $servers Servers that can be connected to.
374
+ */
375
+ public function __construct(array $servers = array()) {
376
+ foreach ($servers as $server) {
377
+ $this->registerServer(
378
+ isset($server['host']) ? $server['host'] : '127.0.0.1',
379
+ isset($server['port']) ? $server['port'] : 9160,
380
+ isset($server['use-framed-transport']) ? $server['use-framed-transport'] : true,
381
+ isset($server['send-timeout-ms']) ? $server['send-timeout-ms'] : null,
382
+ isset($server['receive-timeout-ms']) ? $server['receive-timeout-ms'] : null
383
+ );
384
+ }
385
+ }
386
+
387
+ /**
388
+ * Closes all connections on destruction.
389
+ */
390
+ public function __destruct() {
391
+ $this->closeConnections();
392
+ }
393
+
394
+ /**
395
+ * Registers a new server in the cluster pool.
396
+ *
397
+ * This does not mean that it is connected to at once but it may be used in
398
+ * any of the requests.
399
+ *
400
+ * @param string $host Hostname or IP of the node
401
+ * @param integer $port Port of the instance
402
+ * @param boolean $useFramedTransport Use framed or buffered transport
403
+ * @param integer $sendTimeoutMs Timeout of send operations in milliseconds
404
+ * @param integer $receiveTimeoutMs Timeout of receive operations
405
+ * @return CassandraCluster Self for chaining calls
406
+ */
407
+ public function registerServer(
408
+ $host = '127.0.0.1',
409
+ $port = 9160,
410
+ $useFramedTransport = true,
411
+ $sendTimeoutMs = null,
412
+ $receiveTimeoutMs = null
413
+ ) {
414
+ $this->servers[] = array(
415
+ 'host' => $host,
416
+ 'port' => $port,
417
+ 'use-framed-transport' => $useFramedTransport,
418
+ 'send-timeout-ms' => $sendTimeoutMs,
419
+ 'receive-timeout-ms' => $receiveTimeoutMs
420
+ );
421
+
422
+ return $this;
423
+ }
424
+
425
+ /**
426
+ * Starts using given keyspace for all active and future connections.
427
+ *
428
+ * @param string $keyspace Keyspace to use
429
+ * @param string $username Optional username
430
+ * @param string $password Password
431
+ * @return CassandraCluster Self for chaining calls
432
+ */
433
+ public function useKeyspace($keyspace, $username = null, $password = null) {
434
+ $this->keyspace = $keyspace;
435
+ $this->username = $username;
436
+ $this->password = $password;
437
+
438
+ $this->getConnection();
439
+
440
+ foreach ($this->connections as $connection) {
441
+ $connection->useKeyspace(
442
+ $keyspace,
443
+ $username,
444
+ $password
445
+ );
446
+ }
447
+
448
+ return $this;
449
+ }
450
+
451
+ /**
452
+ * Returns the name of currently used keyspace.
453
+ *
454
+ * @return string
455
+ */
456
+ public function getCurrentKeyspace() {
457
+ return $this->keyspace;
458
+ }
459
+
460
+ /**
461
+ * Returns the list of servers connection info in the pool.
462
+ *
463
+ * @return array
464
+ */
465
+ public function getServers() {
466
+ return $this->servers;
467
+ }
468
+
469
+ /**
470
+ * Returns a connection to one of the servers.
471
+ *
472
+ * The connections are created from the server list at random and if a
473
+ * server is chosen that already has an active connection, it is reused.
474
+ *
475
+ * If a closed connection is found in the pool, it is removed and may be
476
+ * reconnected to later.
477
+ *
478
+ * It will try to connect to the servers the number of servers times two
479
+ * times before giving up.
480
+ *
481
+ * @return CassandraConnection Connection to one of the nodes
482
+ * @throws CassandraConnectionFailedException If all connections failed
483
+ */
484
+ public function getConnection() {
485
+ if (empty($this->servers)) {
486
+ throw new CassandraConnectionFailedException(
487
+ 'Unable to create connection, the cluster server pool is empty'
488
+ );
489
+ }
490
+
491
+ $serverCount = count($this->servers);
492
+ $attemptsLeft = $serverCount * 2;
493
+
494
+ while ($attemptsLeft-- > 0) {
495
+ $randomServerIndex = mt_rand(0, $serverCount - 1);
496
+
497
+ if (isset($this->connections[$randomServerIndex])) {
498
+ if (!$this->connections[$randomServerIndex]->isOpen()) {
499
+ unset($this->connections[$randomServerIndex]);
500
+
501
+ continue;
502
+ }
503
+
504
+ return $this->connections[$randomServerIndex];
505
+ } else {
506
+ $server = $this->servers[$randomServerIndex];
507
+
508
+ try {
509
+ $this->connections[$randomServerIndex] = new CassandraConnection(
510
+ $server['host'],
511
+ $server['port'],
512
+ $server['use-framed-transport'],
513
+ $server['send-timeout-ms'],
514
+ $server['receive-timeout-ms']
515
+ );
516
+
517
+ $this->connections[$randomServerIndex]->useKeyspace(
518
+ $this->keyspace,
519
+ $this->username,
520
+ $this->password
521
+ );
522
+
523
+ return $this->connections[$randomServerIndex];
524
+ } catch (TException $e) {
525
+ continue;
526
+ }
527
+ }
528
+ }
529
+
530
+ throw new CassandraConnectionFailedException(
531
+ 'Connecting to any of the '.$serverCount.' nodes failed'
532
+ );
533
+ }
534
+
535
+ /**
536
+ * Closes all open connections.
537
+ *
538
+ * @return CassandraCluster Self for chaining calls
539
+ */
540
+ public function closeConnections() {
541
+ foreach ($this->connections as $connection) {
542
+ $connection->close();
543
+ }
544
+
545
+ $this->connections = array();
546
+
547
+ return $this;
548
+ }
549
+ }
550
+
551
+ /**
552
+ * The main Cassandra client class providing means to manage keyspaces and
553
+ * column families, get info about schema, fetch and store data.
554
+ */
555
+ class Cassandra {
556
+
557
+ /**
558
+ * Array of named singleton instances.
559
+ *
560
+ * @var array
561
+ */
562
+ protected static $instances = array();
563
+
564
+ /**
565
+ * Array of Cassandra low-level method names that require a keyspace to
566
+ * be selected. Populated as needed.
567
+ *
568
+ * @var array
569
+ */
570
+ protected static $keyspaceRequiredMethods;
571
+
572
+ /**
573
+ * Key tokens in get() method requiring escaping.
574
+ *
575
+ * @var array
576
+ */
577
+ protected static $requestKeyTokens = array('.', ':', ',', '-', '|');
578
+
579
+ /**
580
+ * The Cassandra cluster to use.
581
+ *
582
+ * @var CassandraCluster
583
+ */
584
+ protected $cluster;
585
+
586
+ /**
587
+ * Maximum number of times to retry failed calls to Cassandra.
588
+ *
589
+ * Use {@see Cassandra::setMaxCallRetries()} to change.
590
+ *
591
+ * @var integer
592
+ */
593
+ protected $maxCallRetries = 5;
594
+
595
+ /**
596
+ * Default maximum number of columns to fetch on range queries.
597
+ *
598
+ * @var integer
599
+ */
600
+ protected $defaultColumnCount = 100;
601
+
602
+ /**
603
+ * Array of column families.
604
+ *
605
+ * If a single column family is requested more than once during a single
606
+ * request, the CassandraColumnFamily object is created only once.
607
+ *
608
+ * @var array
609
+ */
610
+ protected $columnFamilies = array();
611
+
612
+ /**
613
+ * Authentication details per keyspace.
614
+ *
615
+ * @var array
616
+ */
617
+ protected $keyspaceAuthentication = array();
618
+
619
+ /**
620
+ * Should key names and values be automatically packed to correct format
621
+ * based on column metadata.
622
+ *
623
+ * @var boolean
624
+ */
625
+ protected $autopack = true;
626
+
627
+ /**
628
+ * It is enough if a single node replies.
629
+ *
630
+ * This makes reads and writes fast, but it also means that depending on
631
+ * what else is reading and writing, it's possible that they could briefly
632
+ * give conflicting answers.
633
+ */
634
+ const CONSISTENCY_ONE = ConsistencyLevel::ONE;
635
+
636
+ /**
637
+ * Majority of the nodes holding the data must reply.
638
+ *
639
+ * If you have replication factor of 3 then it's enough if two of the
640
+ * nodes holding the data are up and reply. You need to have a replication
641
+ * factor of atleast three for this to work differently from all and should
642
+ * use odd number for replication factor.
643
+ */
644
+ const CONSISTENCY_QUORUM = ConsistencyLevel::QUORUM;
645
+
646
+ /**
647
+ * Only meaningful for writes and means as soon as a write is received by
648
+ * any node, the call returns success.
649
+ *
650
+ * This occurs when your client might be connecting to node 5 but the nodes
651
+ * responsible for it are 6-8. The difference between ONE and ANY
652
+ * is that with ANY, as soon as node 5 receives the write, it returns
653
+ * success (but nodes 6-8 could be down or whatever). CL::ONE means that if
654
+ * you write to node 5, either 6, 7, or 8 have to return success before
655
+ * node 5 returns success.
656
+ */
657
+ const CONSISTENCY_ANY = ConsistencyLevel::ANY;
658
+
659
+ /**
660
+ * Returns success only if all the nodes holding the data respond.
661
+ *
662
+ * This makes sure that all the nodes get the same data, but includes a
663
+ * performance penalty and also if a single node of the replication group
664
+ * is down, it's not possible to read or write the data as the requirement
665
+ * can not be fulfilled.
666
+ */
667
+ const CONSISTENCY_ALL = ConsistencyLevel::ALL;
668
+
669
+ /**
670
+ * Standard column type.
671
+ */
672
+ const COLUMN_STANDARD = 'Standard';
673
+
674
+ /**
675
+ * Super column type.
676
+ */
677
+ const COLUMN_SUPER = 'Super';
678
+
679
+ /**
680
+ * ASCII text type.
681
+ */
682
+ const TYPE_ASCII = 'AsciiType';
683
+
684
+ /**
685
+ * Simplest binary type
686
+ */
687
+ const TYPE_BYTES = 'BytesType';
688
+
689
+ /**
690
+ * Used for a non-time based comparison. It is compared lexically, by byte
691
+ * value.
692
+ *
693
+ * (UUID) are a standardized unique indentifier in the form of a 128 bit
694
+ * number. In it's canonical form UUIDs are represented by a 32 digit
695
+ * hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
696
+ */
697
+ const TYPE_LEXICAL_UUID = 'LexicalUUIDType';
698
+
699
+ /**
700
+ * Used for a time based comparison. It uses a version 1 UUID.
701
+ *
702
+ * (UUID) are a standardized unique indentifier in the form of a 128 bit
703
+ * number. In it's canonical form UUIDs are represented by a 32 digit
704
+ * hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
705
+ */
706
+ const TYPE_TIME_UUID = 'TimeUUIDType';
707
+
708
+ /**
709
+ * Long data type.
710
+ */
711
+ const TYPE_LONG = 'LongType';
712
+
713
+ /**
714
+ * Simple integer data type.
715
+ */
716
+ const TYPE_INTEGER = 'IntegerType';
717
+
718
+ /**
719
+ * UTF8 international text data type.
720
+ */
721
+ const TYPE_UTF8 = 'UTF8Type';
722
+
723
+ /**
724
+ * Equality comparator used in where queries.
725
+ */
726
+ const OP_EQ = IndexOperator::EQ;
727
+
728
+ /**
729
+ * Strict less-than comparator.
730
+ */
731
+ const OP_LT = IndexOperator::LT;
732
+
733
+ /**
734
+ * Strict greater-than comparator.
735
+ */
736
+ const OP_GT = IndexOperator::GT;
737
+
738
+ /**
739
+ * Less-than-equals comparator.
740
+ */
741
+ const OP_LTE = IndexOperator::LTE;
742
+
743
+ /**
744
+ * Greater-than-equals comparator.
745
+ */
746
+ const OP_GTE = IndexOperator::GTE;
747
+
748
+ /**
749
+ * Default simple placement strategy not taking network topology into
750
+ * account.
751
+ */
752
+ const PLACEMENT_SIMPLE = 'org.apache.cassandra.locator.SimpleStrategy';
753
+
754
+ /**
755
+ * Network topology aware placement strategy.
756
+ */
757
+ const PLACEMENT_NETWORK
758
+ = 'org.apache.cassandra.locator.NetworkTopologyStrategy';
759
+
760
+ /**
761
+ * Old network topology aware placement strategy.
762
+ */
763
+ const PLACEMENT_OLD_NETWORK
764
+ = 'org.apache.cassandra.locator.OldNetworkTopologyStrategy';
765
+
766
+ /**
767
+ * Keys index type, currently only one supported.
768
+ */
769
+ const INDEX_KEYS = 0;
770
+
771
+ /**
772
+ * Sets the list of servers to use and whether keys and values should be
773
+ * automatically packed to the correct format as defined by column families
774
+ * column metadata.
775
+ *
776
+ * @param array $servers Array of server connection details.
777
+ * @param type $autopack Should keys and data be autopacked.
778
+ */
779
+ protected function __construct(array $servers = array(), $autopack = true) {
780
+ $this->cluster = new CassandraCluster($servers);
781
+ $this->autopack = $autopack;
782
+ }
783
+
784
+ /**
785
+ * Prevent users cloning the instance.
786
+ */
787
+ public function __clone() {
788
+ trigger_error('Clone is not allowed.', E_USER_ERROR);
789
+ }
790
+
791
+ /**
792
+ * Creates a new named cassandra instance.
793
+ *
794
+ * The name can be used in {@see Cassandra::getInstance()} to fetch the
795
+ * named singleton anywhere in the project.
796
+ *
797
+ * @param array $servers List of seed servers to connect to
798
+ * @param type $name Name of the instance
799
+ * @return Cassandra New cassandra instance
800
+ */
801
+ public static function createInstance(array $servers, $name = 'main') {
802
+ self::$instances[$name] = new self($servers);
803
+
804
+ return self::$instances[$name];
805
+ }
806
+
807
+ /**
808
+ * Returns named singleton instance.
809
+ *
810
+ * Name defaults to "main" the same as createInstance() so when using a
811
+ * single connection pool, the name needs not to be set on neither.
812
+ *
813
+ * @param string $name Name of the instance to fetch
814
+ * @return Cassandra The instance
815
+ * @throws CassandraInvalidRequestException If no such instance exists
816
+ */
817
+ public static function getInstance($name = 'main') {
818
+ if (!isset(self::$instances[$name])) {
819
+ throw new CassandraInvalidRequestException(
820
+ 'Instance called "'.$name.'" does not exist'
821
+ );
822
+ }
823
+
824
+ return self::$instances[$name];
825
+ }
826
+
827
+ /**
828
+ * Registers a keyspace with authentication info.
829
+ *
830
+ * @param string $keyspace Keyspace name
831
+ * @param string $username The username
832
+ * @param string $password Password
833
+ */
834
+ protected function registerKeyspace(
835
+ $keyspace,
836
+ $username = null,
837
+ $password = null
838
+ ) {
839
+ $this->keyspaceAuthentication[$keyspace] = array(
840
+ 'username' => $username,
841
+ 'password' => $password
842
+ );
843
+ }
844
+
845
+ /**
846
+ * Start using a new keyspace.
847
+ *
848
+ * If the keyspace requires authentication, the username and password of it
849
+ * should be provided the first time this method is called. The username
850
+ * and password are stored so on next calls, they are used automatically if
851
+ * exist.
852
+ *
853
+ * @param string $keyspace Keyspace name
854
+ * @param string $username The username
855
+ * @param string $password Password
856
+ * @return Cassandra Self for call chaining
857
+ */
858
+ public function useKeyspace($keyspace, $username = null, $password = null) {
859
+ if (!empty($username)) {
860
+ $this->registerKeyspace($keyspace, $username, $password);
861
+ } else if (isset($this->keyspaceAuthentication[$keyspace])) {
862
+ $username = $this->keyspaceAuthentication[$keyspace]['username'];
863
+ $password = $this->keyspaceAuthentication[$keyspace]['password'];
864
+ }
865
+
866
+ $this->cluster->useKeyspace($keyspace, $username, $password);
867
+
868
+ return $this;
869
+ }
870
+
871
+ /**
872
+ * Returns the Cassandra cluster of servers.
873
+ *
874
+ * @return CassandraCluster
875
+ */
876
+ public function getCluster() {
877
+ return $this->cluster;
878
+ }
879
+
880
+ /**
881
+ * Returns random connection to a node.
882
+ *
883
+ * @return CassandraConnection
884
+ */
885
+ public function getConnection() {
886
+ return $this->cluster->getConnection();
887
+ }
888
+
889
+ /**
890
+ * Closes all open connections to nodes.
891
+ *
892
+ * Proxies the call to cluster.
893
+ */
894
+ public function closeConnections() {
895
+ $this->cluster->closeConnections();
896
+ }
897
+
898
+ /**
899
+ * Return the low-level thrift client.
900
+ *
901
+ * @return cassandra_CassandraClient
902
+ */
903
+ public function getClient() {
904
+ return $this->cluster->getConnection()->getClient();
905
+ }
906
+
907
+ /**
908
+ * Sets the maximum number of times a call to Cassandra will be retried
909
+ * should it fail for any reason.
910
+ *
911
+ * @param integer $retryCount Number of times to retry, defaults to 5.
912
+ * @return Cassandra Self for call chaining
913
+ */
914
+ public function setMaxCallRetries($retryCount) {
915
+ $this->maxCallRetries = $retryCount;
916
+
917
+ return $this;
918
+ }
919
+
920
+ /**
921
+ * Sets the default number of columns to fetch at maximum.
922
+ *
923
+ * @param integer $columnCountLimit The limit
924
+ */
925
+ public function setDefaultColumnCount($columnCountLimit) {
926
+ $this->defaultColumnCount = $columnCountLimit;
927
+ }
928
+
929
+ /**
930
+ * Makes a call to a Cassandra node.
931
+ *
932
+ * This method accepts a variable number of parameters where the first one
933
+ * is the Cassandra client method name and the rest the parameters to pass
934
+ * to it.
935
+ *
936
+ * If a call fails, it will be retried for {@see Cassandra::$maxCallRetries}
937
+ * times, backing off (waiting) a bit more each time to prevent flooding.
938
+ *
939
+ * @return mixed The returned value
940
+ * @throws CassandraInvalidRequestException If the request is invalid
941
+ * @throws CassandraMaxRetriesException If The call failed all retries
942
+ */
943
+ public function call(/*$methodName, $arg1, $arg2 */) {
944
+ $args = func_get_args();
945
+ $methodName = array_shift($args);
946
+
947
+ $tries = $this->maxCallRetries;
948
+ $lastException = null;
949
+
950
+ $keyspaceRequiredMethods = self::getKeyspaceRequiredMethods();
951
+
952
+ if (
953
+ in_array($methodName, $keyspaceRequiredMethods)
954
+ && $this->cluster->getCurrentKeyspace() === null
955
+ ) {
956
+ throw new CassandraInvalidRequestException(
957
+ 'Unable to call "'.$methodName.'", no keyspace has been set'
958
+ );
959
+ }
960
+
961
+ $try = 0;
962
+
963
+ while($tries-- > 0) {
964
+ $client = $this->getClient();
965
+ $try++;
966
+
967
+ try {
968
+ return call_user_func_array(array($client, $methodName), $args);
969
+ } catch (Exception $e) {
970
+ $lastException = $e;
971
+
972
+ usleep(0.1 * pow(2, $try) * 1000000);
973
+ }
974
+ }
975
+
976
+ throw new CassandraMaxRetriesException(
977
+ 'Failed calling "'.$methodName.'" the maximum of '.
978
+ $this->maxCallRetries.' times',
979
+ $lastException->getCode(),
980
+ $lastException
981
+ );
982
+ }
983
+
984
+ /**
985
+ * Returns ow-level keyspace description as returned by Cassandra.
986
+ *
987
+ * Returns the result of "describe_keyspace" call without any processing and
988
+ * does not use cache. Generally you want to use the more friendly version
989
+ * {@see Cassandra::getKeyspaceSchema()}.
990
+ *
991
+ * If no keyspace name is defined, the currently active keyspace is used.
992
+ *
993
+ * @param string $keyspace Optional keyspace name.
994
+ * @return array Keyspace description as given by Cassandra
995
+ */
996
+ public function describeKeyspace($keyspace = null) {
997
+ if ($keyspace === null) {
998
+ $keyspace = $this->cluster->getCurrentKeyspace();
999
+ }
1000
+
1001
+ return $this->call('describe_keyspace', $keyspace);
1002
+ }
1003
+
1004
+ /**
1005
+ * Returns processed keyspace schema description that is also cached if
1006
+ * possible (APC caching enabled).
1007
+ *
1008
+ * @param string $keyspace Optional keyspace, current used if not set
1009
+ * @param boolean $useCache Should caching be used if possible
1010
+ * @return array Keyspace schema description with column families metadata
1011
+ */
1012
+ public function getKeyspaceSchema($keyspace = null, $useCache = true) {
1013
+ if ($keyspace === null) {
1014
+ $keyspace = $this->cluster->getCurrentKeyspace();
1015
+ }
1016
+
1017
+ $cacheKey = 'cassandra.schema|'.$keyspace;
1018
+
1019
+ $schema = false;
1020
+ $storeSchema = false;
1021
+
1022
+ if ($useCache && function_exists('apc_fetch')) {
1023
+ $schema = apc_fetch($cacheKey);
1024
+ $storeSchema = true;
1025
+ }
1026
+
1027
+ if ($schema !== false) {
1028
+ return $schema;
1029
+ }
1030
+
1031
+ $info = $this->describeKeyspace($keyspace);
1032
+
1033
+ $schema = array(
1034
+ 'name' => $info->name,
1035
+ 'placement-strategy' => $info->strategy_class,
1036
+ 'placement-strategy-options' => $info->strategy_options,
1037
+ 'replication-factor' => $info->replication_factor,
1038
+ 'column-families' => array()
1039
+ );
1040
+
1041
+ foreach ($info->cf_defs as $columnFamily) {
1042
+ $isSuper = $columnFamily->column_type == 'Super' ? true : false;
1043
+
1044
+ $schema['column-families'][$columnFamily->name] = array(
1045
+ 'name' => $columnFamily->name,
1046
+ 'super' => $isSuper,
1047
+ 'column-type' =>
1048
+ $isSuper
1049
+ ? CassandraUtil::extractType(
1050
+ $columnFamily->subcomparator_type
1051
+ )
1052
+ : CassandraUtil::extractType(
1053
+ $columnFamily->comparator_type
1054
+ ),
1055
+ 'super-type' =>
1056
+ $isSuper
1057
+ ? CassandraUtil::extractType(
1058
+ $columnFamily->comparator_type
1059
+ )
1060
+ : null,
1061
+ 'data-type' => CassandraUtil::extractType(
1062
+ $columnFamily->default_validation_class
1063
+ ),
1064
+ 'column-data-types' => array()
1065
+ );
1066
+
1067
+ if (
1068
+ is_array($columnFamily->column_metadata)
1069
+ && !empty($columnFamily->column_metadata)
1070
+ ) {
1071
+ foreach ($columnFamily->column_metadata as $column) {
1072
+ $schema['column-families'][$columnFamily->name]['column-data-types'][$column->name]
1073
+ = CassandraUtil::extractType($column->validation_class);
1074
+ }
1075
+ }
1076
+ }
1077
+
1078
+ if ($storeSchema) {
1079
+ apc_store($cacheKey, $schema, 3600);
1080
+ }
1081
+
1082
+ return $schema;
1083
+ }
1084
+
1085
+ /**
1086
+ * Returns the version of the Cassandra node.
1087
+ *
1088
+ * @return string
1089
+ */
1090
+ public function getVersion() {
1091
+ return $this->call('describe_version');
1092
+ }
1093
+
1094
+ /**
1095
+ * Column family factory for manipulating a specific column family.
1096
+ *
1097
+ * @param string $name Name of the column family.
1098
+ * @return CassandraColumnFamily
1099
+ */
1100
+ public function cf($name) {
1101
+ if (!isset($this->columnFamilies[$name])) {
1102
+ $this->columnFamilies[$name] = new CassandraColumnFamily(
1103
+ $this,
1104
+ $name,
1105
+ Cassandra::CONSISTENCY_ONE,
1106
+ Cassandra::CONSISTENCY_ONE,
1107
+ $this->autopack
1108
+ );
1109
+ }
1110
+
1111
+ return $this->columnFamilies[$name];
1112
+ }
1113
+
1114
+ /**
1115
+ * Column family factory for manipulating a specific column family.
1116
+ *
1117
+ * Alias to {@see Cassandra::cf()} for people preferring full names.
1118
+ *
1119
+ * @param string $name Name of the column family.
1120
+ * @return CassandraColumnFamily
1121
+ */
1122
+ public function columnFamily($name) {
1123
+ return $this->cf($name);
1124
+ }
1125
+
1126
+ /**
1127
+ * Requests some data as a single request string.
1128
+ *
1129
+ * Supported patterns:
1130
+ * - family.key
1131
+ * - family.key:col1,col2,coln
1132
+ * - family.key:col1-col2
1133
+ * - family.key:col1-col2|100
1134
+ * - family\.name:key\:name:col\.1,col\|2|100
1135
+ *
1136
+ * In all of the parts, the following characters shoudl be escaped (\. etc)
1137
+ * '.', ':', ',', '-', '|'
1138
+ *
1139
+ * @param string $request The request string, see patterns above
1140
+ * @param integer $consistency Consistency level, use constants, has default
1141
+ * @throws CassandraInvalidPatternException If equest pattern is invalid
1142
+ */
1143
+ public function get($request, $consistency = null) {
1144
+ $details = $this->parseRequest($request);
1145
+
1146
+ return $this->cf($details['column-family'])->get(
1147
+ $details['key'],
1148
+ $details['columns'],
1149
+ $details['start-column'],
1150
+ $details['end-column'],
1151
+ $details['reversed'],
1152
+ $details['column-count'],
1153
+ $details['super-column'],
1154
+ $consistency
1155
+ );
1156
+ }
1157
+
1158
+ /**
1159
+ * Sets a key value. The key should include column family name as first
1160
+ * part before fullstop so key "user.john" would set key "john" in column
1161
+ * family called "user".
1162
+ *
1163
+ * Used for both inserting new data and updating existing. The columns is
1164
+ * expected to be key-value pairs with keys as column names and values as
1165
+ * column values.
1166
+ *
1167
+ * @param string $key The key containing column family and row key
1168
+ * @param array $columns Column names and their values
1169
+ * @param integer $consistency Consistency to use, default used if not set
1170
+ * @return integer Timestamp of the insterted/updated item
1171
+ */
1172
+ public function set($key, array $columns, $consistency = null) {
1173
+ $dotPosition = mb_strpos($key, '.');
1174
+
1175
+ if ($dotPosition === false) {
1176
+ throw new CassandraInvalidPatternException(
1177
+ 'Unable to set "'.$key.'", expected the column family name and'.
1178
+ 'key name seperated by a fullstop'
1179
+ );
1180
+ }
1181
+
1182
+ $columnFamilyName = mb_substr($key, 0, $dotPosition);
1183
+ $keyName = mb_substr($key, $dotPosition + 1);
1184
+
1185
+ return $this->cf($columnFamilyName)->set(
1186
+ $keyName,
1187
+ $columns,
1188
+ $consistency
1189
+ );
1190
+ }
1191
+
1192
+ /**
1193
+ * Removes a row or element of a row.
1194
+ *
1195
+ * Supported patterns:
1196
+ * - family.key
1197
+ * - family.key:col1 *
1198
+ * - family.super.key:col1
1199
+ *
1200
+ * In all of the parts, the following characters shoudl be escaped (. etc)
1201
+ * '.', ':', ',', '-', '|'.
1202
+ *
1203
+ * @param string $request The request string, see patterns above
1204
+ * @param integer $consistency Consistency level to use
1205
+ * @param integer $timestamp Optional timestamp to use.
1206
+ * @throws Exception If something goes wrong
1207
+ */
1208
+ public function remove(
1209
+ $request,
1210
+ $consistency = null,
1211
+ $timestamp = null
1212
+ ) {
1213
+ $details = $this->parseRequest($request);
1214
+
1215
+ $this->cf($details['column-family'])->remove(
1216
+ $details['key'],
1217
+ $details['columns'],
1218
+ $details['super-column'],
1219
+ $consistency,
1220
+ $timestamp
1221
+ );
1222
+ }
1223
+
1224
+ /**
1225
+ * Creates a new keyspace.
1226
+ *
1227
+ * Note that the replication factor means how many nodes hold a single
1228
+ * piece of information, not to how many nodes its replicated to so a
1229
+ * replication factor of one means that a single node has data and no
1230
+ * replication is performed.
1231
+ *
1232
+ * @param string $name Name of the keyspace
1233
+ * @param integer $replicationFactor How many nodes hold each piece of data
1234
+ * @param string $placementStrategyClass Data placement strategy
1235
+ * @param array $placementStrategyOptions Strategy options
1236
+ * @return boolean Was creating the keyspace successful
1237
+ * @throws Exception If anything goes wrong
1238
+ */
1239
+ public function createKeyspace(
1240
+ $name,
1241
+ $replicationFactor = 1,
1242
+ $placementStrategyClass = self::PLACEMENT_SIMPLE,
1243
+ $placementStrategyOptions = null
1244
+ ) {
1245
+ $def = new cassandra_KsDef();
1246
+
1247
+ $def->name = $name;
1248
+ $def->strategy_class = $placementStrategyClass;
1249
+ $def->strategy_options = $placementStrategyOptions;
1250
+ $def->cf_defs = array();
1251
+ $def->replication_factor = $replicationFactor;
1252
+
1253
+ return $this->call('system_add_keyspace', $def);
1254
+ }
1255
+
1256
+ /**
1257
+ * Updates keyspace information.
1258
+ *
1259
+ * Note that the replication factor means how many nodes hold a single
1260
+ * piece of information, not to how many nodes its replicated to so a
1261
+ * replication factor of one means that a single node has data and no
1262
+ * replication is performed.
1263
+ *
1264
+ * @param string $name Name of the keyspace
1265
+ * @param integer $replicationFactor How many nodes hold each piece of data
1266
+ * @param string $placementStrategyClass Data placement strategy
1267
+ * @param array $placementStrategyOptions Strategy options
1268
+ * @return boolean Was creating the keyspace successful
1269
+ * @throws Exception If anything goes wrong
1270
+ */
1271
+ public function updateKeyspace(
1272
+ $name,
1273
+ $replicationFactor = 1,
1274
+ $placementStrategyClass = self::PLACEMENT_SIMPLE,
1275
+ $placementStrategyOptions = null
1276
+ ) {
1277
+ $def = new cassandra_KsDef();
1278
+
1279
+ $def->name = $name;
1280
+ $def->strategy_class = $placementStrategyClass;
1281
+ $def->strategy_options = $placementStrategyOptions;
1282
+ $def->cf_defs = array();
1283
+ $def->replication_factor = $replicationFactor;
1284
+
1285
+ return $this->call('system_update_keyspace', $def);
1286
+ }
1287
+
1288
+ /**
1289
+ * Drops an entire keyspace.
1290
+ *
1291
+ * @param string $name Name of the keyspace
1292
+ * @return boolean Was dropping successful
1293
+ * @throws Exception If anything goes wrong
1294
+ */
1295
+ public function dropKeyspace($name) {
1296
+ return $this->call('system_drop_keyspace', $name);
1297
+ }
1298
+
1299
+ /**
1300
+ * Creates a new standard column family.
1301
+ *
1302
+ * @param string $keyspace Keyspace to create in
1303
+ * @param string $name Name of the column family
1304
+ * @param array $columns Column metadata
1305
+ * @param string $comparatorType Key comparator type
1306
+ * @param string $defaultValidationClass Default column value type
1307
+ * @param string $comment Free text comment
1308
+ * @param integer $rowCacheSize Row cache size
1309
+ * @param integer $keyCacheSize Key cache size
1310
+ * @param float $readRepairChance Change for read repair 0..1
1311
+ * @param integer $cgGraceSeconds Carbage collection period
1312
+ * @param integer $minCompactionThreshold Minimum compaction threshold
1313
+ * @param integer $maxCompactionThreshold Maximum compaction threshold
1314
+ * @param integer $rowCacheSavePeriodSeconds Row cache saving period
1315
+ * @param integer $keyCacheSavePeriodSeconds Key cache saving period
1316
+ * @param integer $memtableFlushAfterMins Memtable flush after minutes
1317
+ * @param integer $memtableFlushAfterThroughputMb Memtable flush after data
1318
+ * @param integer $memtableFlushAfterOpsMillions Flush after operations
1319
+ * @return boolean Was creating the column family successful
1320
+ */
1321
+ public function createStandardColumnFamily(
1322
+ $keyspace,
1323
+ $name,
1324
+ $columns = array(),
1325
+ $comparatorType = Cassandra::TYPE_UTF8,
1326
+ $defaultValidationClass = Cassandra::TYPE_UTF8,
1327
+ $comment = null,
1328
+ $rowCacheSize = null,
1329
+ $keyCacheSize = null,
1330
+ $readRepairChance = null,
1331
+ $cgGraceSeconds = null,
1332
+ $minCompactionThreshold = null,
1333
+ $maxCompactionThreshold = null,
1334
+ $rowCacheSavePeriodSeconds = null,
1335
+ $keyCacheSavePeriodSeconds = null,
1336
+ $memtableFlushAfterMins = null,
1337
+ $memtableFlushAfterThroughputMb = null,
1338
+ $memtableFlushAfterOpsMillions = null
1339
+ ) {
1340
+ return $this->createColumnFamily(
1341
+ $keyspace,
1342
+ $name,
1343
+ Cassandra::COLUMN_STANDARD,
1344
+ $columns,
1345
+ $comparatorType,
1346
+ null,
1347
+ $defaultValidationClass,
1348
+ $comment,
1349
+ $rowCacheSize,
1350
+ $keyCacheSize,
1351
+ $readRepairChance,
1352
+ $cgGraceSeconds,
1353
+ $minCompactionThreshold,
1354
+ $maxCompactionThreshold,
1355
+ $rowCacheSavePeriodSeconds,
1356
+ $keyCacheSavePeriodSeconds,
1357
+ $memtableFlushAfterMins,
1358
+ $memtableFlushAfterThroughputMb,
1359
+ $memtableFlushAfterOpsMillions
1360
+ );
1361
+ }
1362
+
1363
+ /**
1364
+ * Creates a new super column family.
1365
+ *
1366
+ * @param string $keyspace Keyspace to create in
1367
+ * @param string $name Name of the column family
1368
+ * @param array $columns Column metadata
1369
+ * @param string $comparatorType Key comparator type
1370
+ * @param string $defaultValidationClass Default column value type
1371
+ * @param string $comment Free text comment
1372
+ * @param integer $rowCacheSize Row cache size
1373
+ * @param integer $keyCacheSize Key cache size
1374
+ * @param float $readRepairChance Change for read repair 0..1
1375
+ * @param integer $cgGraceSeconds Carbage collection period
1376
+ * @param integer $minCompactionThreshold Minimum compaction threshold
1377
+ * @param integer $maxCompactionThreshold Maximum compaction threshold
1378
+ * @param integer $rowCacheSavePeriodSeconds Row cache saving period
1379
+ * @param integer $keyCacheSavePeriodSeconds Key cache saving period
1380
+ * @param integer $memtableFlushAfterMins Memtable flush after minutes
1381
+ * @param integer $memtableFlushAfterThroughputMb Memtable flush after data
1382
+ * @param integer $memtableFlushAfterOpsMillions Flush after operations
1383
+ * @return boolean Was creating the column family successful
1384
+ */
1385
+ public function createSuperColumnFamily(
1386
+ $keyspace,
1387
+ $name,
1388
+ $columns = array(),
1389
+ $comparatorType = Cassandra::TYPE_UTF8,
1390
+ $subcomparatorType = Cassandra::TYPE_UTF8,
1391
+ $defaultValidationClass = Cassandra::TYPE_UTF8,
1392
+ $comment = null,
1393
+ $rowCacheSize = null,
1394
+ $keyCacheSize = null,
1395
+ $readRepairChance = null,
1396
+ $cgGraceSeconds = null,
1397
+ $minCompactionThreshold = null,
1398
+ $maxCompactionThreshold = null,
1399
+ $rowCacheSavePeriodSeconds = null,
1400
+ $keyCacheSavePeriodSeconds = null,
1401
+ $memtableFlushAfterMins = null,
1402
+ $memtableFlushAfterThroughputMb = null,
1403
+ $memtableFlushAfterOpsMillions = null
1404
+ ) {
1405
+ foreach ($columns as $column) {
1406
+ if (
1407
+ array_key_exists('index-type', $column)
1408
+ || array_key_exists('index-name', $column)
1409
+ ) {
1410
+ throw new CassandraUnsupportedException(
1411
+ 'Secondary indexes are not supported by supercolumns'
1412
+ );
1413
+ }
1414
+ }
1415
+
1416
+ return $this->createColumnFamily(
1417
+ $keyspace,
1418
+ $name,
1419
+ Cassandra::COLUMN_SUPER,
1420
+ $columns,
1421
+ $comparatorType,
1422
+ $subcomparatorType,
1423
+ $defaultValidationClass,
1424
+ $comment,
1425
+ $rowCacheSize,
1426
+ $keyCacheSize,
1427
+ $readRepairChance,
1428
+ $cgGraceSeconds,
1429
+ $minCompactionThreshold,
1430
+ $maxCompactionThreshold,
1431
+ $rowCacheSavePeriodSeconds,
1432
+ $keyCacheSavePeriodSeconds,
1433
+ $memtableFlushAfterMins,
1434
+ $memtableFlushAfterThroughputMb,
1435
+ $memtableFlushAfterOpsMillions
1436
+ );
1437
+ }
1438
+
1439
+ /**
1440
+ * Creates a new column family, either standard or super.
1441
+ *
1442
+ * You might want to use the {@see Cassandra::createStandardColumnFamily()}
1443
+ * and {@see Cassandra::createSuperColumnFamily()} that proxy to this
1444
+ * method.
1445
+ *
1446
+ * @param string $keyspace Keyspace to create in
1447
+ * @param string $name Name of the column family
1448
+ * @param array $columns Column metadata
1449
+ * @param string $comparatorType Key comparator type
1450
+ * @param string $defaultValidationClass Default column value type
1451
+ * @param string $comment Free text comment
1452
+ * @param integer $rowCacheSize Row cache size
1453
+ * @param integer $keyCacheSize Key cache size
1454
+ * @param float $readRepairChance Change for read repair 0..1
1455
+ * @param integer $cgGraceSeconds Carbage collection period
1456
+ * @param integer $minCompactionThreshold Minimum compaction threshold
1457
+ * @param integer $maxCompactionThreshold Maximum compaction threshold
1458
+ * @param integer $rowCacheSavePeriodSeconds Row cache saving period
1459
+ * @param integer $keyCacheSavePeriodSeconds Key cache saving period
1460
+ * @param integer $memtableFlushAfterMins Memtable flush after minutes
1461
+ * @param integer $memtableFlushAfterThroughputMb Memtable flush after data
1462
+ * @param integer $memtableFlushAfterOpsMillions Flush after operations
1463
+ * @return boolean Was creating the column family successful
1464
+ */
1465
+ public function createColumnFamily(
1466
+ $keyspace,
1467
+ $name,
1468
+ $columnType = Cassandra::COLUMN_STANDARD,
1469
+ $columns = array(),
1470
+ $comparatorType = Cassandra::TYPE_UTF8,
1471
+ $subcomparatorType = null,
1472
+ $defaultValidationClass = Cassandra::TYPE_UTF8,
1473
+ $comment = null,
1474
+ $rowCacheSize = null,
1475
+ $keyCacheSize = null,
1476
+ $readRepairChance = null,
1477
+ $cgGraceSeconds = null,
1478
+ $minCompactionThreshold = null,
1479
+ $maxCompactionThreshold = null,
1480
+ $rowCacheSavePeriodSeconds = null,
1481
+ $keyCacheSavePeriodSeconds = null,
1482
+ $memtableFlushAfterMins = null,
1483
+ $memtableFlushAfterThroughputMb = null,
1484
+ $memtableFlushAfterOpsMillions = null
1485
+ ) {
1486
+ $columnMetadata = null;
1487
+
1488
+ if (!empty($columns)) {
1489
+ $columnMetadata = array();
1490
+
1491
+ foreach ($columns as $column) {
1492
+ $columnMetadata[] = $this->createColumnDefinition($column);
1493
+ }
1494
+ }
1495
+
1496
+ $def = new cassandra_CfDef();
1497
+
1498
+ $def->keyspace = $keyspace;
1499
+ $def->name = $name;
1500
+ $def->column_type = $columnType;
1501
+ $def->comparator_type = $comparatorType;
1502
+ $def->subcomparator_type = $subcomparatorType;
1503
+ $def->comment = $comment;
1504
+ $def->row_cache_size = $rowCacheSize;
1505
+
1506
+ if ($keyCacheSize !== null) {
1507
+ $def->key_cache_size = $keyCacheSize;
1508
+ }
1509
+
1510
+ $def->read_repair_chance = $readRepairChance;
1511
+ $def->column_metadata = $columnMetadata;
1512
+ $def->gc_grace_seconds = $cgGraceSeconds;
1513
+ $def->default_validation_class = $defaultValidationClass;
1514
+ $def->min_compaction_threshold = $minCompactionThreshold;
1515
+ $def->max_compaction_threshold = $maxCompactionThreshold;
1516
+ $def->row_cache_save_period_in_seconds = $rowCacheSavePeriodSeconds;
1517
+ $def->key_cache_save_period_in_seconds = $keyCacheSavePeriodSeconds;
1518
+ $def->memtable_flush_after_mins = $memtableFlushAfterMins;
1519
+ $def->memtable_throughput_in_mb = $memtableFlushAfterThroughputMb;
1520
+ $def->memtable_operations_in_millions = $memtableFlushAfterOpsMillions;
1521
+
1522
+ return $this->call('system_add_column_family', $def);
1523
+ }
1524
+
1525
+ /**
1526
+ * Truncates a column family of all of its data (entries).
1527
+ *
1528
+ * @param string $columnFamilyName Name of the column family
1529
+ * @return boolean Was truncating successful
1530
+ */
1531
+ public function truncate($columnFamilyName) {
1532
+ return $this->call('truncate', $columnFamilyName);
1533
+ }
1534
+
1535
+ /**
1536
+ * Returns the list of low-level cassandra methods that require keyspace to
1537
+ * be selected.
1538
+ *
1539
+ * @return array
1540
+ */
1541
+ protected static function getKeyspaceRequiredMethods() {
1542
+ if (self::$keyspaceRequiredMethods === null) {
1543
+ self::$keyspaceRequiredMethods = array(
1544
+ 'login',
1545
+ 'get',
1546
+ 'get_slice',
1547
+ 'get_count',
1548
+ 'multiget_slice',
1549
+ 'multiget_count',
1550
+ 'get_indexed_slices',
1551
+ 'insert',
1552
+ 'remove',
1553
+ 'batch_mutate',
1554
+ 'truncate',
1555
+ 'describe_splits'
1556
+ );
1557
+ }
1558
+
1559
+ return self::$keyspaceRequiredMethods;
1560
+ }
1561
+
1562
+ /**
1563
+ * Parses a get request.
1564
+ *
1565
+ * @param string $request Request to parse
1566
+ * @return array Request components
1567
+ */
1568
+ protected function parseRequest($request) {
1569
+ foreach(self::$requestKeyTokens as $tokenKey => $keyToken) {
1570
+ $request = str_replace(
1571
+ '\\'.$keyToken,
1572
+ '[/'.$tokenKey.'\\]',
1573
+ $request
1574
+ );
1575
+ }
1576
+
1577
+ $components = array();
1578
+
1579
+ $matchSuccessful = preg_match(
1580
+ '/^(.+)\.(.+)((\.(.*))|\[\])?(:(.*))?(\|(\d*)(R)?)?$/U',
1581
+ // 1 2 34 5 6 7 8 9 10
1582
+ $request,
1583
+ $components
1584
+ );
1585
+
1586
+ if (!$matchSuccessful || empty($components)) {
1587
+ throw new CassandraInvalidPatternException(
1588
+ 'Invalid get request "'.$request.'" provided'
1589
+ );
1590
+ }
1591
+
1592
+ $result = array(
1593
+ 'column-family' => $components[1],
1594
+ 'key' => $components[2],
1595
+ 'columns' => null,
1596
+ 'start-column' => null,
1597
+ 'end-column' => null,
1598
+ 'reversed' => false,
1599
+ 'column-count' => $this->defaultColumnCount,
1600
+ 'super-column' => null
1601
+ );
1602
+
1603
+ $componentCount = count($components);
1604
+
1605
+ // @codeCoverageIgnoreStart
1606
+ if ($componentCount < 3 || $componentCount > 11) {
1607
+ throw new CassandraInvalidPatternException(
1608
+ 'Invalid pattern, expected between 3 and 11 components, got '.
1609
+ $componentCount.', this should not happen'
1610
+ );
1611
+ }
1612
+ // @codeCoverageIgnoreEnd
1613
+
1614
+ if ($componentCount >= 6) {
1615
+ if (
1616
+ !empty($components[5])
1617
+ && $components[5] != '[]'
1618
+ ) {
1619
+ $result['super-column'] = $components[5];
1620
+ }
1621
+
1622
+ if ($componentCount >= 8) {
1623
+ if (!empty($components[7])) {
1624
+ if (strpos($components[7], ',') !== false) {
1625
+ $columns = explode(',', $components[7]);
1626
+
1627
+ foreach ($columns as $columnIndex => $columnName) {
1628
+ $columns[$columnIndex] = trim($columnName);
1629
+ }
1630
+
1631
+ $result['columns'] = $columns;
1632
+ } else if (strpos($components[7], '-') !== false) {
1633
+ $rangeColumns = explode('-', $components[7]);
1634
+
1635
+ if (count($rangeColumns) > 2) {
1636
+ throw new CassandraInvalidPatternException(
1637
+ 'Expected no more than 2 columns '.
1638
+ 'to define a range'
1639
+ );
1640
+ }
1641
+
1642
+ $result['start-column'] = trim($rangeColumns[0]);
1643
+ $result['end-column'] = trim($rangeColumns[1]);
1644
+ } else {
1645
+ $result['columns'] = array(trim($components[7]));
1646
+ }
1647
+ }
1648
+
1649
+ if ($componentCount >= 10 && !empty($components[9])) {
1650
+ $columnCount = (int)$components[9];
1651
+
1652
+ $result['column-count'] = $columnCount;
1653
+ }
1654
+
1655
+ if (
1656
+ $componentCount == 11
1657
+ && strtoupper($components[10]) == 'R'
1658
+ ) {
1659
+ $result['reversed'] = true;
1660
+ }
1661
+ }
1662
+ }
1663
+
1664
+ foreach ($result as $key => $item) {
1665
+ $result[$key] = self::unescape($item);
1666
+ }
1667
+
1668
+ return $result;
1669
+ }
1670
+
1671
+ /**
1672
+ * Escapes keys used in get requests.
1673
+ *
1674
+ * @param string $value Value to escape
1675
+ * @return string escaped value
1676
+ */
1677
+ public static function escape($value) {
1678
+ foreach(self::$requestKeyTokens as $keyToken) {
1679
+ $value = str_replace(
1680
+ $keyToken,
1681
+ '\\'.$keyToken,
1682
+ $value
1683
+ );
1684
+ }
1685
+
1686
+ return $value;
1687
+ }
1688
+
1689
+ /**
1690
+ * Unescapes keys used in get requests.
1691
+ *
1692
+ * @param string $value Value to unescape
1693
+ * @return string unescaped value
1694
+ */
1695
+ public static function unescape($value) {
1696
+ if (empty($value)) {
1697
+ return $value;
1698
+ }
1699
+ else if (is_array($value)) {
1700
+ foreach ($value as $key => $item) {
1701
+ $value[$key] = self::unescape($item);
1702
+ }
1703
+ } else if (is_string($value)) {
1704
+ foreach(self::$requestKeyTokens as $tokenKey => $keyToken) {
1705
+ $value = str_replace(
1706
+ '[/'.$tokenKey.'\\]',
1707
+ $keyToken,
1708
+ $value
1709
+ );
1710
+ }
1711
+ }
1712
+
1713
+ return $value;
1714
+ }
1715
+
1716
+ /**
1717
+ * Creates column definition.
1718
+ *
1719
+ * @param array $info Column info
1720
+ * @return cassandra_ColumnDef Column definition
1721
+ */
1722
+ protected function createColumnDefinition(array $info) {
1723
+ $def = new cassandra_ColumnDef();
1724
+
1725
+ $def->name = $info['name'];
1726
+
1727
+ if (!empty($info['type'])) {
1728
+ $def->validation_class = $info['type'];
1729
+ }
1730
+
1731
+ if (isset($info['index-type'])) {
1732
+ $def->index_type = $info['index-type'];
1733
+ }
1734
+
1735
+ if (!empty($info['index-name'])) {
1736
+ $def->index_type = $info['index-name'];
1737
+ }
1738
+
1739
+ return $def;
1740
+ }
1741
+ }
1742
+
1743
+ /**
1744
+ * Represents a column family.
1745
+ *
1746
+ * Provides an interface to insert, update and delete the data.
1747
+ *
1748
+ * You generally do not want to create an instance of this classs by yourself
1749
+ * but rather use the factory method {@see Cassandra::cf()} or the longer
1750
+ * variant {@see Cassandra::columnFamily()}.
1751
+ */
1752
+ class CassandraColumnFamily {
1753
+
1754
+ /**
1755
+ * Cassandra reference used for calls to database etc.
1756
+ *
1757
+ * @var Cassandra
1758
+ */
1759
+ protected $cassandra;
1760
+
1761
+ /**
1762
+ * Name of the column family.
1763
+ *
1764
+ * @var string
1765
+ */
1766
+ protected $name;
1767
+
1768
+ /**
1769
+ * Default consistency level to use on read operations.
1770
+ *
1771
+ * This can be set in the construcor.
1772
+ *
1773
+ * @var integer
1774
+ */
1775
+ protected $defaultReadConsistency;
1776
+
1777
+ /**
1778
+ * Default consistency level to use on write operations.
1779
+ *
1780
+ * This can be set in the construcor.
1781
+ *
1782
+ * @var integer
1783
+ */
1784
+ protected $defaultWriteConsistency;
1785
+
1786
+ /**
1787
+ * Should key names and values be auto-packed according to their types.
1788
+ *
1789
+ * @var boolean
1790
+ */
1791
+ protected $autopack;
1792
+
1793
+ /**
1794
+ * Column family schema definition.
1795
+ *
1796
+ * Used to determine how to correctly pack data.
1797
+ *
1798
+ * @var array
1799
+ */
1800
+ protected $schema;
1801
+
1802
+ /**
1803
+ * Constructs the object.
1804
+ *
1805
+ * You generally do not want to create an instance of this classs by
1806
+ * yourself but rather use the factory method {@see Cassandra::cf()} or the
1807
+ * longer variant {@see Cassandra::columnFamily()}.
1808
+ *
1809
+ * @param Cassandra $cassandra Cassandra reference
1810
+ * @param string $name Name of the column family
1811
+ * @param integer $defaultReadConsistency Default read consistency level
1812
+ * @param integer $defaultWriteConsistency Default write consistency level
1813
+ * @param boolean $autopack Should keys and values be autopacked to type
1814
+ */
1815
+ public function __construct(
1816
+ Cassandra $cassandra,
1817
+ $name,
1818
+ $defaultReadConsistency = Cassandra::CONSISTENCY_ONE,
1819
+ $defaultWriteConsistency = Cassandra::CONSISTENCY_ONE,
1820
+ $autopack = true
1821
+ ) {
1822
+ $this->cassandra = $cassandra;
1823
+ $this->name = $name;
1824
+ $this->defaultReadConsistency = $defaultReadConsistency;
1825
+ $this->defaultWriteConsistency = $defaultWriteConsistency;
1826
+ $this->autopack = $autopack;
1827
+ $this->schema = null;
1828
+ }
1829
+
1830
+ /**
1831
+ * Returns the used {@see Cassandra} reference.
1832
+ *
1833
+ * @return Cassandra
1834
+ */
1835
+ public function getCassandra() {
1836
+ return $this->cassandra;
1837
+ }
1838
+
1839
+ /**
1840
+ * Returns the schema description of current column family.
1841
+ *
1842
+ * @param boolean $useCache Should cache be used if possible
1843
+ * @return array Schema description
1844
+ * @throws CassandraColumnFamilyNotFoundException If not found
1845
+ */
1846
+ public function getSchema($useCache = true) {
1847
+ if ($this->schema === null) {
1848
+ $keyspaceSchema = $this->cassandra->getKeyspaceSchema(
1849
+ null,
1850
+ $useCache
1851
+ );
1852
+
1853
+ if (!isset($keyspaceSchema['column-families'][$this->name])) {
1854
+ throw new CassandraColumnFamilyNotFoundException(
1855
+ 'Schema for column family "'.$this->name.'" not found'
1856
+ );
1857
+ }
1858
+
1859
+ $this->schema = $keyspaceSchema['column-families'][$this->name];
1860
+ }
1861
+
1862
+ return $this->schema;
1863
+ }
1864
+
1865
+ /**
1866
+ * Returns the column name data type.
1867
+ *
1868
+ * Used for packing to correct datatype. Use the Cassandra::TYPE_..
1869
+ * constants to compare.
1870
+ *
1871
+ * @param boolean $useCache Should cache be used if possible
1872
+ * @return string Column name type
1873
+ */
1874
+ public function getColumnNameType($useCache = true) {
1875
+ $schema = $this->getSchema($useCache);
1876
+
1877
+ if ($schema['super']) {
1878
+ return $schema['super-type'];
1879
+ } else {
1880
+ return $schema['column-type'];
1881
+ }
1882
+ }
1883
+
1884
+ /**
1885
+ * Returns the value data type of given column.
1886
+ *
1887
+ * Used for packing to correct datatype. Use the Cassandra::TYPE_..
1888
+ * constants to compare. Returns {@see Cassandra::TYPE_BYTES} if not found.
1889
+ *
1890
+ * @param string $columnName Name of the column to get info about
1891
+ * @param boolean $useCache Should cache be used to fetch this if possible
1892
+ * @return string The type name
1893
+ */
1894
+ public function getColumnValueType($columnName, $useCache = true) {
1895
+ $schema = $this->getSchema($useCache);
1896
+
1897
+ if (isset($schema['column-data-types'][$columnName])) {
1898
+ return $schema['column-data-types'][$columnName];
1899
+ }
1900
+
1901
+ return Cassandra::TYPE_BYTES;
1902
+ }
1903
+
1904
+ /**
1905
+ * Fetches all columns of given key at given consistency level.
1906
+ *
1907
+ * If no consistency level is given, the default set in constructor is
1908
+ * used.
1909
+ *
1910
+ * @param string $key Key name to fetch data of
1911
+ * @param string $superColumn Optional super column name
1912
+ * @param integer $consistency Override default consistency level
1913
+ * @return array Array of column names and their values
1914
+ * @throws Exception If something goes wrong
1915
+ */
1916
+ public function getAll($key, $superColumn = null, $consistency = null) {
1917
+ return $this->get(
1918
+ $key,
1919
+ null,
1920
+ null,
1921
+ null,
1922
+ false,
1923
+ 100,
1924
+ $superColumn,
1925
+ $consistency
1926
+ );
1927
+ }
1928
+
1929
+ /**
1930
+ * Fetches listed columns of given key at given consistency level.
1931
+ *
1932
+ * If no consistency level is given, the default set in constructor is
1933
+ * used.
1934
+ *
1935
+ * @param string $key Key name to fetch data of
1936
+ * @param array $columns List of column names to fetch data of
1937
+ * @param string $superColumn Optional super column name
1938
+ * @param integer $consistency Override default consistency level
1939
+ * @return array Array of column names and their values
1940
+ * @throws Exception If something goes wrong
1941
+ */
1942
+ public function getColumns(
1943
+ $key,
1944
+ array $columns,
1945
+ $superColumn = null,
1946
+ $consistency = null
1947
+ ) {
1948
+ return $this->get(
1949
+ $key,
1950
+ $columns,
1951
+ null,
1952
+ null,
1953
+ false,
1954
+ 100,
1955
+ $superColumn,
1956
+ $consistency
1957
+ );
1958
+ }
1959
+
1960
+ /**
1961
+ * Fetches a range columns of given key at given consistency level.
1962
+ *
1963
+ * If no consistency level is given, the default set in constructor is
1964
+ * used.
1965
+ *
1966
+ * The start end end columns do not have to actually exists, just "a" and
1967
+ * "z" would work for example, they're used just for comparison.
1968
+ *
1969
+ * @param string $key Key name to fetch data of
1970
+ * @param string $startColumn Name of the first column in range
1971
+ * @param string $endColumn Name of the last column in range
1972
+ * @param string $superColumn Optional super column name
1973
+ * @param integer $columnCount Maximum number of columns to return
1974
+ * @param integer $consistency Override default consistency level
1975
+ * @return array Array of column names and their values
1976
+ * @throws Exception If something goes wrong
1977
+ */
1978
+ public function getColumnRange(
1979
+ $key,
1980
+ $startColumn,
1981
+ $endColumn,
1982
+ $superColumn = null,
1983
+ $columnCount = 100,
1984
+ $consistency = null
1985
+ ) {
1986
+ return $this->get(
1987
+ $key,
1988
+ null,
1989
+ $startColumn,
1990
+ $endColumn,
1991
+ false,
1992
+ $columnCount,
1993
+ $superColumn,
1994
+ $consistency
1995
+ );
1996
+ }
1997
+
1998
+ /**
1999
+ * Lower level method for fetching row data by key.
2000
+ *
2001
+ * Consider using the high-level {@see Cassandra::get()} or one of:
2002
+ * - {@see CassandraColumnFamily::getAll()}
2003
+ * - {@see CassandraColumnFamily::getColumns()}
2004
+ * - {@see CassandraColumnFamily::getColumnRange()}
2005
+ *
2006
+ * If no consistency level is given, the default set in constructor is
2007
+ * used.
2008
+ *
2009
+ * The start end end columns do not have to actually exists, just "a" and
2010
+ * "z" would work for example, they're used just for comparison.
2011
+ *
2012
+ * You should not set bot the list of columns and range of columns at the
2013
+ * same time.
2014
+ *
2015
+ * @param string $key Key name to fetch data of
2016
+ * @param array $columns List of column names to fetch data of
2017
+ * @param string $startColumn Name of the first column in range
2018
+ * @param string $endColumn Name of the last column in range
2019
+ * @param boolean $columnsReversed Should reversed order of columns be used
2020
+ * @param integer $columnCount Maximum number of columns to return
2021
+ * @param string $superColumn Optional super column name
2022
+ * @param integer $consistency Override default consistency level
2023
+ * @return array Array of column names and their values
2024
+ * @throws Exception If something goes wrong
2025
+ */
2026
+ public function get(
2027
+ $key,
2028
+ $columns = null,
2029
+ $startColumn = null,
2030
+ $endColumn = null,
2031
+ $columnsReversed = false,
2032
+ $columnCount = 100,
2033
+ $superColumn = null,
2034
+ $consistency = null
2035
+ ) {
2036
+ if ($columns !== null && $startColumn !== null) {
2037
+ throw new CassandraInvalidRequestException(
2038
+ 'You can define either a list of columns or the start and end '.
2039
+ 'columns for a range but not both at the same time'
2040
+ );
2041
+ }
2042
+
2043
+ if ($consistency === null) {
2044
+ $consistency = $this->defaultReadConsistency;
2045
+ }
2046
+
2047
+ $columnParent = $this->createColumnParent($superColumn);
2048
+
2049
+ $slicePredicate = $this->createSlicePredicate(
2050
+ $columns,
2051
+ $startColumn,
2052
+ $endColumn,
2053
+ $columnsReversed,
2054
+ $columnCount
2055
+ );
2056
+
2057
+ $result = $this->cassandra->call(
2058
+ 'get_slice',
2059
+ $key,
2060
+ $columnParent,
2061
+ $slicePredicate,
2062
+ $consistency
2063
+ );
2064
+
2065
+ if (count($result) == 0) {
2066
+ return null;
2067
+ }
2068
+
2069
+ return $this->parseSliceResponse($result);
2070
+ }
2071
+
2072
+ /**
2073
+ * Removes a row or element of a row.
2074
+ *
2075
+ * @param string $key Key to remove
2076
+ * @param array|null Array of column names or null for all
2077
+ * @param integer $consistency Consistency level to use
2078
+ * @param integer $timestamp Optional timestamp to use
2079
+ * @throws Exception If something goes wrong
2080
+ */
2081
+ public function remove(
2082
+ $key,
2083
+ array $columns = null,
2084
+ $superColumn = null,
2085
+ $consistency = null,
2086
+ $timestamp = null
2087
+ ) {
2088
+ if (is_array($columns) && count($columns) > 1) {
2089
+ throw new Exception(
2090
+ 'Removing several columns is not yet supported'
2091
+ );
2092
+ }
2093
+
2094
+ $columnPath = $this->createColumnPath(
2095
+ is_array($columns) && count($columns) == 1 ? $columns[0] : null,
2096
+ $superColumn
2097
+ );
2098
+
2099
+ if ($timestamp === null) {
2100
+ $timestamp = CassandraUtil::getTimestamp();
2101
+ }
2102
+
2103
+ if ($consistency === null) {
2104
+ $consistency = $this->defaultWriteConsistency;
2105
+ }
2106
+
2107
+ $this->cassandra->call(
2108
+ 'remove',
2109
+ $key,
2110
+ $columnPath,
2111
+ $timestamp,
2112
+ $consistency
2113
+ );
2114
+ }
2115
+
2116
+ /**
2117
+ * Fetch a set of rows filtered by secondary index where clause.
2118
+ *
2119
+ * To use this method, at least one of the columns present in the where
2120
+ * clause need to have a secondary index defined on it.
2121
+ *
2122
+ * The where array can be a mix of two formats:
2123
+ * 1. For simplest equality comparison - column value must equal something
2124
+ * exactly, the format array('column-name' => 'required value') can be
2125
+ * used.
2126
+ * 2. For any other supported comparison operators, use the slightly longer
2127
+ * syntax array(array('column-name', Cassandra::OP_LT, 'value')) where
2128
+ * each component is an array with three values, the first one being the
2129
+ * column name, second comparison operator and third the value. Use the
2130
+ * Cassandra::OP_.. constants for operators.
2131
+ * You can mix the two variants.
2132
+ *
2133
+ * If no consistency level is given, the default set in constructor is
2134
+ * used.
2135
+ *
2136
+ * The start end end columns do not have to actually exists, just "a" and
2137
+ * "z" would work for example, they're used just for comparison.
2138
+ *
2139
+ * You should not set bot the list of columns and range of columns at the
2140
+ * same time.
2141
+ *
2142
+ * @param array $where The where index conditions
2143
+ * @param array $columns List of column names to fetch data of
2144
+ * @param string $startColumn Name of the first column in range
2145
+ * @param string $endColumn Name of the last column in range
2146
+ * @param boolean $columnsReversed Should reversed order of columns be used
2147
+ * @param integer $columnCount Maximum number of columns to return
2148
+ * @param string $superColumn Optional super column name
2149
+ * @param integer $consistency Override default consistency level
2150
+ * @return CassandraIndexedDataIterator Iterator to indexed data
2151
+ * @throws Exception If something goes wrong
2152
+ */
2153
+ public function getWhere(
2154
+ array $where,
2155
+ $columns = null,
2156
+ $startColumn = null,
2157
+ $endColumn = null,
2158
+ $columnsReversed = false,
2159
+ $rowCountLimit = null,
2160
+ $columnCount = 100,
2161
+ $superColumn = null,
2162
+ $consistency = null,
2163
+ $bufferSize = 1000
2164
+ ) {
2165
+ if ($columns !== null && $startColumn !== null) {
2166
+ throw new CassandraInvalidRequestException(
2167
+ 'You can define either a list of columns or the start and end '.
2168
+ 'columns for a range but not both at the same time'
2169
+ );
2170
+ }
2171
+
2172
+ if ($consistency === null) {
2173
+ $consistency = $this->defaultReadConsistency;
2174
+ }
2175
+
2176
+ $columnParent = $this->createColumnParent($superColumn);
2177
+
2178
+ $slicePredicate = $this->createSlicePredicate(
2179
+ $columns,
2180
+ $startColumn,
2181
+ $endColumn,
2182
+ $columnsReversed,
2183
+ $columnCount
2184
+ );
2185
+
2186
+ $indexClause = $this->createIndexClause(
2187
+ $where,
2188
+ $startColumn,
2189
+ $columnCount
2190
+ );
2191
+
2192
+ return new CassandraIndexedDataIterator(
2193
+ $this,
2194
+ $columnParent,
2195
+ $indexClause,
2196
+ $slicePredicate,
2197
+ $consistency,
2198
+ $rowCountLimit,
2199
+ $bufferSize
2200
+ );
2201
+ }
2202
+
2203
+ /**
2204
+ * Fetches multiple keys in a single request.
2205
+ *
2206
+ * You should use this when you know that you will need several rows in a
2207
+ * single place as this is cheaper than making a seperate request for each
2208
+ * of the rows.
2209
+ *
2210
+ * If no consistency level is given, the default set in constructor is
2211
+ * used.
2212
+ *
2213
+ * The start end end columns do not have to actually exists, just "a" and
2214
+ * "z" would work for example, they're used just for comparison.
2215
+ *
2216
+ * You should not set bot the list of columns and range of columns at the
2217
+ * same time.
2218
+ *
2219
+ * @param array $keys Names of the keys to fetch
2220
+ * @param array $columns List of column names to fetch data of
2221
+ * @param string $startColumn Name of the first column in range
2222
+ * @param string $endColumn Name of the last column in range
2223
+ * @param boolean $columnsReversed Should reversed order of columns be used
2224
+ * @param integer $columnCount Maximum number of columns to return
2225
+ * @param string $superColumn Optional super column name
2226
+ * @param integer $consistency Override default consistency level
2227
+ * @return array Array of rows of column names and their values
2228
+ * @throws Exception If something goes wrong
2229
+ */
2230
+ public function getMultiple(
2231
+ array $keys,
2232
+ $columns = null,
2233
+ $startColumn = null,
2234
+ $endColumn = null,
2235
+ $columnsReversed = false,
2236
+ $columnCount = 100,
2237
+ $superColumn = null,
2238
+ $consistency = null,
2239
+ $bufferSize = 512
2240
+ ) {
2241
+ if ($columns !== null && $startColumn !== null) {
2242
+ throw new CassandraInvalidRequestException(
2243
+ 'You can define either a list of columns or the start and end '.
2244
+ 'columns for a range but not both at the same time'
2245
+ );
2246
+ }
2247
+
2248
+ if ($consistency === null) {
2249
+ $consistency = $this->defaultReadConsistency;
2250
+ }
2251
+
2252
+ $columnParent = $this->createColumnParent($superColumn);
2253
+
2254
+ $slicePredicate = $this->createSlicePredicate(
2255
+ $columns,
2256
+ $startColumn,
2257
+ $endColumn,
2258
+ $columnsReversed,
2259
+ $columnCount
2260
+ );
2261
+
2262
+ $results = array();
2263
+ $responses = array();
2264
+
2265
+ foreach ($keys as $key) {
2266
+ $results[$key] = null;
2267
+ }
2268
+
2269
+ $keyCount = count($keys);
2270
+ $setCount = ceil($keyCount / $bufferSize);
2271
+
2272
+ for ($i = 0; $i < $setCount; $i++) {
2273
+ $setKeys = array_slice($keys, $i * $bufferSize, $bufferSize);
2274
+
2275
+ $responses += $this->cassandra->call(
2276
+ 'multiget_slice',
2277
+ $setKeys,
2278
+ $columnParent,
2279
+ $slicePredicate,
2280
+ $consistency
2281
+ );
2282
+ }
2283
+
2284
+ foreach ($responses as $key => $response) {
2285
+ $results[$key] = $this->parseSliceResponse($response);
2286
+ }
2287
+
2288
+ return $results;
2289
+ }
2290
+
2291
+ /**
2292
+ * Fetches a range of keys in a single request.
2293
+ *
2294
+ * This method will only returns meaningful ordered results if you are using
2295
+ * an order-preserving partitioner such as
2296
+ * org.apache.cassandra.dht.CollatingOrderPreservingPartitioner. The default
2297
+ * cassandra partitioner is random and wont fetch the keys in order.
2298
+ *
2299
+ * As there may be very many rows in the given range, the whole result is
2300
+ * not fetched in a single request but rather an iterator is returned that
2301
+ * you can go over using a foreach loop or if you know you don't have very
2302
+ * many rows, use the {@see CassandraDataIterator::getAll()} that does the
2303
+ * iteration for you, returning a single array with all the data.
2304
+ *
2305
+ * The data is fetched in batches of size $bufferSize.
2306
+ *
2307
+ * The start end end key and columns do not have to actually exists, just
2308
+ * "a" and "z" would work for example, they're used just for comparison.
2309
+ *
2310
+ * Leave the $rowCountLimit empty to fetch all.
2311
+ *
2312
+ * You should not set bot the list of columns and range of columns at the
2313
+ * same time.
2314
+ *
2315
+ * @param string $startKey Key to start fetching data from
2316
+ * @param array $endKey Final key to fetch in the range
2317
+ * @param integer $rowCountLimit How many rows to fetch at maximum
2318
+ * @param array $columns List of columns to fetch
2319
+ * @param string $startColumn Name of the first column in range
2320
+ * @param string $endColumn Name of the last column in range
2321
+ * @param boolean $columnsReversed Should reversed order of columns be used
2322
+ * @param integer $columnCount Maximum number of columns to return
2323
+ * @param string $superColumn Optional super column name
2324
+ * @param integer $consistency Override default consistency level
2325
+ * @param integer $bufferSize How many rows to fetch in a single batch.
2326
+ * @return CassandraRangeDataIterator Iterator to range data
2327
+ * @throws Exception If something goes wrong
2328
+ */
2329
+ public function getKeyRange(
2330
+ $startKey = null,
2331
+ $endKey = null,
2332
+ $rowCountLimit = null,
2333
+ $columns = null,
2334
+ $startColumn = null,
2335
+ $endColumn = null,
2336
+ $columnsReversed = false,
2337
+ $columnCount = 100,
2338
+ $superColumn = null,
2339
+ $consistency = null,
2340
+ $bufferSize = 512
2341
+ ) {
2342
+ if ($columns !== null && $startColumn !== null) {
2343
+ throw new CassandraInvalidRequestException(
2344
+ 'You can define either a list of columns or the start and end '.
2345
+ 'columns for a range but not both at the same time'
2346
+ );
2347
+ }
2348
+
2349
+ if ($consistency === null) {
2350
+ $consistency = $this->defaultReadConsistency;
2351
+ }
2352
+
2353
+ if ($startKey === null) {
2354
+ $startKey = '';
2355
+ }
2356
+
2357
+ if ($endKey === null) {
2358
+ $endKey = '';
2359
+ }
2360
+
2361
+ $columnParent = $this->createColumnParent($superColumn);
2362
+
2363
+ $slicePredicate = $this->createSlicePredicate(
2364
+ $columns,
2365
+ $startColumn,
2366
+ $endColumn,
2367
+ $columnsReversed,
2368
+ $columnCount
2369
+ );
2370
+
2371
+ return new CassandraRangeDataIterator(
2372
+ $this,
2373
+ $columnParent,
2374
+ $slicePredicate,
2375
+ $startKey,
2376
+ $endKey,
2377
+ $consistency,
2378
+ $rowCountLimit,
2379
+ $bufferSize
2380
+ );
2381
+ }
2382
+
2383
+ /**
2384
+ * Returns the number of columns a key has that may match additional
2385
+ * list and range requirements.
2386
+ *
2387
+ * @param string $key Row key to get info about
2388
+ * @param array $columns List of columns to fetch
2389
+ * @param string $startColumn Name of the first column in range
2390
+ * @param string $endColumn Name of the last column in range
2391
+ * @param string $superColumn Optional super column name
2392
+ * @param integer $consistency Consistency level to use
2393
+ * @return integer Number of colums for given key and conditions
2394
+ * @throws Exception If something goes wrong
2395
+ */
2396
+ public function getColumnCount(
2397
+ $key,
2398
+ $columns = null,
2399
+ $startColumn = null,
2400
+ $endColumn = null,
2401
+ $superColumn = null,
2402
+ $consistency = null
2403
+ ) {
2404
+ if ($columns !== null && $startColumn !== null) {
2405
+ throw new CassandraInvalidRequestException(
2406
+ 'You can define either a list of columns or the start and end '.
2407
+ 'columns for a range but not both at the same time'
2408
+ );
2409
+ }
2410
+
2411
+ if ($consistency === null) {
2412
+ $consistency = $this->defaultReadConsistency;
2413
+ }
2414
+
2415
+ $columnParent = $this->createColumnParent($superColumn);
2416
+
2417
+ $slicePredicate = $this->createSlicePredicate(
2418
+ $columns,
2419
+ $startColumn,
2420
+ $endColumn,
2421
+ false,
2422
+ 2147483647
2423
+ );
2424
+
2425
+ return $this->cassandra->call(
2426
+ 'get_count',
2427
+ $key,
2428
+ $columnParent,
2429
+ $slicePredicate,
2430
+ $consistency
2431
+ );
2432
+ }
2433
+
2434
+ /**
2435
+ * Returns the number of columns of a set of keys key has that may match
2436
+ * additional list and range requirements.
2437
+ *
2438
+ * @param array $keys List of row keys to get info about
2439
+ * @param array $columns List of columns to fetch
2440
+ * @param string $startColumn Name of the first column in range
2441
+ * @param string $endColumn Name of the last column in range
2442
+ * @param string $superColumn Optional super column name
2443
+ * @param integer $consistency Consistency level to use
2444
+ * @return integer Number of colums for given key and conditions
2445
+ * @throws Exception If something goes wrong
2446
+ */
2447
+ public function getColumnCounts(
2448
+ array $keys,
2449
+ $columns = null,
2450
+ $startColumn = null,
2451
+ $endColumn = null,
2452
+ $superColumn = null,
2453
+ $consistency = null
2454
+ ) {
2455
+ if ($columns !== null && $startColumn !== null) {
2456
+ throw new CassandraInvalidRequestException(
2457
+ 'You can define either a list of columns or the start and end '.
2458
+ 'columns for a range but not both at the same time'
2459
+ );
2460
+ }
2461
+
2462
+ if ($consistency === null) {
2463
+ $consistency = $this->defaultReadConsistency;
2464
+ }
2465
+
2466
+ $columnParent = $this->createColumnParent($superColumn);
2467
+
2468
+ $slicePredicate = $this->createSlicePredicate(
2469
+ $columns,
2470
+ $startColumn,
2471
+ $endColumn,
2472
+ false,
2473
+ 2147483647
2474
+ );
2475
+
2476
+ return $this->cassandra->call(
2477
+ 'multiget_count',
2478
+ $keys,
2479
+ $columnParent,
2480
+ $slicePredicate,
2481
+ $consistency
2482
+ );
2483
+ }
2484
+
2485
+ /**
2486
+ * Inserts a new row or updates an existing one.
2487
+ *
2488
+ * If a key already exists with some columns and you update it, any columns
2489
+ * not listed in the update statement will not be changed or deleted.
2490
+ *
2491
+ * If not set, default consistency level set in the constructor is used.
2492
+ *
2493
+ * You generally do not need to provide a timestamp, it is generated for
2494
+ * you.
2495
+ *
2496
+ * You may optionally provide the time-to-live period in seconds after which
2497
+ * the entry will appear deleted.
2498
+ *
2499
+ * @param string $key Key to set or update
2500
+ * @param array $columns Array of column names and their values
2501
+ * @param integer $consistency Consistency level to use
2502
+ * @param integer $timestamp Optional timestamp to use.
2503
+ * @param integer $timeToLiveSeconds Optional time-to-live period
2504
+ * @throws Exception If something goes wrong
2505
+ */
2506
+ public function set(
2507
+ $key,
2508
+ array $columns,
2509
+ $consistency = null,
2510
+ $timestamp = null,
2511
+ $timeToLiveSeconds = null
2512
+ ) {
2513
+ if ($timestamp === null) {
2514
+ $timestamp = CassandraUtil::getTimestamp();
2515
+ }
2516
+
2517
+ if ($consistency === null) {
2518
+ $consistency = $this->defaultWriteConsistency;
2519
+ }
2520
+
2521
+ $mutationMap = array(
2522
+ $key => array(
2523
+ $this->name => $this->createColumnMutations(
2524
+ $columns,
2525
+ $timestamp,
2526
+ $timeToLiveSeconds
2527
+ )
2528
+ )
2529
+ );
2530
+
2531
+ $this->cassandra->call('batch_mutate', $mutationMap, $consistency);
2532
+ }
2533
+
2534
+ /**
2535
+ * Creates a new low-level Cassandra column parent definition.
2536
+ *
2537
+ * This is a low-level method used internally but kept public in case you
2538
+ * may need it.
2539
+ *
2540
+ * @param string $superColumName Name of the super column
2541
+ * @return cassandra_ColumnParent Column parent definition
2542
+ */
2543
+ public function createColumnParent($superColumnName = null) {
2544
+ $schema = $this->getSchema();
2545
+
2546
+ $columnParent = new cassandra_ColumnParent();
2547
+ $columnParent->column_family = $this->name;
2548
+
2549
+ if ($superColumnName !== null) {
2550
+ if ($this->autopack) {
2551
+ $columnParent->super_column = CassandraUtil::pack(
2552
+ $superColumnName,
2553
+ $schema['super-type']
2554
+ );
2555
+ } else {
2556
+ $columnParent->super_column = $superColumnName;
2557
+ }
2558
+ }
2559
+
2560
+ return $columnParent;
2561
+ }
2562
+
2563
+ /**
2564
+ * Creates low-level Cassandra column-path definition.
2565
+ *
2566
+ * @param string $columnName Name of the column
2567
+ * @param string $superColumName Name of the super column
2568
+ * @return cassandra_ColumnPath Column path definition
2569
+ */
2570
+ public function createColumnPath($columnName, $superColumnName) {
2571
+ $schema = $this->getSchema();
2572
+
2573
+ $columnPath = new cassandra_ColumnPath();
2574
+
2575
+ $columnPath->column_family = $this->name;
2576
+
2577
+ if ($columnName !== null) {
2578
+ $columnPath->column = CassandraUtil::pack(
2579
+ $columnName,
2580
+ $this->getColumnNameType()
2581
+ );
2582
+ }
2583
+
2584
+ if ($superColumnName !== null) {
2585
+ $columnPath->super_column = CassandraUtil::pack(
2586
+ $superColumnName,
2587
+ $schema['super-type']
2588
+ );
2589
+ }
2590
+
2591
+ return $columnPath;
2592
+ }
2593
+
2594
+ /**
2595
+ * Creates a slice predicate.
2596
+ *
2597
+ * This is a low-level method used internally but kept public in case you
2598
+ * may need it.
2599
+ *
2600
+ * @param array $columns List of column names
2601
+ * @param string $startColumn Column range start
2602
+ * @param string $endColumn Column range end
2603
+ * @param boolean $columnsReversed Should column order be reversed
2604
+ * @param integer $columnCount Max number of columns to fetch
2605
+ * @return cassandra_SlicePredicate Slice predicate
2606
+ */
2607
+ public function createSlicePredicate(
2608
+ $columns,
2609
+ $startColumn,
2610
+ $endColumn,
2611
+ $columnsReversed,
2612
+ $columnCount
2613
+ ) {
2614
+ $predicate = new cassandra_SlicePredicate();
2615
+ $schema = $this->getSchema();
2616
+
2617
+ if (is_array($columns)) {
2618
+ if ($this->autopack) {
2619
+ $packedColumns = array();
2620
+
2621
+ foreach ($columns as $columnName) {
2622
+ $columnType = $this->getColumnNameType();
2623
+
2624
+ $packedColumns[] = CassandraUtil::pack(
2625
+ $columnName,
2626
+ $columnType
2627
+ );
2628
+ }
2629
+
2630
+ $predicate->column_names = $packedColumns;
2631
+ } else {
2632
+ $predicate->column_names = $columns;
2633
+ }
2634
+ } else {
2635
+ if ($this->autopack) {
2636
+ if ($startColumn === null) {
2637
+ $startColumn = '';
2638
+ }
2639
+
2640
+ if ($endColumn === null) {
2641
+ $endColumn = '';
2642
+ }
2643
+
2644
+ if (!empty($startColumn)) {
2645
+ $columnType = $this->getColumnNameType();
2646
+
2647
+ $startColumn = CassandraUtil::pack(
2648
+ $startColumn,
2649
+ $columnType
2650
+ );
2651
+ }
2652
+
2653
+ if (!empty($endColumn)) {
2654
+ $columnType = $this->getColumnNameType();
2655
+
2656
+ $endColumn = CassandraUtil::pack(
2657
+ $endColumn,
2658
+ $columnType
2659
+ );
2660
+ }
2661
+ }
2662
+
2663
+ $sliceRange = new cassandra_SliceRange();
2664
+ $sliceRange->count = $columnCount;
2665
+ $sliceRange->reversed = $columnsReversed;
2666
+ $sliceRange->start = $startColumn;
2667
+ $sliceRange->finish = $endColumn;
2668
+
2669
+ $predicate->slice_range = $sliceRange;
2670
+ }
2671
+
2672
+ return $predicate;
2673
+ }
2674
+
2675
+ /**
2676
+ * Creates a new index clause.
2677
+ *
2678
+ * This is a low-level method used internally but kept public in case you
2679
+ * may need it.
2680
+ *
2681
+ * @param array $where Where conditions
2682
+ * @param string $startKey Key to start fetching from
2683
+ * @param integer $maxRowCount Maximum number of rows to fetch
2684
+ * @return cassandra_IndexClause The index clause
2685
+ */
2686
+ public function createIndexClause(
2687
+ array $where,
2688
+ $startKey = null,
2689
+ $maxRowCount = 100
2690
+ ) {
2691
+ $indexClause = new cassandra_IndexClause();
2692
+ $expressions = array();
2693
+
2694
+ foreach ($where as $columnName => $value) {
2695
+ $indexExpression = new cassandra_IndexExpression();
2696
+
2697
+ if (is_array($value)) {
2698
+ $supportedOperators = array(
2699
+ Cassandra::OP_EQ,
2700
+ Cassandra::OP_LT,
2701
+ Cassandra::OP_GT,
2702
+ Cassandra::OP_LTE,
2703
+ Cassandra::OP_GTE
2704
+ );
2705
+
2706
+ if (
2707
+ count($value) != 3
2708
+ || !in_array($value[1], $supportedOperators)
2709
+ ) {
2710
+ throw new CassandraInvalidRequestException(
2711
+ 'Invalid where clause: '.serialize($value)
2712
+ );
2713
+ }
2714
+
2715
+ $indexExpression->column_name = CassandraUtil::pack(
2716
+ $value[0],
2717
+ $this->getColumnNameType()
2718
+ );
2719
+
2720
+ $indexExpression->op = $value[1];
2721
+
2722
+ $indexExpression->value = CassandraUtil::pack(
2723
+ $value[2],
2724
+ $this->getColumnValueType($value[0])
2725
+ );
2726
+ } else {
2727
+ $indexExpression->column_name = CassandraUtil::pack(
2728
+ $columnName,
2729
+ $this->getColumnNameType()
2730
+ );
2731
+
2732
+ $indexExpression->op = Cassandra::OP_EQ;
2733
+
2734
+ $indexExpression->value = CassandraUtil::pack(
2735
+ $value,
2736
+ $this->getColumnValueType($columnName)
2737
+ );
2738
+ }
2739
+
2740
+ $expressions[] = $indexExpression;
2741
+ }
2742
+
2743
+ $indexClause->expressions = $expressions;
2744
+ $indexClause->start_key = $startKey !== null ? $startKey : '';
2745
+ $indexClause->count = $maxRowCount;
2746
+
2747
+ return $indexClause;
2748
+ }
2749
+
2750
+ /**
2751
+ * Creates column mutations, used in insert/update operations.
2752
+ *
2753
+ * This is a low-level method used internally but kept public in case you
2754
+ * may need it.
2755
+ *
2756
+ * @param array $columns List of columns and their values
2757
+ * @param integer $timestamp Operation timestamp
2758
+ * @param integer $timeToLiveSeconds Data time-to-live period
2759
+ * @return cassandra_Mutation The mutation object
2760
+ */
2761
+ public function createColumnMutations(
2762
+ array $columns,
2763
+ $timestamp = null,
2764
+ $timeToLiveSeconds = null
2765
+ ) {
2766
+ if ($timestamp === null) {
2767
+ $timestamp = CassandraUtil::getTimestamp();
2768
+ }
2769
+
2770
+ $columnsOrSuperColumns = $this->createColumnsOrSuperColumns(
2771
+ $columns,
2772
+ $timestamp,
2773
+ $timeToLiveSeconds
2774
+ );
2775
+
2776
+ $mutations = array();
2777
+
2778
+ foreach ($columnsOrSuperColumns as $columnOrSuperColumn) {
2779
+ $mutation = new cassandra_Mutation();
2780
+ $mutation->column_or_supercolumn = $columnOrSuperColumn;
2781
+
2782
+ $mutations[] = $mutation;
2783
+ }
2784
+
2785
+ return $mutations;
2786
+ }
2787
+
2788
+ /**
2789
+ * Creates a list of columns or super-columns.
2790
+ *
2791
+ * Returns a list of {@see cassandra_ColumnOrSuperColumn}
2792
+ *
2793
+ * This is a low-level method used internally but kept public in case you
2794
+ * may need it.
2795
+ *
2796
+ * @param array $columns Array of columns and their values
2797
+ * @param integer $timestamp Operation timestamp
2798
+ * @param integer $timeToLiveSeconds Data time-to-live period
2799
+ * @return array List of cassandra_ColumnOrSuperColumn
2800
+ */
2801
+ public function createColumnsOrSuperColumns(
2802
+ array $columns,
2803
+ $timestamp = null,
2804
+ $timeToLiveSeconds = null
2805
+ ) {
2806
+ if ($timestamp === null) {
2807
+ $timestamp = CassandraUtil::getTimestamp();
2808
+ }
2809
+
2810
+ $results = array();
2811
+
2812
+ foreach ($columns as $columnName => $columnValue) {
2813
+ if (!isset($columnValue)) {
2814
+ continue;
2815
+ }
2816
+
2817
+ $column = new cassandra_ColumnOrSuperColumn();
2818
+
2819
+ if (is_array($columnValue)) {
2820
+ $column->super_column = new cassandra_SuperColumn();
2821
+ $column->super_column->name = CassandraUtil::pack(
2822
+ $columnName,
2823
+ $this->getColumnNameType()
2824
+ );
2825
+ $column->super_column->columns = $this->createColumns(
2826
+ $columnValue,
2827
+ $timestamp,
2828
+ $timeToLiveSeconds
2829
+ );
2830
+ $column->super_column->timestamp = $timestamp;
2831
+ } else {
2832
+ $column->column = new cassandra_Column();
2833
+ $column->column->name = CassandraUtil::pack(
2834
+ $columnName,
2835
+ $this->getColumnNameType()
2836
+ );
2837
+ $column->column->value = CassandraUtil::pack(
2838
+ $columnValue,
2839
+ $this->getColumnValueType($columnName)
2840
+ );
2841
+ $column->column->timestamp = $timestamp;
2842
+ $column->column->ttl = $timeToLiveSeconds;
2843
+ }
2844
+
2845
+ $results[] = $column;
2846
+ }
2847
+
2848
+ return $results;
2849
+ }
2850
+
2851
+ /**
2852
+ * Creates a list of {@see cassandra_Column} from list of columns and their
2853
+ * values.
2854
+ *
2855
+ * This is a low-level method used internally but kept public in case you
2856
+ * may need it.
2857
+ *
2858
+ * @param array $columns Array of columns and their values
2859
+ * @param integer $timestamp Operation timestamp
2860
+ * @param integer $timeToLiveSeconds Data time-to-live period
2861
+ * @return array List of cassandra_Column
2862
+ */
2863
+ public function createColumns(
2864
+ array $columns,
2865
+ $timestamp = null,
2866
+ $timeToLiveSeconds = null
2867
+ ) {
2868
+ if ($timestamp === null) {
2869
+ $timestamp = CassandraUtil::getTimestamp();
2870
+ }
2871
+
2872
+ $results = array();
2873
+
2874
+ foreach ($columns as $name => $value) {
2875
+ $column = new cassandra_Column();
2876
+ $column->name = CassandraUtil::pack(
2877
+ $name,
2878
+ $this->getColumnNameType()
2879
+ );
2880
+ $column->value = CassandraUtil::pack(
2881
+ $value,
2882
+ $this->getColumnValueType($name)
2883
+ );
2884
+ $column->timestamp = $timestamp;
2885
+ $column->ttl = $timeToLiveSeconds;
2886
+
2887
+ $results[] = $column;
2888
+ }
2889
+
2890
+ return $results;
2891
+ }
2892
+
2893
+ /**
2894
+ * Parses the result of slice requests into a simple array of data.
2895
+ *
2896
+ * This is a low-level method used internally but kept public in case you
2897
+ * may need it.
2898
+ *
2899
+ * @param array $responses The responses to parse
2900
+ * @return array List of data
2901
+ */
2902
+ public function parseSlicesResponse(array $responses) {
2903
+ $results = array();
2904
+
2905
+ foreach ($responses as $row) {
2906
+ $key = $row->key;
2907
+ $results[$key] = array();
2908
+
2909
+ foreach ($row->columns as $column) {
2910
+ $results[$key] += $this->parseSliceRow($column);
2911
+ }
2912
+ }
2913
+
2914
+ return $results;
2915
+ }
2916
+
2917
+ /**
2918
+ * Parses the result of a single slice request into a simple array of data.
2919
+ *
2920
+ * This is a low-level method used internally but kept public in case you
2921
+ * may need it.
2922
+ *
2923
+ * @param array $response The response to parse
2924
+ * @return array List of data
2925
+ */
2926
+ public function parseSliceResponse(array $response) {
2927
+ $results = array();
2928
+
2929
+ foreach ($response as $row) {
2930
+ $results += $this->parseSliceRow($row);
2931
+ }
2932
+
2933
+ return $results;
2934
+ }
2935
+
2936
+ /**
2937
+ * Parses a slice row or {@see cassandra_ColumnOrSuperColumn} into a plain
2938
+ * array of data.
2939
+ *
2940
+ * @param cassandra_ColumnOrSuperColumn $row Row to parse
2941
+ * @return array Parsed plain array of data
2942
+ */
2943
+ protected function parseSliceRow(cassandra_ColumnOrSuperColumn $row) {
2944
+ $result = array();
2945
+
2946
+ if ($row->column !== null) {
2947
+ $nameType = $this->getColumnNameType();
2948
+ $valueType = $this->getColumnValueType($row->column->name);
2949
+
2950
+ $name = CassandraUtil::unpack($row->column->name, $nameType);
2951
+ $value = CassandraUtil::unpack($row->column->value, $valueType);
2952
+
2953
+ $result[$name] = $value;
2954
+ } else if($row->super_column !== null) {
2955
+ $superNameType = null;
2956
+
2957
+ $superName = CassandraUtil::unpack(
2958
+ $row->super_column->name,
2959
+ $superNameType
2960
+ );
2961
+
2962
+ $values = array();
2963
+
2964
+ foreach ($row->super_column->columns as $column) {
2965
+ $nameType = $this->getColumnNameType();
2966
+ $valueType = $this->getColumnValueType($column->name);
2967
+
2968
+ $name = CassandraUtil::unpack($column->name, $nameType);
2969
+ $value = CassandraUtil::unpack($column->value, $valueType);
2970
+
2971
+ $values[$name] = $value;
2972
+ }
2973
+
2974
+ $result[$superName] = $values;
2975
+ } else {
2976
+ // @codeCoverageIgnoreStart
2977
+ throw new Exception('Expected either normal or super column');
2978
+ // @codeCoverageIgnoreEnd
2979
+ }
2980
+
2981
+ return $result;
2982
+ }
2983
+ }
2984
+
2985
+ /**
2986
+ * Utility class for the Cassandra library, providing some common operations
2987
+ * like packing data to correct type.
2988
+ *
2989
+ * Includes quite a lot of code from PHPCassa project.
2990
+ */
2991
+ class CassandraUtil {
2992
+
2993
+ /**
2994
+ * Extracts the data type name from given definition.
2995
+ *
2996
+ * The parsed names match the constancts Cassandra::TYPE_...
2997
+ *
2998
+ * @param string $definition Definition to parse
2999
+ * @return string Valid data type name
3000
+ */
3001
+ public static function extractType($definition) {
3002
+ if ($definition === null or $definition == '') {
3003
+ return Cassandra::TYPE_BYTES;
3004
+ }
3005
+
3006
+ $index = strrpos($definition, '.');
3007
+
3008
+ if ($index === false) {
3009
+ return Cassandra::TYPE_BYTES;
3010
+ }
3011
+
3012
+ return substr($definition, $index + 1);
3013
+ }
3014
+
3015
+ /**
3016
+ * Packs given value to given type.
3017
+ *
3018
+ * @param mixed $value Value to pack
3019
+ * @param string $type Type name to pack to
3020
+ * @return mixed Data packed to requested type
3021
+ */
3022
+ public static function pack($value, $type) {
3023
+ switch ($type) {
3024
+ case Cassandra::TYPE_LONG:
3025
+ return self::packLong($value);
3026
+
3027
+ case Cassandra::TYPE_INTEGER:
3028
+ return self::packInteger($value);
3029
+
3030
+ case Cassandra::TYPE_ASCII:
3031
+ return self::packString($value, strlen($value));
3032
+
3033
+ case Cassandra::TYPE_UTF8:
3034
+ if (mb_detect_encoding($value, 'UTF-8') != 'UTF-8') {
3035
+ $value = utf8_encode($value);
3036
+ }
3037
+
3038
+ return self::packString($value, strlen($value));
3039
+
3040
+ case Cassandra::TYPE_TIME_UUID:
3041
+ return self::packString($value, 16);
3042
+
3043
+ case Cassandra::TYPE_LEXICAL_UUID:
3044
+ return self::packString($value, 16);
3045
+
3046
+ default:
3047
+ return $value;
3048
+ }
3049
+ }
3050
+
3051
+ /**
3052
+ * Packs data to long type.
3053
+ *
3054
+ * @param mixed $value Value to pack
3055
+ * @return integer Packed data
3056
+ */
3057
+ public static function packLong($value) {
3058
+ // If we are on a 32bit architecture we have to explicitly deal with
3059
+ // 64-bit twos-complement arithmetic since PHP wants to treat all ints
3060
+ // as signed and any int over 2^31 - 1 as a float
3061
+ if (PHP_INT_SIZE == 4) {
3062
+ $neg = $value < 0;
3063
+
3064
+ if ($neg) {
3065
+ $value *= - 1;
3066
+ }
3067
+
3068
+ $hi = (int) ($value / 4294967296);
3069
+ $lo = (int) $value;
3070
+
3071
+ if ($neg) {
3072
+ $hi = ~$hi;
3073
+ $lo = ~$lo;
3074
+
3075
+ if (($lo & (int)0xffffffff) == (int)0xffffffff) {
3076
+ $lo = 0;
3077
+ $hi++;
3078
+ } else {
3079
+ $lo++;
3080
+ }
3081
+ }
3082
+
3083
+ $data = pack('N2', $hi, $lo);
3084
+ } else {
3085
+ $hi = $value >> 32;
3086
+ $lo = $value & 0xFFFFFFFF;
3087
+
3088
+ $data = pack('N2', $hi, $lo);
3089
+ }
3090
+
3091
+ return $data;
3092
+ }
3093
+
3094
+ /**
3095
+ * Packs data to integer type.
3096
+ *
3097
+ * @param mixed $value Value to pack
3098
+ * @return integer Packed data
3099
+ */
3100
+ public static function packInteger($value) {
3101
+ return pack('N', $value);
3102
+ }
3103
+
3104
+ /**
3105
+ * Packs data to string type.
3106
+ *
3107
+ * @param mixed $value Value to pack
3108
+ * @return string Packed data
3109
+ */
3110
+ public static function packString($string, $length) {
3111
+ $result = '';
3112
+
3113
+ for($i = 0; $i < $length; $i++) {
3114
+ $result .= pack('c', ord(substr($string, $i, 1)));
3115
+ }
3116
+
3117
+ return $result;
3118
+ }
3119
+
3120
+ /**
3121
+ * Unpacks packed data from given type to something PHP understands.
3122
+ *
3123
+ * @param string $value Value to unpack
3124
+ * @param string $type Current type of the data
3125
+ * @return mixed Unpacked data
3126
+ */
3127
+ public static function unpack($value, $type) {
3128
+ switch ($type) {
3129
+ case Cassandra::TYPE_LONG:
3130
+ return self::unpackLong($value);
3131
+
3132
+ case Cassandra::TYPE_INTEGER:
3133
+ return self::unpackInteger($value);
3134
+
3135
+ case Cassandra::TYPE_ASCII:
3136
+ return self::unpackString($value, strlen($value));
3137
+
3138
+ case Cassandra::TYPE_UTF8:
3139
+ return self::unpackString($value, strlen($value));
3140
+
3141
+ case Cassandra::TYPE_TIME_UUID:
3142
+ return $value;
3143
+
3144
+ case Cassandra::TYPE_LEXICAL_UUID:
3145
+ return $value;
3146
+
3147
+ default:
3148
+ return $value;
3149
+ }
3150
+ }
3151
+
3152
+ /**
3153
+ * Unpacks long data type.
3154
+ *
3155
+ * @param mixed $data Data to unpack
3156
+ * @return integer Unpacked data
3157
+ */
3158
+ public static function unpackLong($data) {
3159
+ $arr = unpack('N2', $data);
3160
+
3161
+ // If we are on a 32bit architecture we have to explicitly deal with
3162
+ // 64-bit twos-complement arithmetic since PHP wants to treat all ints
3163
+ // as signed and any int over 2^31 - 1 as a float
3164
+ if (PHP_INT_SIZE == 4) {
3165
+
3166
+ $hi = $arr[1];
3167
+ $lo = $arr[2];
3168
+ $isNeg = $hi < 0;
3169
+
3170
+ // Check for a negative
3171
+ if ($isNeg) {
3172
+ $hi = ~$hi & (int)0xffffffff;
3173
+ $lo = ~$lo & (int)0xffffffff;
3174
+
3175
+ if ($lo == (int)0xffffffff) {
3176
+ $hi++;
3177
+ $lo = 0;
3178
+ } else {
3179
+ $lo++;
3180
+ }
3181
+ }
3182
+
3183
+ // Force 32bit words in excess of 2G to pe positive - we deal wigh
3184
+ // sign explicitly below
3185
+
3186
+ if ($hi & (int)0x80000000) {
3187
+ $hi &= (int)0x7fffffff;
3188
+ $hi += 0x80000000;
3189
+ }
3190
+
3191
+ if ($lo & (int)0x80000000) {
3192
+ $lo &= (int)0x7fffffff;
3193
+ $lo += 0x80000000;
3194
+ }
3195
+
3196
+ $value = $hi * 4294967296 + $lo;
3197
+
3198
+ if ($isNeg) {
3199
+ $value = 0 - $value;
3200
+ }
3201
+ } else {
3202
+ // Upcast negatives in LSB bit
3203
+ if ($arr[2] & 0x80000000)
3204
+ $arr[2] = $arr[2] & 0xffffffff;
3205
+
3206
+ // Check for a negative
3207
+ if ($arr[1] & 0x80000000) {
3208
+ $arr[1] = $arr[1] & 0xffffffff;
3209
+ $arr[1] = $arr[1] ^ 0xffffffff;
3210
+ $arr[2] = $arr[2] ^ 0xffffffff;
3211
+
3212
+ $value = 0 - $arr[1] * 4294967296 - $arr[2] - 1;
3213
+ } else {
3214
+ $value = $arr[1] * 4294967296 + $arr[2];
3215
+ }
3216
+ }
3217
+
3218
+ return $value;
3219
+ }
3220
+
3221
+ /**
3222
+ * Unpacks integer data type.
3223
+ *
3224
+ * @param mixed $data Data to unpack
3225
+ * @return integer Unpacked data
3226
+ */
3227
+ public static function unpackInteger($value) {
3228
+ $unpacked = unpack('N', $value);
3229
+
3230
+ return array_pop($unpacked);
3231
+ }
3232
+
3233
+ /**
3234
+ * Unpacks string data type.
3235
+ *
3236
+ * @param mixed $data Data to unpack
3237
+ * @return string Unpacked data
3238
+ */
3239
+ public static function unpackString($value, $length) {
3240
+ $unpacked = unpack('C'.$length.'chars', $value);
3241
+ $out = '';
3242
+
3243
+ foreach($unpacked as $element) {
3244
+ if($element > 0) {
3245
+ $out .= chr($element);
3246
+ }
3247
+ }
3248
+
3249
+ return $out;
3250
+ }
3251
+
3252
+ /**
3253
+ * Returns current timestamp that can be used in insert/update opearations.
3254
+ *
3255
+ * By Zach Buller (zachbuller@gmail.com)
3256
+ *
3257
+ * @return integer Unpacked data
3258
+ */
3259
+ public static function getTimestamp() {
3260
+ $microtime = microtime();
3261
+
3262
+ settype($microtime, 'string');
3263
+
3264
+ $timeTokens = explode(" ", $microtime);
3265
+ $subSeconds = preg_replace('/0./', '', $timeTokens[0], 1);
3266
+
3267
+ return ($timeTokens[1].$subSeconds) / 100;
3268
+ }
3269
+ }
3270
+
3271
+ /**
3272
+ * Cassandra iterator used for indexed and key range queries where there may be
3273
+ * more rows than is possible or reasonable to fetch in a single go so instead
3274
+ * an iterator is returned that fetches the data in batches as the data
3275
+ * is iterated.
3276
+ *
3277
+ * This is an abstract class with implementations for indexed and range queries.
3278
+ */
3279
+ abstract class CassandraDataIterator implements Iterator {
3280
+
3281
+ /**
3282
+ * Column family to read data from.
3283
+ *
3284
+ * @var CassandraColumnFamily
3285
+ */
3286
+ protected $columnFamily;
3287
+
3288
+ /**
3289
+ * Column parent definition.
3290
+ *
3291
+ * @var cassandra_ColumnParent
3292
+ */
3293
+ protected $columnParent;
3294
+
3295
+ /**
3296
+ * The slice predicate to use.
3297
+ *
3298
+ * @var cassandra_SlicePredicate
3299
+ */
3300
+ protected $slicePredicate;
3301
+
3302
+ /**
3303
+ * Consistency level to use.
3304
+ *
3305
+ * @var integer
3306
+ */
3307
+ protected $consistency;
3308
+
3309
+ /**
3310
+ * Maximum number or rows to fetch.
3311
+ *
3312
+ * Left null if the row count is not limited.
3313
+ *
3314
+ * @var integer|null
3315
+ */
3316
+ protected $rowCountLimit;
3317
+
3318
+ /**
3319
+ * How many rows to fetch in a single request.
3320
+ *
3321
+ * @var integer
3322
+ */
3323
+ protected $bufferSize;
3324
+
3325
+ /**
3326
+ * Current buffer of data.
3327
+ *
3328
+ * @var array
3329
+ */
3330
+ protected $buffer;
3331
+
3332
+ /**
3333
+ * The initial start key, used to rewing.
3334
+ *
3335
+ * @var string
3336
+ */
3337
+ protected $originalStartKey;
3338
+
3339
+ /**
3340
+ * Next key to start fetching data from.
3341
+ *
3342
+ * @var string
3343
+ */
3344
+ protected $nextStartKey;
3345
+
3346
+ /**
3347
+ * Is the iterator currently valid, ready to give out more data.
3348
+ *
3349
+ * @var boolean
3350
+ */
3351
+ protected $isValid;
3352
+
3353
+ /**
3354
+ * Counter of how many rows the iterator has seen so far.
3355
+ *
3356
+ * @var integer
3357
+ */
3358
+ protected $rowsSeen;
3359
+
3360
+ /**
3361
+ * Expected page size.
3362
+ *
3363
+ * @var integer
3364
+ */
3365
+ protected $expectedPageSize;
3366
+
3367
+ /**
3368
+ * Actual current page size.
3369
+ *
3370
+ * @var integer
3371
+ */
3372
+ protected $currentPageSize;
3373
+
3374
+ /**
3375
+ * Sets the information needed to iterate the data in batches.
3376
+ *
3377
+ * @param CassandraColumnFamily $columnFamily Column family
3378
+ * @param cassandra_ColumnParent $columnParent Parent column
3379
+ * @param cassandra_SlicePredicate $slicePredicate Slice predicate
3380
+ * @param type $startKey Key to start fetching data from
3381
+ * @param type $consistency Consistency to use
3382
+ * @param type $rowCountLimit Maximum number or rows to fetch
3383
+ * @param type $bufferSize How many rows to fetch in a single request
3384
+ */
3385
+ public function __construct(
3386
+ CassandraColumnFamily $columnFamily,
3387
+ cassandra_ColumnParent $columnParent,
3388
+ cassandra_SlicePredicate $slicePredicate,
3389
+ $startKey,
3390
+ $consistency,
3391
+ $rowCountLimit,
3392
+ $bufferSize
3393
+ ) {
3394
+ $this->columnFamily = $columnFamily;
3395
+ $this->columnParent = $columnParent;
3396
+ $this->slicePredicate = $slicePredicate;
3397
+ $this->consistency = $consistency;
3398
+ $this->rowCountLimit = $rowCountLimit;
3399
+ $this->bufferSize = $bufferSize;
3400
+ $this->originalStartKey = $startKey;
3401
+ $this->nextStartKey = $startKey;
3402
+ $this->buffer = null;
3403
+
3404
+ if ($rowCountLimit !== null) {
3405
+ $this->bufferSize = min($rowCountLimit, $bufferSize);
3406
+ }
3407
+ }
3408
+
3409
+ /**
3410
+ * Returns the current element in the array.
3411
+ *
3412
+ * @return mixed
3413
+ */
3414
+ public function current() {
3415
+ return current($this->buffer);
3416
+ }
3417
+
3418
+ /**
3419
+ * Returns the key of the array element that's currently being pointed to by
3420
+ * the internal pointer.
3421
+ *
3422
+ * If the internal pointer points beyond the end of the elements list or the
3423
+ * array is empty, returns NULL.
3424
+ *
3425
+ * @return mixed
3426
+ */
3427
+ public function key() {
3428
+ return key($this->buffer);
3429
+ }
3430
+
3431
+ /**
3432
+ * Advances the internal array pointer one place forward before returning
3433
+ * the element value.
3434
+ *
3435
+ * @return mixed Next array value
3436
+ */
3437
+ public function next() {
3438
+ $value = null;
3439
+ $beyondLastRow = false;
3440
+
3441
+ if (!empty($this->buffer)) {
3442
+ $this->nextStartKey = key($this->buffer);
3443
+
3444
+ $value = next($this->buffer);
3445
+
3446
+ if (count(current($this->buffer)) == 0) {
3447
+ $this->next();
3448
+ } else {
3449
+ $key = key($this->buffer);
3450
+
3451
+ if (isset($key)) {
3452
+ $this->rowsSeen++;
3453
+
3454
+ if (
3455
+ $this->rowCountLimit !== null
3456
+ && $this->rowsSeen > $this->rowCountLimit
3457
+ ) {
3458
+ $this->isValid = false;
3459
+
3460
+ return null;
3461
+ }
3462
+ } else {
3463
+ $beyondLastRow = true;
3464
+ }
3465
+ }
3466
+ } else {
3467
+ $beyondLastRow = true;
3468
+ }
3469
+
3470
+ if ($beyondLastRow) {
3471
+ if ($this->currentPageSize < $this->expectedPageSize) {
3472
+ $this->isValid = false;
3473
+ } else {
3474
+ $this->updateBuffer();
3475
+
3476
+ if (count($this->buffer) == 1) {
3477
+ $this->isValid = false;
3478
+ } else {
3479
+ $this->next();
3480
+ }
3481
+ }
3482
+ }
3483
+
3484
+ return $value;
3485
+ }
3486
+
3487
+ /**
3488
+ * Rewinds the iterator internal pointer back to the beginning.
3489
+ *
3490
+ * @return void
3491
+ */
3492
+ public function rewind() {
3493
+ $this->rowsSeen = 0;
3494
+ $this->isValid = true;
3495
+ $this->nextStartKey = $this->originalStartKey;
3496
+
3497
+ $this->updateBuffer();
3498
+
3499
+ if (count($this->buffer) == 0) {
3500
+ $this->isValid = false;
3501
+
3502
+ return;
3503
+ }
3504
+
3505
+ if (count(current($this->buffer)) == 0) {
3506
+ $this->next();
3507
+ } else {
3508
+ $this->rowsSeen++;
3509
+ }
3510
+ }
3511
+
3512
+ /**
3513
+ * Returns whether the iterator is still valid and has more data.
3514
+ *
3515
+ * @return boolean
3516
+ */
3517
+ public function valid() {
3518
+ return $this->isValid;
3519
+ }
3520
+
3521
+ /**
3522
+ * Iterates over the whole matches data set and compiles the results into a
3523
+ * single array.
3524
+ *
3525
+ * Only use this if you are not expecting many thousand of lines as it can
3526
+ * get slow and require lots of memory.
3527
+ *
3528
+ * @return array
3529
+ */
3530
+ public function getAll() {
3531
+ $results = array();
3532
+
3533
+ $this->rewind();
3534
+
3535
+ while ($this->valid()) {
3536
+ $key = $this->key();
3537
+ $value = $this->current();
3538
+
3539
+ $results[$key] = $value;
3540
+
3541
+ $this->next();
3542
+ }
3543
+
3544
+ return $results;
3545
+ }
3546
+
3547
+ /**
3548
+ * Updates the internal buffer, fetching a new batch of data.
3549
+ *
3550
+ * @return void
3551
+ */
3552
+ abstract protected function updateBuffer();
3553
+ }
3554
+
3555
+ /**
3556
+ * Indexed data iterator, used when performing where-queries.
3557
+ */
3558
+ class CassandraIndexedDataIterator extends CassandraDataIterator {
3559
+
3560
+ /**
3561
+ * The index clause to use.
3562
+ *
3563
+ * @var cassandra_IndexClause
3564
+ */
3565
+ protected $indexClause;
3566
+
3567
+ /**
3568
+ * Sets the information needed to iterate the data in batches.
3569
+ *
3570
+ * @param CassandraColumnFamily $columnFamily Column family
3571
+ * @param cassandra_ColumnParent $columnParent Parent column
3572
+ * @param cassandra_IndexClause $indexClause The index clause to use
3573
+ * @param cassandra_SlicePredicate $slicePredicate Slice predicate
3574
+ * @param type $startKey Key to start fetching data from
3575
+ * @param type $consistency Consistency to use
3576
+ * @param type $rowCountLimit Maximum number or rows to fetch
3577
+ * @param type $bufferSize How many rows to fetch in a single request
3578
+ */
3579
+ public function __construct(
3580
+ CassandraColumnFamily $columnFamily,
3581
+ cassandra_ColumnParent $columnParent,
3582
+ cassandra_IndexClause $indexClause,
3583
+ cassandra_SlicePredicate $slicePredicate,
3584
+ $consistency,
3585
+ $rowCountLimit,
3586
+ $bufferSize
3587
+ ) {
3588
+ parent::__construct(
3589
+ $columnFamily,
3590
+ $columnParent,
3591
+ $slicePredicate,
3592
+ $indexClause->start_key,
3593
+ $consistency,
3594
+ $rowCountLimit,
3595
+ $bufferSize
3596
+ );
3597
+
3598
+ $this->indexClause = $indexClause;
3599
+ }
3600
+
3601
+ /**
3602
+ * Updates the internal buffer, fetching new indexed data.
3603
+ *
3604
+ * @return void
3605
+ */
3606
+ protected function updateBuffer() {
3607
+ if ($this->rowCountLimit !== null) {
3608
+ $this->indexClause->count = min(
3609
+ $this->rowCountLimit - $this->rowsSeen + 1,
3610
+ $this->bufferSize
3611
+ );
3612
+ } else {
3613
+ $this->indexClause->count = $this->bufferSize;
3614
+ }
3615
+
3616
+ $this->expectedPageSize = $this->indexClause->count;
3617
+ $this->indexClause->start_key = $this->nextStartKey;
3618
+
3619
+ $result = $this->columnFamily->getCassandra()->call(
3620
+ 'get_indexed_slices',
3621
+ $this->columnParent,
3622
+ $this->indexClause,
3623
+ $this->slicePredicate,
3624
+ $this->consistency
3625
+ );
3626
+
3627
+ if (count($result) == 0) {
3628
+ $this->buffer = array();
3629
+ } else {
3630
+ $this->buffer = $this->columnFamily->parseSlicesResponse($result);
3631
+ }
3632
+
3633
+ $this->currentPageSize = count($this->buffer);
3634
+ }
3635
+ }
3636
+
3637
+ /**
3638
+ * Key range data iterator.
3639
+ */
3640
+ class CassandraRangeDataIterator extends CassandraDataIterator {
3641
+
3642
+ /**
3643
+ * Start key to begin iterating from.
3644
+ *
3645
+ * @var string
3646
+ */
3647
+ protected $startKey;
3648
+
3649
+ /**
3650
+ * End key to iterate to.
3651
+ *
3652
+ * @var string
3653
+ */
3654
+ protected $endKey;
3655
+
3656
+ /**
3657
+ * Sets the information needed to iterate the data in batches.
3658
+ *
3659
+ * @param CassandraColumnFamily $columnFamily Column family
3660
+ * @param cassandra_ColumnParent $columnParent Parent column
3661
+ * @param cassandra_SlicePredicate $slicePredicate Slice predicate
3662
+ * @param type $startKey Key to start fetching data from
3663
+ * @param type $emdKey Last key to fetch in a range
3664
+ * @param type $consistency Consistency to use
3665
+ * @param type $rowCountLimit Maximum number or rows to fetch
3666
+ * @param type $bufferSize How many rows to fetch in a single request
3667
+ */
3668
+ public function __construct(
3669
+ CassandraColumnFamily $columnFamily,
3670
+ cassandra_ColumnParent $columnParent,
3671
+ cassandra_SlicePredicate $slicePredicate,
3672
+ $startKey,
3673
+ $endKey,
3674
+ $consistency,
3675
+ $rowCountLimit,
3676
+ $bufferSize
3677
+ ) {
3678
+ parent::__construct(
3679
+ $columnFamily,
3680
+ $columnParent,
3681
+ $slicePredicate,
3682
+ $startKey,
3683
+ $consistency,
3684
+ $rowCountLimit,
3685
+ $bufferSize
3686
+ );
3687
+
3688
+ $this->startKey = $startKey;
3689
+ $this->endKey = $endKey;
3690
+ }
3691
+
3692
+ /**
3693
+ * Updates the internal buffer, fetching new ranged data.
3694
+ *
3695
+ * @return void
3696
+ */
3697
+ protected function updateBuffer() {
3698
+ $bufferSize = $this->bufferSize;
3699
+
3700
+ if ($this->rowCountLimit !== null) {
3701
+ $bufferSize = min(
3702
+ $this->rowCountLimit - $this->rowsSeen + 1,
3703
+ $this->bufferSize
3704
+ );
3705
+ }
3706
+
3707
+ $this->expectedPageSize = $bufferSize;
3708
+
3709
+ $keyRange = new cassandra_KeyRange();
3710
+ $keyRange->start_key = $this->nextStartKey;
3711
+ $keyRange->end_key = $this->endKey;
3712
+ $keyRange->count = $bufferSize;
3713
+
3714
+ $result = $this->columnFamily->getCassandra()->call(
3715
+ 'get_range_slices',
3716
+ $this->columnParent,
3717
+ $this->slicePredicate,
3718
+ $keyRange,
3719
+ $this->consistency
3720
+ );
3721
+
3722
+ $this->buffer = $this->columnFamily->parseSlicesResponse($result);
3723
+ $this->currentPageSize = count($this->buffer);
3724
+ }
3725
+ }
3726
+
3727
+ /**
3728
+ * Thrown if maximum number of call retries is exceeded.
3729
+ */
3730
+ class CassandraMaxRetriesException extends Exception {};
3731
+
3732
+ /**
3733
+ * Throws if trying to fetch the client of a connection but the connection has
3734
+ * been closed.
3735
+ */
3736
+ class CassandraConnectionClosedException extends Exception {};
3737
+
3738
+ /**
3739
+ * Thrown if no Cassandra connection could be opened.
3740
+ */
3741
+ class CassandraConnectionFailedException extends Exception {};
3742
+
3743
+ /**
3744
+ * Thrown if using the requested keyspace failed.
3745
+ */
3746
+ class CassandraSettingKeyspaceFailedException extends Exception {};
3747
+
3748
+ /**
3749
+ * Thrown if the requested column family does not exist.
3750
+ */
3751
+ class CassandraColumnFamilyNotFoundException extends Exception {};
3752
+
3753
+ /**
3754
+ * Thrown if any kind of invalid parameters are provided.
3755
+ */
3756
+ class CassandraInvalidRequestException extends Exception {};
3757
+
3758
+ /**
3759
+ * Thrown if the {@see Cassandra::get()} request pattern is invalid.
3760
+ */
3761
+ class CassandraInvalidPatternException extends Exception {};
3762
+
3763
+ /**
3764
+ * Thrown if requested method is not supported by Cassandra or this library
3765
+ */
3766
+ class CassandraUnsupportedException extends Exception {};
app/code/community/Meta/Cassandra/Model/Adapter/Libs/CassandraModel.php ADDED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cassandra-PHP-Client Library (CPCL).
4
+ *
5
+ * Cassandra PHP-based client library for managing and querying your Cassandra
6
+ * cluster. It's a high-level library performing all the rather complex
7
+ * low-level lifting and providing a simple to learn and use interface.
8
+ *
9
+ * Includes ideas and code snippets from PHPCassa project.
10
+ *
11
+ * Copyright (C) 2011 by Priit Kallas <kallaspriit@gmail.com>
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ * copies of the Software, and to permit persons to whom the Software is
18
+ * furnished to do so, subject to the following conditions:
19
+
20
+ * The above copyright notice and this permission notice shall be included in
21
+ * all copies or substantial portions of the Software.
22
+
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+ * THE SOFTWARE.
30
+ *
31
+ * @author Priit Kallas <kallaspriit@gmail.com>
32
+ * @package Cassandra
33
+ * @version 1.0
34
+ */
35
+
36
+ /**
37
+ * Provides an abstraction layer on top of Cassandra where you can extend this
38
+ * class where the class name determines the column-family name and public
39
+ * members the columns.
40
+ */
41
+ class CassandraModel {
42
+
43
+ /**
44
+ * Default connection to use.
45
+ *
46
+ * @var Cassandra
47
+ */
48
+ protected static $_defaultConnection;
49
+
50
+ /**
51
+ * Active connection.
52
+ *
53
+ * @var Cassandra
54
+ */
55
+ protected $_connection;
56
+
57
+ /**
58
+ * Row key
59
+ *
60
+ * @var string
61
+ */
62
+ protected $_key;
63
+
64
+ /**
65
+ * Constructor, optionally sets the row key and connection to use.
66
+ *
67
+ * If no connection is given, uses the default connection that you should
68
+ * set once using CassandraModel::setDefaultConnection().
69
+ *
70
+ * @param string $key Optional row key if creating a new entry
71
+ * @param Cassandra $connection Connection to use instead of default
72
+ */
73
+ public function __construct($key = null, Cassandra $connection = null) {
74
+ $this->_key = $key;
75
+
76
+ if ($connection !== null) {
77
+ $this->setConnection($connection);
78
+ } else {
79
+ $this->_connection = self::$_defaultConnection;
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Static method to get an instance of the class.
85
+ *
86
+ * Optionally sets the row key and connection to use. If no connection is
87
+ * given, uses the default connection that you should set once using
88
+ * CassandraModel::setDefaultConnection().
89
+ *
90
+ * @param string $key Optional row key if creating a new entry
91
+ * @param Cassandra $connection Connection to use instead of default
92
+ * @return CassandraModel Called class instance
93
+ */
94
+ public static function getInstance(
95
+ $key = null,
96
+ Cassandra $connection = null
97
+ ) {
98
+ $className = get_called_class();
99
+
100
+ return new $className($key, $connection);
101
+ }
102
+
103
+ /**
104
+ * Sets the default Cassandra connection to use.
105
+ *
106
+ * You will usually call it once during boostrapping so you wouldn't need
107
+ * to set it again every time in constructor or the static methods.
108
+ *
109
+ * @param Cassandra $connection Connection to use by default
110
+ */
111
+ public static function setDefaultConnection(Cassandra $connection) {
112
+ self::$_defaultConnection = $connection;
113
+ }
114
+
115
+ /**
116
+ * Returns the current default connection.
117
+ *
118
+ * @return Cassandra
119
+ */
120
+ public static function getDefaultConnection() {
121
+ return self::$_defaultConnection;
122
+ }
123
+
124
+ /**
125
+ * Overrides the default connection for current instance.
126
+ *
127
+ * @param Cassandra $connection Connection to use
128
+ */
129
+ public function setConnection(Cassandra $connection) {
130
+ $this->_connection = $connection;
131
+ }
132
+
133
+ /**
134
+ * Returns current instance Cassandra connection.
135
+ *
136
+ * @return Cassandra
137
+ */
138
+ public function getConnection() {
139
+ return $this->_connection;
140
+ }
141
+
142
+ /**
143
+ * Populates model with data.
144
+ *
145
+ * Array keys should match model public members.
146
+ *
147
+ * @param array $data Data to use
148
+ * @return CassandraModel Self for chaining
149
+ */
150
+ public function populate(array $data) {
151
+ foreach ($data as $key => $value) {
152
+ $this->$key = $value;
153
+ }
154
+
155
+ return $this;
156
+ }
157
+
158
+ /**
159
+ * Returns the row key, also setting it if key is provided.
160
+ *
161
+ * @param string $newKey Optioal new key to use
162
+ * @return string Active row key
163
+ */
164
+ public function key($newKey = null) {
165
+ if (isset($newKey)) {
166
+ $this->_key = $newKey;
167
+ }
168
+
169
+ return $this->_key;
170
+ }
171
+
172
+ /**
173
+ * Returns model data as an associative array.
174
+ *
175
+ * @return array
176
+ */
177
+ public function getData() {
178
+ $columns = $this->getSetColumnNames();
179
+ $data = array();
180
+
181
+ foreach ($columns as $column) {
182
+ $data[$column] = $this->$column;
183
+ }
184
+
185
+ return $data;
186
+ }
187
+
188
+ /**
189
+ * Loads data into the model by row key.
190
+ *
191
+ * Returns the model instance if entry was found and null otherwise.
192
+ *
193
+ * @param mixed $rowKey Value of the row key to find item by.
194
+ * @param integer $consistency Option override of default consistency level
195
+ * @param Cassandra $connection If not set, the default connection is used
196
+ * @return CassandraModel|null Model instance or null if not found
197
+ */
198
+ public static function load(
199
+ $rowKey,
200
+ $consistency = null,
201
+ Cassandra $connection = null
202
+ ) {
203
+ $columnFamily = self::getColumnFamilyName();
204
+ $columns = self::getColumnNames();
205
+
206
+ if (!isset($connection)) {
207
+ $connection = self::$_defaultConnection;
208
+ }
209
+
210
+ if (empty($columns)) {
211
+ $columns = null;
212
+ }
213
+
214
+ $supercolumn = null;
215
+ $dotPos = mb_strpos($rowKey, '.');
216
+
217
+ if ($dotPos !== false) {
218
+ $supercolumn = mb_substr($rowKey, $dotPos + 1);
219
+ $rowKey = mb_substr($rowKey, 0, $dotPos);
220
+ }
221
+
222
+ $data = $connection->cf($columnFamily)->get(
223
+ $rowKey,
224
+ $columns,
225
+ null,
226
+ null,
227
+ false,
228
+ 100,
229
+ $supercolumn,
230
+ $consistency
231
+ );
232
+
233
+ if ($data !== null) {
234
+ $instance = self::getInstance();
235
+ $instance->populate($data);
236
+ $instance->_key = $rowKey;
237
+ $instance->setConnection($connection);
238
+
239
+ return $instance;
240
+ } else {
241
+ return null;
242
+ }
243
+ }
244
+
245
+ /**
246
+ * Returns a range of rows.
247
+ *
248
+ * This is available only when using the order preserving partitioner. Can
249
+ * be used to paginate data etc. Returns an iterator that fetches the data
250
+ * from the database in chunks.
251
+ *
252
+ * @param string $startKey Starting key, null to start with first
253
+ * @param string $endKey Ending key, null for all
254
+ * @param integer $consistency Option override of default consistency level
255
+ * @param Cassandra $connection If not set, the default connection is used
256
+ * @return CassandraRangeDataIterator Key range iterator
257
+ */
258
+ public static function getKeyRange(
259
+ $startKey = null,
260
+ $endKey = null,
261
+ $consistency = null,
262
+ Cassandra $connection = null
263
+ ) {
264
+ $columnFamily = self::getColumnFamilyName();
265
+ $columns = self::getColumnNames();
266
+
267
+ if (!isset($connection)) {
268
+ $connection = self::$_defaultConnection;
269
+ }
270
+
271
+ return $connection->cf($columnFamily)->getKeyRange(
272
+ $startKey,
273
+ $endKey,
274
+ null,
275
+ $columns,
276
+ null,
277
+ null,
278
+ false,
279
+ 100,
280
+ null,
281
+ $consistency,
282
+ 100
283
+ );
284
+ }
285
+
286
+ /**
287
+ * Returns all columns for given row key.
288
+ *
289
+ * @param string $rowKey Row key to get data from
290
+ * @param Cassandra $connection If not set, the default connection is used
291
+ * @return array
292
+ */
293
+ public static function getAll($rowKey, Cassandra $connection = null) {
294
+ if (!isset($connection)) {
295
+ $connection = self::$_defaultConnection;
296
+ }
297
+
298
+ $columnFamily = self::getColumnFamilyName();
299
+
300
+ return $connection->cf($columnFamily)->getAll($rowKey);
301
+ }
302
+
303
+ /**
304
+ * Returns a range of columns for a key.
305
+ *
306
+ * @param string $key Row key
307
+ * @param string $startColumn Starting column, null for first
308
+ * @param string $endColumn Ending column, null for last
309
+ * @param integer $limit Maximum number of columns to return
310
+ * @param integer $consistency Consistency to use, null for default
311
+ * @param Cassandra $connection Connection to use
312
+ * @return array Columns of data in given range up to given limit items
313
+ */
314
+ public static function getColumnRange(
315
+ $key,
316
+ $startColumn = null,
317
+ $endColumn = null,
318
+ $limit = 100,
319
+ $consistency = null,
320
+ Cassandra $connection = null
321
+ ) {
322
+ $columnFamily = self::getColumnFamilyName();
323
+
324
+ if (!isset($connection)) {
325
+ $connection = self::$_defaultConnection;
326
+ }
327
+
328
+ return $connection->cf($columnFamily)->get(
329
+ $key,
330
+ null,
331
+ $startColumn,
332
+ $endColumn,
333
+ false,
334
+ $limit,
335
+ null,
336
+ $consistency
337
+ );
338
+ }
339
+
340
+ /**
341
+ * Saves the row into the database.
342
+ *
343
+ * You can set a new key for the row and also populate the model with data
344
+ * if you haven't done so already.
345
+ *
346
+ * You may also set the consistency if you like it to be something else from
347
+ * tge default of Cassandra::CONSISTENCY_ONE
348
+ *
349
+ * @param string $newKey Optional new row key
350
+ * @param array $populate Optionally populate the model with data
351
+ * @param integer $consistency Option override of default consistency level
352
+ * @return boolean Was saving the entry successful
353
+ */
354
+ public function save(
355
+ $newKey = null,
356
+ array $populate = null,
357
+ $consistency = null
358
+ ) {
359
+ if (isset($newKey)) {
360
+ $this->_key = $newKey;
361
+ }
362
+
363
+ if (is_array($populate)) {
364
+ $this->populate($populate);
365
+ }
366
+
367
+ $columnFamily = self::getColumnFamilyName();
368
+
369
+ $this->_connection->cf($columnFamily)->set(
370
+ $this->_key,
371
+ $this->getData(),
372
+ $consistency
373
+ );
374
+
375
+ return true;
376
+ }
377
+
378
+ /**
379
+ * Inserts a new row into the database.
380
+ *
381
+ * This is a convenience proxy to creating an instance of the model,
382
+ * populating it and calling save().
383
+ *
384
+ * @param string $key Row key to use
385
+ * @param array $data Data to populate the model with
386
+ * @param integer $consistency Option override of default consistency level
387
+ * @param Cassandra $connection If not set, the default connection is used
388
+ * @return boolean Was adding the entry successful
389
+ */
390
+ public static function insert(
391
+ $key,
392
+ array $data,
393
+ $consistency = null,
394
+ Cassandra $connection = null
395
+ ) {
396
+ return self::getInstance(null, $connection)->save(
397
+ $key, $data, $consistency
398
+ );
399
+ }
400
+
401
+ /**
402
+ * Removes an entry or some columns of it.
403
+ *
404
+ * If the columns is left to null, the entire row is deleted.
405
+ *
406
+ * If you already have an instance of the model, use delete().
407
+ *
408
+ * @param string $key Row key to delete
409
+ * @param array $columns Optional columns to delete
410
+ * @param integer $consistency Option override of default consistency level
411
+ * @param Cassandra $connection If not set, the default connection is used
412
+ * @return boolean Was removing the entry successful
413
+ */
414
+ public static function remove(
415
+ $key,
416
+ array $columns = null,
417
+ $consistency = null,
418
+ Cassandra $connection = null
419
+ ) {
420
+ $model = self::getInstance($key, $connection);
421
+
422
+ return $model->delete($columns, $consistency);
423
+ }
424
+
425
+ /**
426
+ * Removes a supercolumn entry or some columns of it.
427
+ *
428
+ * If the columns is left to null, the entire row is deleted.
429
+ *
430
+ * If you already have an instance of the model, use deleteSuper().
431
+ *
432
+ * @param string $key Row key to delete
433
+ * @param string $supercolumn Supercolumn name
434
+ * @param array $columns Optional columns to delete
435
+ * @param integer $consistency Option override of default consistency level
436
+ * @param Cassandra $connection If not set, the default connection is used
437
+ * @return boolean Was removing the entry successful
438
+ */
439
+ public static function removeSuper(
440
+ $key,
441
+ $supercolumn,
442
+ array $columns = null,
443
+ $consistency = null,
444
+ Cassandra $connection = null
445
+ ) {
446
+ $model = self::getInstance($key, $connection);
447
+
448
+ return $model->deleteSuper($supercolumn, $columns, $consistency);
449
+ }
450
+
451
+ /**
452
+ * Removes an entry or some columns of it.
453
+ *
454
+ * If the columns is left to null, the entire row is deleted.
455
+ *
456
+ * Uses the currently set row key, you can change it with key() method.
457
+ *
458
+ * You can remove a row by calling remove() statically.
459
+ *
460
+ * @param array $columns Optional columns to delete
461
+ * @param integer $consistency Option override of default consistency level
462
+ * @return boolean Was removing the entry successful
463
+ */
464
+ public function delete(array $columns = null, $consistency = null) {
465
+ $columnFamily = self::getColumnFamilyName();
466
+
467
+ $this->_connection->cf($columnFamily)->remove(
468
+ $this->_key,
469
+ $columns,
470
+ null,
471
+ $consistency
472
+ );
473
+
474
+ return true;
475
+ }
476
+
477
+ /**
478
+ * Removes an supercolumn entry or some columns of it.
479
+ *
480
+ * If the columns is left to null, the entire row is deleted.
481
+ *
482
+ * Uses the currently set row key, you can change it with key() method.
483
+ *
484
+ * You can remove a row by calling removeSuper() statically.
485
+ *
486
+ * @param array $columns Optional columns to delete
487
+ * @param integer $consistency Option override of default consistency level
488
+ * @return boolean Was removing the entry successful
489
+ */
490
+ public function deleteSuper($supercolumn, array $columns = null, $consistency = null) {
491
+ $columnFamily = self::getColumnFamilyName();
492
+
493
+ $this->_connection->cf($columnFamily)->remove(
494
+ $this->_key,
495
+ $columns,
496
+ $supercolumn,
497
+ $consistency
498
+ );
499
+
500
+ return true;
501
+ }
502
+
503
+ /**
504
+ * Returns the column family name that corresponds to given model class.
505
+ *
506
+ * The transformation is done in following steps:
507
+ * 1. remove "Model" from the end of class name
508
+ * 2. add a underscore before every upper-case word except first
509
+ * 3. make everything lowercase
510
+ *
511
+ * So for example, class names to table names:
512
+ * - UserModel > user
513
+ * - ForumTopicsModel > forum_topics
514
+ *
515
+ * @return string The table name
516
+ */
517
+ public static function getColumnFamilyName() {
518
+ $className = get_called_class();
519
+
520
+ $components = preg_split(
521
+ '/([A-Z][^A-Z]*)/',
522
+ substr($className, 0, -5),
523
+ -1,
524
+ PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
525
+ );
526
+
527
+ return mb_strtolower(implode('_', $components));
528
+ }
529
+
530
+ /**
531
+ * Returns the column names of the model.
532
+ *
533
+ * The column names are determined from public class vars.
534
+ *
535
+ * @return array
536
+ */
537
+ public static function getColumnNames() {
538
+ return array_keys(
539
+ get_class_public_vars(get_called_class())
540
+ );
541
+ }
542
+
543
+ /**
544
+ * Returns the column names of the model that have been set for current
545
+ * object.
546
+ *
547
+ * The column names are determined from public object vars.
548
+ *
549
+ * @return array
550
+ */
551
+ public function getSetColumnNames() {
552
+ return array_keys(get_object_public_vars($this));
553
+ }
554
+
555
+ }
556
+
557
+ if (!function_exists('get_class_public_vars')) {
558
+ /**
559
+ * Returns publicly available properties of a class.
560
+ *
561
+ * @param string $class_name Class name
562
+ * @return array Public var names
563
+ */
564
+ function get_class_public_vars($class_name) {
565
+ return get_class_vars($class_name);
566
+ }
567
+ }
568
+
569
+ if (!function_exists('get_object_public_vars')) {
570
+ /**
571
+ * Returns publicly available properties of an object.
572
+ *
573
+ * @param object $object Object to probe
574
+ * @return array Public var names
575
+ */
576
+ function get_object_public_vars($object) {
577
+ return get_object_vars($object);
578
+ }
579
+ }
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/Thrift.php ADDED
@@ -0,0 +1,787 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ *
20
+ * @package thrift
21
+ */
22
+
23
+
24
+ /**
25
+ * Data types that can be sent via Thrift
26
+ */
27
+ class TType {
28
+ const STOP = 0;
29
+ const VOID = 1;
30
+ const BOOL = 2;
31
+ const BYTE = 3;
32
+ const I08 = 3;
33
+ const DOUBLE = 4;
34
+ const I16 = 6;
35
+ const I32 = 8;
36
+ const I64 = 10;
37
+ const STRING = 11;
38
+ const UTF7 = 11;
39
+ const STRUCT = 12;
40
+ const MAP = 13;
41
+ const SET = 14;
42
+ const LST = 15; // N.B. cannot use LIST keyword in PHP!
43
+ const UTF8 = 16;
44
+ const UTF16 = 17;
45
+ }
46
+
47
+ /**
48
+ * Message types for RPC
49
+ */
50
+ class TMessageType {
51
+ const CALL = 1;
52
+ const REPLY = 2;
53
+ const EXCEPTION = 3;
54
+ const ONEWAY = 4;
55
+ }
56
+
57
+ /**
58
+ * NOTE(mcslee): This currently contains a ton of duplicated code from TBase
59
+ * because we need to save CPU cycles and this is not yet in an extension.
60
+ * Ideally we'd multiply-inherit TException from both Exception and Base, but
61
+ * that's not possible in PHP and there are no modules either, so for now we
62
+ * apologetically take a trip to HackTown.
63
+ *
64
+ * Can be called with standard Exception constructor (message, code) or with
65
+ * Thrift Base object constructor (spec, vals).
66
+ *
67
+ * @param mixed $p1 Message (string) or type-spec (array)
68
+ * @param mixed $p2 Code (integer) or values (array)
69
+ */
70
+ class TException extends Exception {
71
+ function __construct($p1=null, $p2=0) {
72
+ if (is_array($p1) && is_array($p2)) {
73
+ $spec = $p1;
74
+ $vals = $p2;
75
+ foreach ($spec as $fid => $fspec) {
76
+ $var = $fspec['var'];
77
+ if (isset($vals[$var])) {
78
+ $this->$var = $vals[$var];
79
+ }
80
+ }
81
+ } else {
82
+ parent::__construct($p1, $p2);
83
+ }
84
+ }
85
+
86
+ static $tmethod = array(TType::BOOL => 'Bool',
87
+ TType::BYTE => 'Byte',
88
+ TType::I16 => 'I16',
89
+ TType::I32 => 'I32',
90
+ TType::I64 => 'I64',
91
+ TType::DOUBLE => 'Double',
92
+ TType::STRING => 'String');
93
+
94
+ private function _readMap(&$var, $spec, $input) {
95
+ $xfer = 0;
96
+ $ktype = $spec['ktype'];
97
+ $vtype = $spec['vtype'];
98
+ $kread = $vread = null;
99
+ if (isset(TBase::$tmethod[$ktype])) {
100
+ $kread = 'read'.TBase::$tmethod[$ktype];
101
+ } else {
102
+ $kspec = $spec['key'];
103
+ }
104
+ if (isset(TBase::$tmethod[$vtype])) {
105
+ $vread = 'read'.TBase::$tmethod[$vtype];
106
+ } else {
107
+ $vspec = $spec['val'];
108
+ }
109
+ $var = array();
110
+ $_ktype = $_vtype = $size = 0;
111
+ $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
112
+ for ($i = 0; $i < $size; ++$i) {
113
+ $key = $val = null;
114
+ if ($kread !== null) {
115
+ $xfer += $input->$kread($key);
116
+ } else {
117
+ switch ($ktype) {
118
+ case TType::STRUCT:
119
+ $class = $kspec['class'];
120
+ $key = new $class();
121
+ $xfer += $key->read($input);
122
+ break;
123
+ case TType::MAP:
124
+ $xfer += $this->_readMap($key, $kspec, $input);
125
+ break;
126
+ case TType::LST:
127
+ $xfer += $this->_readList($key, $kspec, $input, false);
128
+ break;
129
+ case TType::SET:
130
+ $xfer += $this->_readList($key, $kspec, $input, true);
131
+ break;
132
+ }
133
+ }
134
+ if ($vread !== null) {
135
+ $xfer += $input->$vread($val);
136
+ } else {
137
+ switch ($vtype) {
138
+ case TType::STRUCT:
139
+ $class = $vspec['class'];
140
+ $val = new $class();
141
+ $xfer += $val->read($input);
142
+ break;
143
+ case TType::MAP:
144
+ $xfer += $this->_readMap($val, $vspec, $input);
145
+ break;
146
+ case TType::LST:
147
+ $xfer += $this->_readList($val, $vspec, $input, false);
148
+ break;
149
+ case TType::SET:
150
+ $xfer += $this->_readList($val, $vspec, $input, true);
151
+ break;
152
+ }
153
+ }
154
+ $var[$key] = $val;
155
+ }
156
+ $xfer += $input->readMapEnd();
157
+ return $xfer;
158
+ }
159
+
160
+ private function _readList(&$var, $spec, $input, $set=false) {
161
+ $xfer = 0;
162
+ $etype = $spec['etype'];
163
+ $eread = $vread = null;
164
+ if (isset(TBase::$tmethod[$etype])) {
165
+ $eread = 'read'.TBase::$tmethod[$etype];
166
+ } else {
167
+ $espec = $spec['elem'];
168
+ }
169
+ $var = array();
170
+ $_etype = $size = 0;
171
+ if ($set) {
172
+ $xfer += $input->readSetBegin($_etype, $size);
173
+ } else {
174
+ $xfer += $input->readListBegin($_etype, $size);
175
+ }
176
+ for ($i = 0; $i < $size; ++$i) {
177
+ $elem = null;
178
+ if ($eread !== null) {
179
+ $xfer += $input->$eread($elem);
180
+ } else {
181
+ $espec = $spec['elem'];
182
+ switch ($etype) {
183
+ case TType::STRUCT:
184
+ $class = $espec['class'];
185
+ $elem = new $class();
186
+ $xfer += $elem->read($input);
187
+ break;
188
+ case TType::MAP:
189
+ $xfer += $this->_readMap($elem, $espec, $input);
190
+ break;
191
+ case TType::LST:
192
+ $xfer += $this->_readList($elem, $espec, $input, false);
193
+ break;
194
+ case TType::SET:
195
+ $xfer += $this->_readList($elem, $espec, $input, true);
196
+ break;
197
+ }
198
+ }
199
+ if ($set) {
200
+ $var[$elem] = true;
201
+ } else {
202
+ $var []= $elem;
203
+ }
204
+ }
205
+ if ($set) {
206
+ $xfer += $input->readSetEnd();
207
+ } else {
208
+ $xfer += $input->readListEnd();
209
+ }
210
+ return $xfer;
211
+ }
212
+
213
+ protected function _read($class, $spec, $input) {
214
+ $xfer = 0;
215
+ $fname = null;
216
+ $ftype = 0;
217
+ $fid = 0;
218
+ $xfer += $input->readStructBegin($fname);
219
+ while (true) {
220
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
221
+ if ($ftype == TType::STOP) {
222
+ break;
223
+ }
224
+ if (isset($spec[$fid])) {
225
+ $fspec = $spec[$fid];
226
+ $var = $fspec['var'];
227
+ if ($ftype == $fspec['type']) {
228
+ $xfer = 0;
229
+ if (isset(TBase::$tmethod[$ftype])) {
230
+ $func = 'read'.TBase::$tmethod[$ftype];
231
+ $xfer += $input->$func($this->$var);
232
+ } else {
233
+ switch ($ftype) {
234
+ case TType::STRUCT:
235
+ $class = $fspec['class'];
236
+ $this->$var = new $class();
237
+ $xfer += $this->$var->read($input);
238
+ break;
239
+ case TType::MAP:
240
+ $xfer += $this->_readMap($this->$var, $fspec, $input);
241
+ break;
242
+ case TType::LST:
243
+ $xfer += $this->_readList($this->$var, $fspec, $input, false);
244
+ break;
245
+ case TType::SET:
246
+ $xfer += $this->_readList($this->$var, $fspec, $input, true);
247
+ break;
248
+ }
249
+ }
250
+ } else {
251
+ $xfer += $input->skip($ftype);
252
+ }
253
+ } else {
254
+ $xfer += $input->skip($ftype);
255
+ }
256
+ $xfer += $input->readFieldEnd();
257
+ }
258
+ $xfer += $input->readStructEnd();
259
+ return $xfer;
260
+ }
261
+
262
+ private function _writeMap($var, $spec, $output) {
263
+ $xfer = 0;
264
+ $ktype = $spec['ktype'];
265
+ $vtype = $spec['vtype'];
266
+ $kwrite = $vwrite = null;
267
+ if (isset(TBase::$tmethod[$ktype])) {
268
+ $kwrite = 'write'.TBase::$tmethod[$ktype];
269
+ } else {
270
+ $kspec = $spec['key'];
271
+ }
272
+ if (isset(TBase::$tmethod[$vtype])) {
273
+ $vwrite = 'write'.TBase::$tmethod[$vtype];
274
+ } else {
275
+ $vspec = $spec['val'];
276
+ }
277
+ $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
278
+ foreach ($var as $key => $val) {
279
+ if (isset($kwrite)) {
280
+ $xfer += $output->$kwrite($key);
281
+ } else {
282
+ switch ($ktype) {
283
+ case TType::STRUCT:
284
+ $xfer += $key->write($output);
285
+ break;
286
+ case TType::MAP:
287
+ $xfer += $this->_writeMap($key, $kspec, $output);
288
+ break;
289
+ case TType::LST:
290
+ $xfer += $this->_writeList($key, $kspec, $output, false);
291
+ break;
292
+ case TType::SET:
293
+ $xfer += $this->_writeList($key, $kspec, $output, true);
294
+ break;
295
+ }
296
+ }
297
+ if (isset($vwrite)) {
298
+ $xfer += $output->$vwrite($val);
299
+ } else {
300
+ switch ($vtype) {
301
+ case TType::STRUCT:
302
+ $xfer += $val->write($output);
303
+ break;
304
+ case TType::MAP:
305
+ $xfer += $this->_writeMap($val, $vspec, $output);
306
+ break;
307
+ case TType::LST:
308
+ $xfer += $this->_writeList($val, $vspec, $output, false);
309
+ break;
310
+ case TType::SET:
311
+ $xfer += $this->_writeList($val, $vspec, $output, true);
312
+ break;
313
+ }
314
+ }
315
+ }
316
+ $xfer += $output->writeMapEnd();
317
+ return $xfer;
318
+ }
319
+
320
+ private function _writeList($var, $spec, $output, $set=false) {
321
+ $xfer = 0;
322
+ $etype = $spec['etype'];
323
+ $ewrite = null;
324
+ if (isset(TBase::$tmethod[$etype])) {
325
+ $ewrite = 'write'.TBase::$tmethod[$etype];
326
+ } else {
327
+ $espec = $spec['elem'];
328
+ }
329
+ if ($set) {
330
+ $xfer += $output->writeSetBegin($etype, count($var));
331
+ } else {
332
+ $xfer += $output->writeListBegin($etype, count($var));
333
+ }
334
+ foreach ($var as $key => $val) {
335
+ $elem = $set ? $key : $val;
336
+ if (isset($ewrite)) {
337
+ $xfer += $output->$ewrite($elem);
338
+ } else {
339
+ switch ($etype) {
340
+ case TType::STRUCT:
341
+ $xfer += $elem->write($output);
342
+ break;
343
+ case TType::MAP:
344
+ $xfer += $this->_writeMap($elem, $espec, $output);
345
+ break;
346
+ case TType::LST:
347
+ $xfer += $this->_writeList($elem, $espec, $output, false);
348
+ break;
349
+ case TType::SET:
350
+ $xfer += $this->_writeList($elem, $espec, $output, true);
351
+ break;
352
+ }
353
+ }
354
+ }
355
+ if ($set) {
356
+ $xfer += $output->writeSetEnd();
357
+ } else {
358
+ $xfer += $output->writeListEnd();
359
+ }
360
+ return $xfer;
361
+ }
362
+
363
+ protected function _write($class, $spec, $output) {
364
+ $xfer = 0;
365
+ $xfer += $output->writeStructBegin($class);
366
+ foreach ($spec as $fid => $fspec) {
367
+ $var = $fspec['var'];
368
+ if ($this->$var !== null) {
369
+ $ftype = $fspec['type'];
370
+ $xfer += $output->writeFieldBegin($var, $ftype, $fid);
371
+ if (isset(TBase::$tmethod[$ftype])) {
372
+ $func = 'write'.TBase::$tmethod[$ftype];
373
+ $xfer += $output->$func($this->$var);
374
+ } else {
375
+ switch ($ftype) {
376
+ case TType::STRUCT:
377
+ $xfer += $this->$var->write($output);
378
+ break;
379
+ case TType::MAP:
380
+ $xfer += $this->_writeMap($this->$var, $fspec, $output);
381
+ break;
382
+ case TType::LST:
383
+ $xfer += $this->_writeList($this->$var, $fspec, $output, false);
384
+ break;
385
+ case TType::SET:
386
+ $xfer += $this->_writeList($this->$var, $fspec, $output, true);
387
+ break;
388
+ }
389
+ }
390
+ $xfer += $output->writeFieldEnd();
391
+ }
392
+ }
393
+ $xfer += $output->writeFieldStop();
394
+ $xfer += $output->writeStructEnd();
395
+ return $xfer;
396
+ }
397
+
398
+ }
399
+
400
+ /**
401
+ * Base class from which other Thrift structs extend. This is so that we can
402
+ * cut back on the size of the generated code which is turning out to have a
403
+ * nontrivial cost just to load thanks to the wondrously abysmal implementation
404
+ * of PHP. Note that code is intentionally duplicated in here to avoid making
405
+ * function calls for every field or member of a container..
406
+ */
407
+ abstract class TBase {
408
+
409
+ static $tmethod = array(TType::BOOL => 'Bool',
410
+ TType::BYTE => 'Byte',
411
+ TType::I16 => 'I16',
412
+ TType::I32 => 'I32',
413
+ TType::I64 => 'I64',
414
+ TType::DOUBLE => 'Double',
415
+ TType::STRING => 'String');
416
+
417
+ abstract function read($input);
418
+
419
+ abstract function write($output);
420
+
421
+ public function __construct($spec=null, $vals=null) {
422
+ if (is_array($spec) && is_array($vals)) {
423
+ foreach ($spec as $fid => $fspec) {
424
+ $var = $fspec['var'];
425
+ if (isset($vals[$var])) {
426
+ $this->$var = $vals[$var];
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+ private function _readMap(&$var, $spec, $input) {
433
+ $xfer = 0;
434
+ $ktype = $spec['ktype'];
435
+ $vtype = $spec['vtype'];
436
+ $kread = $vread = null;
437
+ if (isset(TBase::$tmethod[$ktype])) {
438
+ $kread = 'read'.TBase::$tmethod[$ktype];
439
+ } else {
440
+ $kspec = $spec['key'];
441
+ }
442
+ if (isset(TBase::$tmethod[$vtype])) {
443
+ $vread = 'read'.TBase::$tmethod[$vtype];
444
+ } else {
445
+ $vspec = $spec['val'];
446
+ }
447
+ $var = array();
448
+ $_ktype = $_vtype = $size = 0;
449
+ $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
450
+ for ($i = 0; $i < $size; ++$i) {
451
+ $key = $val = null;
452
+ if ($kread !== null) {
453
+ $xfer += $input->$kread($key);
454
+ } else {
455
+ switch ($ktype) {
456
+ case TType::STRUCT:
457
+ $class = $kspec['class'];
458
+ $key = new $class();
459
+ $xfer += $key->read($input);
460
+ break;
461
+ case TType::MAP:
462
+ $xfer += $this->_readMap($key, $kspec, $input);
463
+ break;
464
+ case TType::LST:
465
+ $xfer += $this->_readList($key, $kspec, $input, false);
466
+ break;
467
+ case TType::SET:
468
+ $xfer += $this->_readList($key, $kspec, $input, true);
469
+ break;
470
+ }
471
+ }
472
+ if ($vread !== null) {
473
+ $xfer += $input->$vread($val);
474
+ } else {
475
+ switch ($vtype) {
476
+ case TType::STRUCT:
477
+ $class = $vspec['class'];
478
+ $val = new $class();
479
+ $xfer += $val->read($input);
480
+ break;
481
+ case TType::MAP:
482
+ $xfer += $this->_readMap($val, $vspec, $input);
483
+ break;
484
+ case TType::LST:
485
+ $xfer += $this->_readList($val, $vspec, $input, false);
486
+ break;
487
+ case TType::SET:
488
+ $xfer += $this->_readList($val, $vspec, $input, true);
489
+ break;
490
+ }
491
+ }
492
+ $var[$key] = $val;
493
+ }
494
+ $xfer += $input->readMapEnd();
495
+ return $xfer;
496
+ }
497
+
498
+ private function _readList(&$var, $spec, $input, $set=false) {
499
+ $xfer = 0;
500
+ $etype = $spec['etype'];
501
+ $eread = $vread = null;
502
+ if (isset(TBase::$tmethod[$etype])) {
503
+ $eread = 'read'.TBase::$tmethod[$etype];
504
+ } else {
505
+ $espec = $spec['elem'];
506
+ }
507
+ $var = array();
508
+ $_etype = $size = 0;
509
+ if ($set) {
510
+ $xfer += $input->readSetBegin($_etype, $size);
511
+ } else {
512
+ $xfer += $input->readListBegin($_etype, $size);
513
+ }
514
+ for ($i = 0; $i < $size; ++$i) {
515
+ $elem = null;
516
+ if ($eread !== null) {
517
+ $xfer += $input->$eread($elem);
518
+ } else {
519
+ $espec = $spec['elem'];
520
+ switch ($etype) {
521
+ case TType::STRUCT:
522
+ $class = $espec['class'];
523
+ $elem = new $class();
524
+ $xfer += $elem->read($input);
525
+ break;
526
+ case TType::MAP:
527
+ $xfer += $this->_readMap($elem, $espec, $input);
528
+ break;
529
+ case TType::LST:
530
+ $xfer += $this->_readList($elem, $espec, $input, false);
531
+ break;
532
+ case TType::SET:
533
+ $xfer += $this->_readList($elem, $espec, $input, true);
534
+ break;
535
+ }
536
+ }
537
+ if ($set) {
538
+ $var[$elem] = true;
539
+ } else {
540
+ $var []= $elem;
541
+ }
542
+ }
543
+ if ($set) {
544
+ $xfer += $input->readSetEnd();
545
+ } else {
546
+ $xfer += $input->readListEnd();
547
+ }
548
+ return $xfer;
549
+ }
550
+
551
+ protected function _read($class, $spec, $input) {
552
+ $xfer = 0;
553
+ $fname = null;
554
+ $ftype = 0;
555
+ $fid = 0;
556
+ $xfer += $input->readStructBegin($fname);
557
+ while (true) {
558
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
559
+ if ($ftype == TType::STOP) {
560
+ break;
561
+ }
562
+ if (isset($spec[$fid])) {
563
+ $fspec = $spec[$fid];
564
+ $var = $fspec['var'];
565
+ if ($ftype == $fspec['type']) {
566
+ $xfer = 0;
567
+ if (isset(TBase::$tmethod[$ftype])) {
568
+ $func = 'read'.TBase::$tmethod[$ftype];
569
+ $xfer += $input->$func($this->$var);
570
+ } else {
571
+ switch ($ftype) {
572
+ case TType::STRUCT:
573
+ $class = $fspec['class'];
574
+ $this->$var = new $class();
575
+ $xfer += $this->$var->read($input);
576
+ break;
577
+ case TType::MAP:
578
+ $xfer += $this->_readMap($this->$var, $fspec, $input);
579
+ break;
580
+ case TType::LST:
581
+ $xfer += $this->_readList($this->$var, $fspec, $input, false);
582
+ break;
583
+ case TType::SET:
584
+ $xfer += $this->_readList($this->$var, $fspec, $input, true);
585
+ break;
586
+ }
587
+ }
588
+ } else {
589
+ $xfer += $input->skip($ftype);
590
+ }
591
+ } else {
592
+ $xfer += $input->skip($ftype);
593
+ }
594
+ $xfer += $input->readFieldEnd();
595
+ }
596
+ $xfer += $input->readStructEnd();
597
+ return $xfer;
598
+ }
599
+
600
+ private function _writeMap($var, $spec, $output) {
601
+ $xfer = 0;
602
+ $ktype = $spec['ktype'];
603
+ $vtype = $spec['vtype'];
604
+ $kwrite = $vwrite = null;
605
+ if (isset(TBase::$tmethod[$ktype])) {
606
+ $kwrite = 'write'.TBase::$tmethod[$ktype];
607
+ } else {
608
+ $kspec = $spec['key'];
609
+ }
610
+ if (isset(TBase::$tmethod[$vtype])) {
611
+ $vwrite = 'write'.TBase::$tmethod[$vtype];
612
+ } else {
613
+ $vspec = $spec['val'];
614
+ }
615
+ $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
616
+ foreach ($var as $key => $val) {
617
+ if (isset($kwrite)) {
618
+ $xfer += $output->$kwrite($key);
619
+ } else {
620
+ switch ($ktype) {
621
+ case TType::STRUCT:
622
+ $xfer += $key->write($output);
623
+ break;
624
+ case TType::MAP:
625
+ $xfer += $this->_writeMap($key, $kspec, $output);
626
+ break;
627
+ case TType::LST:
628
+ $xfer += $this->_writeList($key, $kspec, $output, false);
629
+ break;
630
+ case TType::SET:
631
+ $xfer += $this->_writeList($key, $kspec, $output, true);
632
+ break;
633
+ }
634
+ }
635
+ if (isset($vwrite)) {
636
+ $xfer += $output->$vwrite($val);
637
+ } else {
638
+ switch ($vtype) {
639
+ case TType::STRUCT:
640
+ $xfer += $val->write($output);
641
+ break;
642
+ case TType::MAP:
643
+ $xfer += $this->_writeMap($val, $vspec, $output);
644
+ break;
645
+ case TType::LST:
646
+ $xfer += $this->_writeList($val, $vspec, $output, false);
647
+ break;
648
+ case TType::SET:
649
+ $xfer += $this->_writeList($val, $vspec, $output, true);
650
+ break;
651
+ }
652
+ }
653
+ }
654
+ $xfer += $output->writeMapEnd();
655
+ return $xfer;
656
+ }
657
+
658
+ private function _writeList($var, $spec, $output, $set=false) {
659
+ $xfer = 0;
660
+ $etype = $spec['etype'];
661
+ $ewrite = null;
662
+ if (isset(TBase::$tmethod[$etype])) {
663
+ $ewrite = 'write'.TBase::$tmethod[$etype];
664
+ } else {
665
+ $espec = $spec['elem'];
666
+ }
667
+ if ($set) {
668
+ $xfer += $output->writeSetBegin($etype, count($var));
669
+ } else {
670
+ $xfer += $output->writeListBegin($etype, count($var));
671
+ }
672
+ foreach ($var as $key => $val) {
673
+ $elem = $set ? $key : $val;
674
+ if (isset($ewrite)) {
675
+ $xfer += $output->$ewrite($elem);
676
+ } else {
677
+ switch ($etype) {
678
+ case TType::STRUCT:
679
+ $xfer += $elem->write($output);
680
+ break;
681
+ case TType::MAP:
682
+ $xfer += $this->_writeMap($elem, $espec, $output);
683
+ break;
684
+ case TType::LST:
685
+ $xfer += $this->_writeList($elem, $espec, $output, false);
686
+ break;
687
+ case TType::SET:
688
+ $xfer += $this->_writeList($elem, $espec, $output, true);
689
+ break;
690
+ }
691
+ }
692
+ }
693
+ if ($set) {
694
+ $xfer += $output->writeSetEnd();
695
+ } else {
696
+ $xfer += $output->writeListEnd();
697
+ }
698
+ return $xfer;
699
+ }
700
+
701
+ protected function _write($class, $spec, $output) {
702
+ $xfer = 0;
703
+ $xfer += $output->writeStructBegin($class);
704
+ foreach ($spec as $fid => $fspec) {
705
+ $var = $fspec['var'];
706
+ if ($this->$var !== null) {
707
+ $ftype = $fspec['type'];
708
+ $xfer += $output->writeFieldBegin($var, $ftype, $fid);
709
+ if (isset(TBase::$tmethod[$ftype])) {
710
+ $func = 'write'.TBase::$tmethod[$ftype];
711
+ $xfer += $output->$func($this->$var);
712
+ } else {
713
+ switch ($ftype) {
714
+ case TType::STRUCT:
715
+ $xfer += $this->$var->write($output);
716
+ break;
717
+ case TType::MAP:
718
+ $xfer += $this->_writeMap($this->$var, $fspec, $output);
719
+ break;
720
+ case TType::LST:
721
+ $xfer += $this->_writeList($this->$var, $fspec, $output, false);
722
+ break;
723
+ case TType::SET:
724
+ $xfer += $this->_writeList($this->$var, $fspec, $output, true);
725
+ break;
726
+ }
727
+ }
728
+ $xfer += $output->writeFieldEnd();
729
+ }
730
+ }
731
+ $xfer += $output->writeFieldStop();
732
+ $xfer += $output->writeStructEnd();
733
+ return $xfer;
734
+ }
735
+ }
736
+
737
+ class TApplicationException extends TException {
738
+ static $_TSPEC =
739
+ array(1 => array('var' => 'message',
740
+ 'type' => TType::STRING),
741
+ 2 => array('var' => 'code',
742
+ 'type' => TType::I32));
743
+
744
+ const UNKNOWN = 0;
745
+ const UNKNOWN_METHOD = 1;
746
+ const INVALID_MESSAGE_TYPE = 2;
747
+ const WRONG_METHOD_NAME = 3;
748
+ const BAD_SEQUENCE_ID = 4;
749
+ const MISSING_RESULT = 5;
750
+ const INTERNAL_ERROR = 6;
751
+ const PROTOCOL_ERROR = 7;
752
+
753
+ function __construct($message=null, $code=0) {
754
+ parent::__construct($message, $code);
755
+ }
756
+
757
+ public function read($output) {
758
+ return $this->_read('TApplicationException', self::$_TSPEC, $output);
759
+ }
760
+
761
+ public function write($output) {
762
+ $xfer = 0;
763
+ $xfer += $output->writeStructBegin('TApplicationException');
764
+ if ($message = $this->getMessage()) {
765
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
766
+ $xfer += $output->writeString($message);
767
+ $xfer += $output->writeFieldEnd();
768
+ }
769
+ if ($code = $this->getCode()) {
770
+ $xfer += $output->writeFieldBegin('type', TType::I32, 2);
771
+ $xfer += $output->writeI32($code);
772
+ $xfer += $output->writeFieldEnd();
773
+ }
774
+ $xfer += $output->writeFieldStop();
775
+ $xfer += $output->writeStructEnd();
776
+ return $xfer;
777
+ }
778
+ }
779
+
780
+ /**
781
+ * Set global THRIFT ROOT automatically via inclusion here
782
+ */
783
+ if (!isset($GLOBALS['THRIFT_ROOT'])) {
784
+ $GLOBALS['THRIFT_ROOT'] = dirname(__FILE__);
785
+ }
786
+ include_once $GLOBALS['THRIFT_ROOT'].'/protocol/TProtocol.php';
787
+ include_once $GLOBALS['THRIFT_ROOT'].'/transport/TTransport.php';
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/autoload.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ *
20
+ * @package thrift
21
+ */
22
+
23
+
24
+ /**
25
+ * Include this file if you wish to use autoload with your PHP generated Thrift
26
+ * code. The generated code will *not* include any defined Thrift classes by
27
+ * default, except for the service interfaces. The generated code will populate
28
+ * values into $GLOBALS['THRIFT_AUTOLOAD'] which can be used by the autoload
29
+ * method below. If you have your own autoload system already in place, rename your
30
+ * __autoload function to something else and then do:
31
+ * $GLOBALS['AUTOLOAD_HOOKS'][] = 'my_autoload_func';
32
+ *
33
+ * Generate this code using the --gen php:autoload Thrift generator flag.
34
+ */
35
+
36
+ $GLOBALS['THRIFT_AUTOLOAD'] = array();
37
+ $GLOBALS['AUTOLOAD_HOOKS'] = array();
38
+
39
+ if (!function_exists('__autoload')) {
40
+ function __autoload($class) {
41
+ global $THRIFT_AUTOLOAD;
42
+ $classl = strtolower($class);
43
+ if (isset($THRIFT_AUTOLOAD[$classl])) {
44
+ include_once $GLOBALS['THRIFT_ROOT'].'/packages/'.$THRIFT_AUTOLOAD[$classl];
45
+ } else if (!empty($GLOBALS['AUTOLOAD_HOOKS'])) {
46
+ foreach ($GLOBALS['AUTOLOAD_HOOKS'] as $hook) {
47
+ $hook($class);
48
+ }
49
+ }
50
+ }
51
+ }
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.deps ADDED
File without changes
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/php_thrift_protocol.o ADDED
Binary file
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.la ADDED
@@ -0,0 +1 @@
 
1
+ ../thrift_protocol.la
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.lai ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # thrift_protocol.la - a libtool library file
2
+ # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname='thrift_protocol.so'
9
+
10
+ # Names of this library.
11
+ library_names='thrift_protocol.so thrift_protocol.so thrift_protocol.so'
12
+
13
+ # The name of the static archive.
14
+ old_library=''
15
+
16
+ # Libraries that this one depends upon.
17
+ dependency_libs=' -lstdc++'
18
+
19
+ # Version information for thrift_protocol.
20
+ current=0
21
+ age=0
22
+ revision=0
23
+
24
+ # Is this an already installed library?
25
+ installed=yes
26
+
27
+ # Should we warn about portability when linking against -modules?
28
+ shouldnotlink=yes
29
+
30
+ # Files to dlopen/dlpreopen
31
+ dlopen=''
32
+ dlpreopen=''
33
+
34
+ # Directory that this library needs to be installed in:
35
+ libdir='/home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/modules'
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/.libs/thrift_protocol.so ADDED
Binary file
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ srcdir = /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol
2
+ builddir = /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol
3
+ top_srcdir = /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol
4
+ top_builddir = /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol
5
+ EGREP = /bin/grep -E
6
+ SED = /bin/sed
7
+ CONFIGURE_COMMAND = './configure' '--disable-option-checking' '--prefix=/usr/local' '--cache-file=/dev/null' '--srcdir=.'
8
+ CONFIGURE_OPTIONS = '--disable-option-checking' '--prefix=/usr/local' '--cache-file=/dev/null' '--srcdir=.'
9
+ SHLIB_SUFFIX_NAME = so
10
+ SHLIB_DL_SUFFIX_NAME = so
11
+ ZEND_EXT_TYPE = zend_extension
12
+ RE2C = exit 0;
13
+ AWK = nawk
14
+ THRIFT_PROTOCOL_SHARED_LIBADD = -lstdc++
15
+ shared_objects_thrift_protocol = php_thrift_protocol.lo
16
+ PHP_PECL_EXTENSION = thrift_protocol
17
+ PHP_MODULES = $(phplibdir)/thrift_protocol.la
18
+ PHP_ZEND_EX =
19
+ all_targets = $(PHP_MODULES) $(PHP_ZEND_EX)
20
+ install_targets = install-modules install-headers
21
+ prefix = /usr
22
+ exec_prefix = $(prefix)
23
+ libdir = ${exec_prefix}/lib
24
+ prefix = /usr
25
+ phplibdir = /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/modules
26
+ phpincludedir = /usr/include/php5
27
+ CC = cc
28
+ CFLAGS = -g -O2
29
+ CFLAGS_CLEAN = $(CFLAGS)
30
+ CPP = cc -E
31
+ CPPFLAGS = -DHAVE_CONFIG_H
32
+ CXX = g++
33
+ CXXFLAGS = -g -O2
34
+ CXXFLAGS_CLEAN = $(CXXFLAGS)
35
+ EXTENSION_DIR = /usr/lib/php5/20090626+lfs
36
+ PHP_EXECUTABLE = /usr/bin/php
37
+ EXTRA_LDFLAGS =
38
+ EXTRA_LIBS =
39
+ INCLUDES = -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
40
+ LFLAGS =
41
+ LDFLAGS =
42
+ SHARED_LIBTOOL =
43
+ LIBTOOL = $(SHELL) $(top_builddir)/libtool
44
+ SHELL = /bin/bash
45
+ INSTALL_HEADERS =
46
+ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
47
+ INSTALL = $(top_srcdir)/build/shtool install -c
48
+ INSTALL_DATA = $(INSTALL) -m 644
49
+
50
+ DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
51
+ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
52
+
53
+ all: $(all_targets)
54
+ @echo
55
+ @echo "Build complete."
56
+ @echo "Don't forget to run 'make test'."
57
+ @echo
58
+
59
+ build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
60
+
61
+ libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
62
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
63
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
64
+
65
+ libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
66
+ $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
67
+
68
+ install: $(all_targets) $(install_targets)
69
+
70
+ install-sapi: $(OVERALL_TARGET)
71
+ @echo "Installing PHP SAPI module: $(PHP_SAPI)"
72
+ -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
73
+ -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
74
+ for i in 0.0.0 0.0 0; do \
75
+ if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
76
+ $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
77
+ break; \
78
+ fi; \
79
+ done; \
80
+ fi
81
+ @$(INSTALL_IT)
82
+
83
+ install-modules: build-modules
84
+ @test -d modules && \
85
+ $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
86
+ @echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
87
+ @rm -f modules/*.la >/dev/null 2>&1
88
+ @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
89
+
90
+ install-headers:
91
+ -@if test "$(INSTALL_HEADERS)"; then \
92
+ for i in `echo $(INSTALL_HEADERS)`; do \
93
+ i=`$(top_srcdir)/build/shtool path -d $$i`; \
94
+ paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
95
+ done; \
96
+ $(mkinstalldirs) $$paths && \
97
+ echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
98
+ for i in `echo $(INSTALL_HEADERS)`; do \
99
+ if test "$(PHP_PECL_EXTENSION)"; then \
100
+ src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
101
+ else \
102
+ src=$$i; \
103
+ fi; \
104
+ if test -f "$(top_srcdir)/$$src"; then \
105
+ $(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
106
+ elif test -f "$(top_builddir)/$$src"; then \
107
+ $(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
108
+ else \
109
+ (cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
110
+ cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
111
+ fi \
112
+ done; \
113
+ fi
114
+
115
+ PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
116
+ PHP_TEST_SHARED_EXTENSIONS = ` \
117
+ if test "x$(PHP_MODULES)" != "x"; then \
118
+ for i in $(PHP_MODULES)""; do \
119
+ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
120
+ done; \
121
+ fi; \
122
+ if test "x$(PHP_ZEND_EX)" != "x"; then \
123
+ for i in $(PHP_ZEND_EX)""; do \
124
+ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
125
+ done; \
126
+ fi`
127
+ PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
128
+
129
+ test: all
130
+ -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
131
+ INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
132
+ if test "$$INI_FILE"; then \
133
+ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
134
+ else \
135
+ echo > $(top_builddir)/tmp-php.ini; \
136
+ fi; \
137
+ INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
138
+ if test "$$INI_SCANNED_PATH"; then \
139
+ INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
140
+ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
141
+ fi; \
142
+ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
143
+ TEST_PHP_SRCDIR=$(top_srcdir) \
144
+ CC="$(CC)" \
145
+ $(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
146
+ rm $(top_builddir)/tmp-php.ini; \
147
+ else \
148
+ echo "ERROR: Cannot run tests without CLI sapi."; \
149
+ fi
150
+
151
+ clean:
152
+ find . -name \*.gcno -o -name \*.gcda | xargs rm -f
153
+ find . -name \*.lo -o -name \*.o | xargs rm -f
154
+ find . -name \*.la -o -name \*.a | xargs rm -f
155
+ find . -name \*.so | xargs rm -f
156
+ find . -name .libs -a -type d|xargs rm -rf
157
+ rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
158
+
159
+ distclean: clean
160
+ rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
161
+ $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
162
+
163
+ .PHONY: all clean install distclean test
164
+ .NOEXPORT:
165
+ php_thrift_protocol.lo: /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
166
+ $(LIBTOOL) --mode=compile $(CXX) -I. -I/home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp -o php_thrift_protocol.lo
167
+ $(phplibdir)/thrift_protocol.la: ./thrift_protocol.la
168
+ $(LIBTOOL) --mode=install cp ./thrift_protocol.la $(phplibdir)
169
+
170
+ ./thrift_protocol.la: $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_DEPENDENCIES)
171
+ $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_LIBADD)
172
+
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.fragments ADDED
File without changes
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.global ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
2
+ INSTALL = $(top_srcdir)/build/shtool install -c
3
+ INSTALL_DATA = $(INSTALL) -m 644
4
+
5
+ DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
6
+ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
7
+
8
+ all: $(all_targets)
9
+ @echo
10
+ @echo "Build complete."
11
+ @echo "Don't forget to run 'make test'."
12
+ @echo
13
+
14
+ build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
15
+
16
+ libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
17
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
18
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
19
+
20
+ libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
21
+ $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
22
+
23
+ install: $(all_targets) $(install_targets)
24
+
25
+ install-sapi: $(OVERALL_TARGET)
26
+ @echo "Installing PHP SAPI module: $(PHP_SAPI)"
27
+ -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
28
+ -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
29
+ for i in 0.0.0 0.0 0; do \
30
+ if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
31
+ $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
32
+ break; \
33
+ fi; \
34
+ done; \
35
+ fi
36
+ @$(INSTALL_IT)
37
+
38
+ install-modules: build-modules
39
+ @test -d modules && \
40
+ $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
41
+ @echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
42
+ @rm -f modules/*.la >/dev/null 2>&1
43
+ @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
44
+
45
+ install-headers:
46
+ -@if test "$(INSTALL_HEADERS)"; then \
47
+ for i in `echo $(INSTALL_HEADERS)`; do \
48
+ i=`$(top_srcdir)/build/shtool path -d $$i`; \
49
+ paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
50
+ done; \
51
+ $(mkinstalldirs) $$paths && \
52
+ echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
53
+ for i in `echo $(INSTALL_HEADERS)`; do \
54
+ if test "$(PHP_PECL_EXTENSION)"; then \
55
+ src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
56
+ else \
57
+ src=$$i; \
58
+ fi; \
59
+ if test -f "$(top_srcdir)/$$src"; then \
60
+ $(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
61
+ elif test -f "$(top_builddir)/$$src"; then \
62
+ $(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
63
+ else \
64
+ (cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
65
+ cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
66
+ fi \
67
+ done; \
68
+ fi
69
+
70
+ PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
71
+ PHP_TEST_SHARED_EXTENSIONS = ` \
72
+ if test "x$(PHP_MODULES)" != "x"; then \
73
+ for i in $(PHP_MODULES)""; do \
74
+ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
75
+ done; \
76
+ fi; \
77
+ if test "x$(PHP_ZEND_EX)" != "x"; then \
78
+ for i in $(PHP_ZEND_EX)""; do \
79
+ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
80
+ done; \
81
+ fi`
82
+ PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
83
+
84
+ test: all
85
+ -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
86
+ INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
87
+ if test "$$INI_FILE"; then \
88
+ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
89
+ else \
90
+ echo > $(top_builddir)/tmp-php.ini; \
91
+ fi; \
92
+ INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
93
+ if test "$$INI_SCANNED_PATH"; then \
94
+ INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
95
+ $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
96
+ fi; \
97
+ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
98
+ TEST_PHP_SRCDIR=$(top_srcdir) \
99
+ CC="$(CC)" \
100
+ $(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
101
+ rm $(top_builddir)/tmp-php.ini; \
102
+ else \
103
+ echo "ERROR: Cannot run tests without CLI sapi."; \
104
+ fi
105
+
106
+ clean:
107
+ find . -name \*.gcno -o -name \*.gcda | xargs rm -f
108
+ find . -name \*.lo -o -name \*.o | xargs rm -f
109
+ find . -name \*.la -o -name \*.a | xargs rm -f
110
+ find . -name \*.so | xargs rm -f
111
+ find . -name .libs -a -type d|xargs rm -rf
112
+ rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
113
+
114
+ distclean: clean
115
+ rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
116
+ $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
117
+
118
+ .PHONY: all clean install distclean test
119
+ .NOEXPORT:
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/Makefile.objects ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ php_thrift_protocol.lo: /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
2
+ $(LIBTOOL) --mode=compile $(CXX) -I. -I/home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/priit/thrift-0.8.0/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp -o php_thrift_protocol.lo
3
+ $(phplibdir)/thrift_protocol.la: ./thrift_protocol.la
4
+ $(LIBTOOL) --mode=install cp ./thrift_protocol.la $(phplibdir)
5
+
6
+ ./thrift_protocol.la: $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_DEPENDENCIES)
7
+ $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_LIBADD)
8
+
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/acinclude.m4 ADDED
@@ -0,0 +1,2885 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dnl
2
+ dnl $Id: acinclude.m4 308352 2011-02-15 08:28:22Z pajoye $
3
+ dnl
4
+ dnl This file contains local autoconf functions.
5
+ dnl
6
+
7
+ dnl -------------------------------------------------------------------------
8
+ dnl Output stylize macros for configure (help/runtime)
9
+ dnl -------------------------------------------------------------------------
10
+
11
+ dnl
12
+ dnl PHP_HELP_SEPARATOR(title)
13
+ dnl
14
+ dnl Adds separator title into the configure --help display.
15
+ dnl
16
+ AC_DEFUN([PHP_HELP_SEPARATOR],[
17
+ AC_ARG_ENABLE([],[
18
+ $1
19
+ ],[])
20
+ ])
21
+
22
+ dnl
23
+ dnl PHP_CONFIGURE_PART(title)
24
+ dnl
25
+ dnl Adds separator title configure output (idea borrowed from mm)
26
+ dnl
27
+ AC_DEFUN([PHP_CONFIGURE_PART],[
28
+ AC_MSG_RESULT()
29
+ AC_MSG_RESULT([${T_MD}$1${T_ME}])
30
+ ])
31
+
32
+ dnl -------------------------------------------------------------------------
33
+ dnl Build system helper macros
34
+ dnl -------------------------------------------------------------------------
35
+
36
+ dnl
37
+ dnl PHP_DEF_HAVE(what)
38
+ dnl
39
+ dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
40
+ dnl
41
+ AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
42
+
43
+ dnl
44
+ dnl PHP_RUN_ONCE(namespace, variable, code)
45
+ dnl
46
+ dnl execute code, if variable is not set in namespace
47
+ dnl
48
+ AC_DEFUN([PHP_RUN_ONCE],[
49
+ changequote({,})
50
+ unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
51
+ changequote([,])
52
+ cmd="echo $ac_n \"\$$1$unique$ac_c\""
53
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
54
+ eval "$1$unique=set"
55
+ $3
56
+ fi
57
+ ])
58
+
59
+ dnl
60
+ dnl PHP_EXPAND_PATH(path, variable)
61
+ dnl
62
+ dnl expands path to an absolute path and assigns it to variable
63
+ dnl
64
+ AC_DEFUN([PHP_EXPAND_PATH],[
65
+ if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
66
+ $2=$1
67
+ else
68
+ changequote({,})
69
+ ep_dir="`echo $1|$SED 's%/*[^/][^/]*/*$%%'`"
70
+ changequote([,])
71
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
72
+ $2="$ep_realdir/`basename \"$1\"`"
73
+ fi
74
+ ])
75
+
76
+ dnl
77
+ dnl PHP_DEFINE(WHAT [, value[, directory]])
78
+ dnl
79
+ dnl Creates builddir/include/what.h and in there #define WHAT value
80
+ dnl
81
+ AC_DEFUN([PHP_DEFINE],[
82
+ [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
83
+ ])
84
+
85
+ dnl
86
+ dnl PHP_SUBST(varname)
87
+ dnl
88
+ dnl Adds variable with it's value into Makefile, e.g.:
89
+ dnl CC = gcc
90
+ dnl
91
+ AC_DEFUN([PHP_SUBST],[
92
+ PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
93
+ ])
94
+
95
+ dnl
96
+ dnl PHP_SUBST_OLD(varname)
97
+ dnl
98
+ dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
99
+ dnl instances in every file passed to AC_OUTPUT()
100
+ dnl
101
+ AC_DEFUN([PHP_SUBST_OLD],[
102
+ PHP_SUBST($1)
103
+ AC_SUBST($1)
104
+ ])
105
+
106
+ dnl
107
+ dnl PHP_OUTPUT(file)
108
+ dnl
109
+ dnl Adds "file" to the list of files generated by AC_OUTPUT
110
+ dnl This macro can be used several times.
111
+ dnl
112
+ AC_DEFUN([PHP_OUTPUT],[
113
+ PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
114
+ ])
115
+
116
+
117
+ dnl -------------------------------------------------------------------------
118
+ dnl Build system base macros
119
+ dnl -------------------------------------------------------------------------
120
+
121
+ dnl
122
+ dnl PHP_CANONICAL_HOST_TARGET
123
+ dnl
124
+ AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
125
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
126
+ AC_REQUIRE([AC_CANONICAL_TARGET])dnl
127
+ dnl Make sure we do not continue if host_alias is empty.
128
+ if test -z "$host_alias" && test -n "$host"; then
129
+ host_alias=$host
130
+ fi
131
+ if test -z "$host_alias"; then
132
+ AC_MSG_ERROR([host_alias is not set!])
133
+ fi
134
+ ])
135
+
136
+ dnl
137
+ dnl PHP_INIT_BUILD_SYSTEM
138
+ dnl
139
+ AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
140
+ AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
141
+ test -d include || $php_shtool mkdir include
142
+ > Makefile.objects
143
+ > Makefile.fragments
144
+ dnl We need to play tricks here to avoid matching the grep line itself
145
+ pattern=define
146
+ $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
147
+ ])
148
+
149
+ dnl
150
+ dnl PHP_GEN_GLOBAL_MAKEFILE
151
+ dnl
152
+ dnl Generates the global makefile.
153
+ dnl
154
+ AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
155
+ cat >Makefile <<EOF
156
+ srcdir = $abs_srcdir
157
+ builddir = $abs_builddir
158
+ top_srcdir = $abs_srcdir
159
+ top_builddir = $abs_builddir
160
+ EOF
161
+ for i in $PHP_VAR_SUBST; do
162
+ eval echo "$i = \$$i" >> Makefile
163
+ done
164
+
165
+ cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
166
+ ])
167
+
168
+ dnl
169
+ dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
170
+ dnl
171
+ dnl Processes a file called Makefile.frag in the source directory
172
+ dnl of the most recently added extension. $(srcdir) and $(builddir)
173
+ dnl are substituted with the proper paths. Can be used to supply
174
+ dnl custom rules and/or additional targets.
175
+ dnl
176
+ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
177
+ ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
178
+ ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
179
+ ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
180
+ test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
181
+ ])
182
+
183
+ dnl
184
+ dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
185
+ dnl
186
+ dnl Adds sources which are located relative to source-path to the
187
+ dnl array of type type. Sources are processed with optional
188
+ dnl special-flags which are passed to the compiler. Sources
189
+ dnl can be either written in C or C++ (filenames shall end in .c
190
+ dnl or .cpp, respectively).
191
+ dnl
192
+ dnl Note: If source-path begins with a "/", the "/" is removed and
193
+ dnl the path is interpreted relative to the top build-directory.
194
+ dnl
195
+ dnl which array to append to?
196
+ AC_DEFUN([PHP_ADD_SOURCES],[
197
+ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
198
+ ])
199
+
200
+ dnl
201
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
202
+ dnl internal, don't use
203
+ AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
204
+ ifelse($1,shared,[
205
+ b_c_pre=$shared_c_pre
206
+ b_cxx_pre=$shared_cxx_pre
207
+ b_c_meta=$shared_c_meta
208
+ b_cxx_meta=$shared_cxx_meta
209
+ b_c_post=$shared_c_post
210
+ b_cxx_post=$shared_cxx_post
211
+ ],[
212
+ b_c_pre=$php_c_pre
213
+ b_cxx_pre=$php_cxx_pre
214
+ b_c_meta=$php_c_meta
215
+ b_cxx_meta=$php_cxx_meta
216
+ b_c_post=$php_c_post
217
+ b_cxx_post=$php_cxx_post
218
+ ])dnl
219
+ b_lo=[$]$1_lo
220
+ ])
221
+
222
+ dnl
223
+ dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
224
+ dnl
225
+ dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
226
+ dnl name of the array target-var directly, as well as whether
227
+ dnl shared objects will be built from the sources.
228
+ dnl
229
+ dnl Should not be used directly.
230
+ dnl
231
+ AC_DEFUN([PHP_ADD_SOURCES_X],[
232
+ dnl relative to source- or build-directory?
233
+ dnl ac_srcdir/ac_bdir include trailing slash
234
+ case $1 in
235
+ ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
236
+ /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
237
+ *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
238
+ esac
239
+
240
+ dnl how to build .. shared or static?
241
+ ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
242
+
243
+ dnl iterate over the sources
244
+ old_IFS=[$]IFS
245
+ for ac_src in $2; do
246
+
247
+ dnl remove the suffix
248
+ IFS=.
249
+ set $ac_src
250
+ ac_obj=[$]1
251
+ IFS=$old_IFS
252
+
253
+ dnl append to the array which has been dynamically chosen at m4 time
254
+ $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
255
+
256
+ dnl choose the right compiler/flags/etc. for the source-file
257
+ case $ac_src in
258
+ *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
259
+ *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
260
+ *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
261
+ *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
262
+ esac
263
+
264
+ dnl create a rule for the object/source combo
265
+ cat >>Makefile.objects<<EOF
266
+ $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
267
+ $ac_comp
268
+ EOF
269
+ done
270
+ ])
271
+
272
+ dnl -------------------------------------------------------------------------
273
+ dnl Compiler characteristics checks
274
+ dnl -------------------------------------------------------------------------
275
+
276
+ dnl
277
+ dnl PHP_TARGET_RDYNAMIC
278
+ dnl
279
+ dnl Checks whether -rdynamic is supported by the compiler. This
280
+ dnl is necessary for some targets to populate the global symbol
281
+ dnl table. Otherwise, dynamic modules would not be able to resolve
282
+ dnl PHP-related symbols.
283
+ dnl
284
+ dnl If successful, adds -rdynamic to PHP_LDFLAGS.
285
+ dnl
286
+ AC_DEFUN([PHP_TARGET_RDYNAMIC],[
287
+ if test -n "$GCC"; then
288
+ dnl we should use a PHP-specific macro here
289
+ PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
290
+ if test "$gcc_rdynamic" = "yes"; then
291
+ PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
292
+ fi
293
+ fi
294
+ ])
295
+
296
+ dnl
297
+ dnl PHP_RUNPATH_SWITCH
298
+ dnl
299
+ dnl Checks for -R, etc. switch
300
+ dnl
301
+ AC_DEFUN([PHP_RUNPATH_SWITCH],[
302
+ AC_MSG_CHECKING([if compiler supports -R])
303
+ AC_CACHE_VAL(php_cv_cc_dashr,[
304
+ SAVE_LIBS=$LIBS
305
+ LIBS="-R /usr/$PHP_LIBDIR $LIBS"
306
+ AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
307
+ LIBS=$SAVE_LIBS])
308
+ AC_MSG_RESULT([$php_cv_cc_dashr])
309
+ if test $php_cv_cc_dashr = "yes"; then
310
+ ld_runpath_switch=-R
311
+ else
312
+ AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
313
+ AC_CACHE_VAL(php_cv_cc_rpath,[
314
+ SAVE_LIBS=$LIBS
315
+ LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
316
+ AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
317
+ LIBS=$SAVE_LIBS])
318
+ AC_MSG_RESULT([$php_cv_cc_rpath])
319
+ if test $php_cv_cc_rpath = "yes"; then
320
+ ld_runpath_switch=-Wl,-rpath,
321
+ else
322
+ dnl something innocuous
323
+ ld_runpath_switch=-L
324
+ fi
325
+ fi
326
+ if test "$PHP_RPATH" = "no"; then
327
+ ld_runpath_switch=
328
+ fi
329
+ ])
330
+
331
+ dnl
332
+ dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
333
+ dnl
334
+ AC_DEFUN([PHP_CHECK_GCC_ARG],[
335
+ gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
336
+ AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
337
+ echo 'void somefunc() { };' > conftest.c
338
+ cmd='$CC $1 -c conftest.c'
339
+ if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
340
+ ac_result=no
341
+ else
342
+ ac_result=yes
343
+ fi
344
+ eval $gcc_arg_name=$ac_result
345
+ rm -f conftest.*
346
+ ])
347
+ if eval test "\$$gcc_arg_name" = "yes"; then
348
+ $2
349
+ else
350
+ :
351
+ $3
352
+ fi
353
+ ])
354
+
355
+ dnl
356
+ dnl PHP_LIBGCC_LIBPATH(gcc)
357
+ dnl
358
+ dnl Stores the location of libgcc in libgcc_libpath
359
+ dnl
360
+ AC_DEFUN([PHP_LIBGCC_LIBPATH],[
361
+ changequote({,})
362
+ libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
363
+ changequote([,])
364
+ ])
365
+
366
+ dnl -------------------------------------------------------------------------
367
+ dnl Macros to modify LIBS, INCLUDES, etc. variables
368
+ dnl -------------------------------------------------------------------------
369
+
370
+ dnl
371
+ dnl PHP_REMOVE_USR_LIB(NAME)
372
+ dnl
373
+ dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
374
+ dnl
375
+ AC_DEFUN([PHP_REMOVE_USR_LIB],[
376
+ unset ac_new_flags
377
+ for i in [$]$1; do
378
+ case [$]i in
379
+ -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
380
+ *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
381
+ esac
382
+ done
383
+ $1=[$]ac_new_flags
384
+ ])
385
+
386
+ dnl
387
+ dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
388
+ dnl
389
+ dnl Use this macro, if you need to add libraries and or library search
390
+ dnl paths to the PHP build system which are only given in compiler
391
+ dnl notation.
392
+ dnl
393
+ AC_DEFUN([PHP_EVAL_LIBLINE],[
394
+ for ac_i in $1; do
395
+ case $ac_i in
396
+ -pthread[)]
397
+ if test "$ext_shared" = "yes"; then
398
+ $2="[$]$2 -pthread"
399
+ else
400
+ PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
401
+ fi
402
+ ;;
403
+ -l*[)]
404
+ ac_ii=`echo $ac_i|cut -c 3-`
405
+ PHP_ADD_LIBRARY($ac_ii,1,$2)
406
+ ;;
407
+ -L*[)]
408
+ ac_ii=`echo $ac_i|cut -c 3-`
409
+ PHP_ADD_LIBPATH($ac_ii,$2)
410
+ ;;
411
+ esac
412
+ done
413
+ ])
414
+
415
+ dnl
416
+ dnl PHP_EVAL_INCLINE(headerline)
417
+ dnl
418
+ dnl Use this macro, if you need to add header search paths to the PHP
419
+ dnl build system which are only given in compiler notation.
420
+ dnl
421
+ AC_DEFUN([PHP_EVAL_INCLINE],[
422
+ for ac_i in $1; do
423
+ case $ac_i in
424
+ -I*[)]
425
+ ac_ii=`echo $ac_i|cut -c 3-`
426
+ PHP_ADD_INCLUDE($ac_ii)
427
+ ;;
428
+ esac
429
+ done
430
+ ])
431
+
432
+ dnl internal, don't use
433
+ AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
434
+ PHP_RUN_ONCE(LIBPATH, $1, [
435
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
436
+ LDFLAGS="$LDFLAGS -L$1"
437
+ PHP_RPATHS="$PHP_RPATHS $1"
438
+ ])
439
+ ])dnl
440
+ dnl
441
+ dnl
442
+ dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
443
+ dnl
444
+ dnl Adds a path to linkpath/runpath (LDFLAGS)
445
+ dnl
446
+ AC_DEFUN([PHP_ADD_LIBPATH],[
447
+ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
448
+ PHP_EXPAND_PATH($1, ai_p)
449
+ ifelse([$2],,[
450
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
451
+ ],[
452
+ if test "$ext_shared" = "yes"; then
453
+ $2="-L$ai_p [$]$2"
454
+ test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
455
+ else
456
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
457
+ fi
458
+ ])
459
+ fi
460
+ ])
461
+
462
+ dnl
463
+ dnl PHP_UTILIZE_RPATHS()
464
+ dnl
465
+ dnl builds RPATHS/LDFLAGS from PHP_RPATHS
466
+ dnl
467
+ AC_DEFUN([PHP_UTILIZE_RPATHS],[
468
+ OLD_RPATHS=$PHP_RPATHS
469
+ unset PHP_RPATHS
470
+
471
+ for i in $OLD_RPATHS; do
472
+ dnl Can be passed to native cc/libtool
473
+ PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
474
+ dnl Libtool-specific
475
+ PHP_RPATHS="$PHP_RPATHS -R $i"
476
+ dnl cc-specific
477
+ NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
478
+ done
479
+
480
+ if test "$PHP_RPATH" = "no"; then
481
+ unset PHP_RPATHS
482
+ unset NATIVE_RPATHS
483
+ fi
484
+ ])
485
+
486
+ dnl
487
+ dnl PHP_ADD_INCLUDE(path [,before])
488
+ dnl
489
+ dnl add an include path.
490
+ dnl if before is 1, add in the beginning of INCLUDES.
491
+ dnl
492
+ AC_DEFUN([PHP_ADD_INCLUDE],[
493
+ if test "$1" != "/usr/include"; then
494
+ PHP_EXPAND_PATH($1, ai_p)
495
+ PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
496
+ if test "$2"; then
497
+ INCLUDES="-I$ai_p $INCLUDES"
498
+ else
499
+ INCLUDES="$INCLUDES -I$ai_p"
500
+ fi
501
+ ])
502
+ fi
503
+ ])
504
+
505
+ dnl internal, don't use
506
+ AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
507
+ ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
508
+ ])dnl
509
+ dnl
510
+ dnl internal, don't use
511
+ AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
512
+ case $1 in
513
+ c|c_r|pthread*[)] ;;
514
+ *[)] ifelse($3,,[
515
+ _PHP_X_ADD_LIBRARY($1,$2,$5)
516
+ ],[
517
+ if test "$ext_shared" = "yes"; then
518
+ _PHP_X_ADD_LIBRARY($1,$2,$3)
519
+ else
520
+ $4($1,$2)
521
+ fi
522
+ ]) ;;
523
+ esac
524
+ ])dnl
525
+ dnl
526
+ dnl
527
+ dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
528
+ dnl
529
+ dnl add a library to the link line
530
+ dnl
531
+ AC_DEFUN([PHP_ADD_LIBRARY],[
532
+ _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
533
+ ])
534
+
535
+ dnl
536
+ dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
537
+ dnl
538
+ dnl add a library to the link line (deferred, not used during configure)
539
+ dnl
540
+ AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
541
+ _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
542
+ ])
543
+
544
+ dnl
545
+ dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
546
+ dnl
547
+ dnl add a library to the link line and path to linkpath/runpath.
548
+ dnl if shared-libadd is not empty and $ext_shared is yes,
549
+ dnl shared-libadd will be assigned the library information
550
+ dnl
551
+ AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
552
+ ifelse($3,,[
553
+ if test -n "$2"; then
554
+ PHP_ADD_LIBPATH($2)
555
+ fi
556
+ PHP_ADD_LIBRARY($1)
557
+ ],[
558
+ if test "$ext_shared" = "yes"; then
559
+ $3="-l$1 [$]$3"
560
+ if test -n "$2"; then
561
+ PHP_ADD_LIBPATH($2,$3)
562
+ fi
563
+ else
564
+ PHP_ADD_LIBRARY_WITH_PATH($1,$2)
565
+ fi
566
+ ])
567
+ ])
568
+
569
+ dnl
570
+ dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
571
+ dnl
572
+ dnl add a library to the link line (deferred)
573
+ dnl and path to linkpath/runpath (not deferred)
574
+ dnl if shared-libadd is not empty and $ext_shared is yes,
575
+ dnl shared-libadd will be assigned the library information
576
+ dnl
577
+ AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
578
+ ifelse($3,,[
579
+ if test -n "$2"; then
580
+ PHP_ADD_LIBPATH($2)
581
+ fi
582
+ PHP_ADD_LIBRARY_DEFER($1)
583
+ ],[
584
+ if test "$ext_shared" = "yes"; then
585
+ $3="-l$1 [$]$3"
586
+ if test -n "$2"; then
587
+ PHP_ADD_LIBPATH($2,$3)
588
+ fi
589
+ else
590
+ PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
591
+ fi
592
+ ])
593
+ ])
594
+
595
+ dnl
596
+ dnl PHP_ADD_FRAMEWORK(framework [,before])
597
+ dnl
598
+ dnl add a (Darwin / Mac OS X) framework to the link
599
+ dnl line. if before is 1, the framework is added
600
+ dnl to the beginning of the line.
601
+ dnl
602
+ AC_DEFUN([PHP_ADD_FRAMEWORK], [
603
+ PHP_RUN_ONCE(FRAMEWORKS, $1, [
604
+ if test "$2"; then
605
+ PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
606
+ else
607
+ PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
608
+ fi
609
+ ])
610
+ ])
611
+
612
+ dnl
613
+ dnl PHP_ADD_FRAMEWORKPATH(path [,before])
614
+ dnl
615
+ dnl add a (Darwin / Mac OS X) framework path to the link
616
+ dnl and include lines. default paths include (but are
617
+ dnl not limited to) /Local/Library/Frameworks and
618
+ dnl /System/Library/Frameworks, so these don't need
619
+ dnl to be specifically added. if before is 1, the
620
+ dnl framework path is added to the beginning of the
621
+ dnl relevant lines.
622
+ dnl
623
+ AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
624
+ PHP_EXPAND_PATH($1, ai_p)
625
+ PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
626
+ if test "$2"; then
627
+ PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
628
+ else
629
+ PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
630
+ fi
631
+ ])
632
+ ])
633
+
634
+ dnl
635
+ dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
636
+ dnl
637
+ dnl Adds a (Darwin / Mac OS X) framework path and the
638
+ dnl framework itself to the link and include lines.
639
+ dnl
640
+ AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
641
+ PHP_ADD_FRAMEWORKPATH($2)
642
+ PHP_ADD_FRAMEWORK($1)
643
+ ])
644
+
645
+ dnl
646
+ dnl PHP_SET_LIBTOOL_VARIABLE(var)
647
+ dnl
648
+ dnl Set libtool variable
649
+ dnl
650
+ AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
651
+ if test -z "$LIBTOOL"; then
652
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
653
+ else
654
+ LIBTOOL="$LIBTOOL $1"
655
+ fi
656
+ ])
657
+
658
+ dnl -------------------------------------------------------------------------
659
+ dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
660
+ dnl -------------------------------------------------------------------------
661
+
662
+ dnl PHP_ARG_ANALYZE_EX
663
+ dnl internal
664
+ AC_DEFUN([PHP_ARG_ANALYZE_EX],[
665
+ ext_output="yes, shared"
666
+ ext_shared=yes
667
+ case [$]$1 in
668
+ shared,*[)]
669
+ $1=`echo "[$]$1"|$SED 's/^shared,//'`
670
+ ;;
671
+ shared[)]
672
+ $1=yes
673
+ ;;
674
+ no[)]
675
+ ext_output=no
676
+ ext_shared=no
677
+ ;;
678
+ *[)]
679
+ ext_output=yes
680
+ ext_shared=no
681
+ ;;
682
+ esac
683
+
684
+ PHP_ALWAYS_SHARED([$1])
685
+ ])
686
+
687
+ dnl PHP_ARG_ANALYZE
688
+ dnl internal
689
+ AC_DEFUN([PHP_ARG_ANALYZE],[
690
+ ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
691
+ ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
692
+ ])
693
+
694
+ dnl
695
+ dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
696
+ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
697
+ dnl default-val defaults to no. This will also set the variable ext_shared,
698
+ dnl and will overwrite any previous variable of that name.
699
+ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
700
+ dnl the PHP_ARG_ANALYZE_EX.
701
+ dnl
702
+ AC_DEFUN([PHP_ARG_WITH],[
703
+ php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
704
+ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
705
+ ])
706
+
707
+ dnl PHP_REAL_ARG_WITH
708
+ dnl internal
709
+ AC_DEFUN([PHP_REAL_ARG_WITH],[
710
+ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
711
+ AC_ARG_WITH($1,[$3],$5=[$]withval,
712
+ [
713
+ $5=ifelse($4,,no,$4)
714
+ ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
715
+ ])
716
+ PHP_ARG_ANALYZE($5,[$2],$6)
717
+ ])
718
+
719
+ dnl
720
+ dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
721
+ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
722
+ dnl default-val defaults to no. This will also set the variable ext_shared,
723
+ dnl and will overwrite any previous variable of that name.
724
+ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
725
+ dnl the PHP_ARG_ANALYZE_EX.
726
+ dnl
727
+ AC_DEFUN([PHP_ARG_ENABLE],[
728
+ php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
729
+ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
730
+ ])
731
+
732
+ dnl PHP_REAL_ARG_ENABLE
733
+ dnl internal
734
+ AC_DEFUN([PHP_REAL_ARG_ENABLE],[
735
+ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
736
+ AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
737
+ [
738
+ $5=ifelse($4,,no,$4)
739
+ ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
740
+ ])
741
+ PHP_ARG_ANALYZE($5,[$2],$6)
742
+ ])
743
+
744
+ dnl -------------------------------------------------------------------------
745
+ dnl Build macros
746
+ dnl -------------------------------------------------------------------------
747
+
748
+ dnl
749
+ dnl PHP_BUILD_THREAD_SAFE
750
+ dnl
751
+ AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
752
+ enable_maintainer_zts=yes
753
+ if test "$pthreads_working" != "yes"; then
754
+ AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
755
+ fi
756
+ ])
757
+
758
+ dnl
759
+ dnl PHP_REQUIRE_CXX
760
+ dnl
761
+ AC_DEFUN([PHP_REQUIRE_CXX],[
762
+ if test -z "$php_cxx_done"; then
763
+ AC_PROG_CXX
764
+ AC_PROG_CXXCPP
765
+ php_cxx_done=yes
766
+ fi
767
+ ])
768
+
769
+ dnl
770
+ dnl PHP_BUILD_SHARED
771
+ dnl
772
+ AC_DEFUN([PHP_BUILD_SHARED],[
773
+ PHP_BUILD_PROGRAM
774
+ OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
775
+ php_build_target=shared
776
+
777
+ php_c_pre=$shared_c_pre
778
+ php_c_meta=$shared_c_meta
779
+ php_c_post=$shared_c_post
780
+ php_cxx_pre=$shared_cxx_pre
781
+ php_cxx_meta=$shared_cxx_meta
782
+ php_cxx_post=$shared_cxx_post
783
+ php_lo=$shared_lo
784
+ ])
785
+
786
+ dnl
787
+ dnl PHP_BUILD_STATIC
788
+ dnl
789
+ AC_DEFUN([PHP_BUILD_STATIC],[
790
+ PHP_BUILD_PROGRAM
791
+ OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
792
+ php_build_target=static
793
+ ])
794
+
795
+ dnl
796
+ dnl PHP_BUILD_BUNDLE
797
+ dnl
798
+ AC_DEFUN([PHP_BUILD_BUNDLE],[
799
+ PHP_BUILD_PROGRAM
800
+ OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
801
+ php_build_target=static
802
+ ])
803
+
804
+ dnl
805
+ dnl PHP_BUILD_PROGRAM
806
+ dnl
807
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
808
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
809
+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
810
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
811
+ php_c_post=
812
+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
813
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
814
+ php_cxx_post=
815
+ php_lo=lo
816
+
817
+ case $with_pic in
818
+ yes) pic_setting='-prefer-pic';;
819
+ no) pic_setting='-prefer-non-pic';;
820
+ esac
821
+
822
+ shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
823
+ shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
824
+ shared_c_post=
825
+ shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
826
+ shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
827
+ shared_cxx_post=
828
+ shared_lo=lo
829
+
830
+ php_build_target=program
831
+ ])
832
+
833
+ dnl
834
+ dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
835
+ dnl
836
+ dnl Basically sets up the link-stage for building module-name
837
+ dnl from object_var in build-dir.
838
+ dnl
839
+ AC_DEFUN([PHP_SHARED_MODULE],[
840
+ install_modules="install-modules"
841
+
842
+ case $host_alias in
843
+ *aix*[)]
844
+ suffix=so
845
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
846
+ ;;
847
+ *netware*[)]
848
+ suffix=nlm
849
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
850
+ ;;
851
+ *[)]
852
+ suffix=la
853
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
854
+ ;;
855
+ esac
856
+
857
+ if test "x$5" = "xyes"; then
858
+ PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
859
+ else
860
+ PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
861
+ fi
862
+ PHP_SUBST($2)
863
+ cat >>Makefile.objects<<EOF
864
+ \$(phplibdir)/$1.$suffix: $3/$1.$suffix
865
+ \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
866
+
867
+ $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
868
+ $link_cmd
869
+
870
+ EOF
871
+ ])
872
+
873
+ dnl
874
+ dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
875
+ dnl
876
+ dnl Selects the SAPI name and type (static, shared, programm)
877
+ dnl and optionally also the source-files for the SAPI-specific
878
+ dnl objects.
879
+ dnl
880
+ AC_DEFUN([PHP_SELECT_SAPI],[
881
+ if test "$PHP_SAPI" != "default"; then
882
+ AC_MSG_ERROR([
883
+ +--------------------------------------------------------------------+
884
+ | *** ATTENTION *** |
885
+ | |
886
+ | You've configured multiple SAPIs to be build. You can build only |
887
+ | one SAPI module and CLI binary at the same time. |
888
+ +--------------------------------------------------------------------+
889
+ ])
890
+ fi
891
+
892
+ PHP_SAPI=$1
893
+
894
+ case "$2" in
895
+ static[)] PHP_BUILD_STATIC;;
896
+ shared[)] PHP_BUILD_SHARED;;
897
+ bundle[)] PHP_BUILD_BUNDLE;;
898
+ program[)] PHP_BUILD_PROGRAM($5);;
899
+ esac
900
+
901
+ ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
902
+ ])
903
+
904
+ dnl deprecated
905
+ AC_DEFUN([PHP_EXTENSION],[
906
+ sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
907
+
908
+ PHP_NEW_EXTENSION($1, $sources, $2, $3)
909
+
910
+ if test -r "$ext_srcdir/Makefile.frag"; then
911
+ PHP_ADD_MAKEFILE_FRAGMENT
912
+ fi
913
+ ])
914
+
915
+ AC_DEFUN([PHP_ADD_BUILD_DIR],[
916
+ ifelse($2,,[
917
+ BUILD_DIR="$BUILD_DIR $1"
918
+ ], [
919
+ $php_shtool mkdir -p $1
920
+ ])
921
+ ])
922
+
923
+ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
924
+ $php_shtool mkdir -p $BUILD_DIR
925
+ ])
926
+
927
+ dnl
928
+ dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
929
+ dnl
930
+ dnl Includes an extension in the build.
931
+ dnl
932
+ dnl "extname" is the name of the ext/ subdir where the extension resides.
933
+ dnl "sources" is a list of files relative to the subdir which are used
934
+ dnl to build the extension.
935
+ dnl "shared" can be set to "shared" or "yes" to build the extension as
936
+ dnl a dynamically loadable library. Optional parameter "sapi_class" can
937
+ dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
938
+ dnl "extra-cflags" are passed to the compiler, with
939
+ dnl @ext_srcdir@ and @ext_builddir@ being substituted.
940
+ dnl "cxx" can be used to indicate that a C++ shared module is desired.
941
+ dnl "zend_ext" indicates a zend extension.
942
+ AC_DEFUN([PHP_NEW_EXTENSION],[
943
+ ext_builddir=[]PHP_EXT_BUILDDIR($1)
944
+ ext_srcdir=[]PHP_EXT_SRCDIR($1)
945
+
946
+ ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
947
+
948
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
949
+ dnl ---------------------------------------------- Static module
950
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
951
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
952
+ EXT_STATIC="$EXT_STATIC $1"
953
+ if test "$3" != "nocli"; then
954
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
955
+ fi
956
+ else
957
+ if test "$3" = "shared" || test "$3" = "yes"; then
958
+ dnl ---------------------------------------------- Shared module
959
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
960
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
961
+ case $host_alias in
962
+ *netware*[)]
963
+ PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
964
+ ;;
965
+ *[)]
966
+ PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
967
+ ;;
968
+ esac
969
+ AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
970
+ fi
971
+ fi
972
+
973
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
974
+ dnl ---------------------------------------------- CLI static module
975
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
976
+ case "$PHP_SAPI" in
977
+ cgi|embed[)]
978
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
979
+ EXT_STATIC="$EXT_STATIC $1"
980
+ ;;
981
+ *[)]
982
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
983
+ ;;
984
+ esac
985
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
986
+ fi
987
+ PHP_ADD_BUILD_DIR($ext_builddir)
988
+
989
+ dnl Set for phpize builds only
990
+ dnl ---------------------------
991
+ if test "$ext_builddir" = "."; then
992
+ PHP_PECL_EXTENSION=$1
993
+ PHP_SUBST(PHP_PECL_EXTENSION)
994
+ fi
995
+ ])
996
+
997
+ dnl
998
+ dnl PHP_WITH_SHARED
999
+ dnl
1000
+ dnl Checks whether $withval is "shared" or starts with "shared,XXX"
1001
+ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
1002
+ dnl from $withval.
1003
+ dnl
1004
+ AC_DEFUN([PHP_WITH_SHARED],[
1005
+ PHP_ARG_ANALYZE_EX(withval)
1006
+ shared=$ext_shared
1007
+ unset ext_shared ext_output
1008
+ ])
1009
+
1010
+ dnl
1011
+ dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
1012
+ dnl
1013
+ dnl This macro is scanned by genif.sh when it builds the internal functions
1014
+ dnl list, so that modules can be init'd in the correct order
1015
+ dnl $1 = name of extension, $2 = extension upon which it depends
1016
+ dnl $3 = optional: if true, it's ok for $2 to have not been configured
1017
+ dnl default is false and should halt the build.
1018
+ dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
1019
+ dnl The extension on which it depends must also have been configured.
1020
+ dnl See ADD_EXTENSION_DEP in win32 build
1021
+ dnl
1022
+ AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
1023
+ am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
1024
+ is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
1025
+ is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
1026
+ if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
1027
+ AC_MSG_ERROR([
1028
+ You've configured extension $1 to build statically, but it
1029
+ depends on extension $2, which you've configured to build shared.
1030
+ You either need to build $1 shared or build $2 statically for the
1031
+ build to be successful.
1032
+ ])
1033
+ fi
1034
+ if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
1035
+ AC_MSG_ERROR([
1036
+ You've configured extension $1, which depends on extension $2,
1037
+ but you've either not enabled $2, or have disabled it.
1038
+ ])
1039
+ fi
1040
+ dnl Some systems require that we link $2 to $1 when building
1041
+ ])
1042
+
1043
+ dnl -------------------------------------------------------------------------
1044
+ dnl Checks for structures, typedefs, broken functions, etc.
1045
+ dnl -------------------------------------------------------------------------
1046
+
1047
+ dnl Internal helper macros
1048
+ dnl
1049
+ dnl _PHP_DEF_HAVE_FILE(what, filename)
1050
+ AC_DEFUN([_PHP_DEF_HAVE_FILE], [
1051
+ php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
1052
+ echo "#define $php_def_have_what 1" >> $2
1053
+ ])
1054
+ dnl
1055
+ dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
1056
+ dnl
1057
+ AC_DEFUN([_PHP_CHECK_SIZEOF], [
1058
+ php_cache_value=php_cv_sizeof_[]$1
1059
+ AC_CACHE_VAL(php_cv_sizeof_[]$1, [
1060
+ old_LIBS=$LIBS
1061
+ LIBS=
1062
+ old_LDFLAGS=$LDFLAGS
1063
+ LDFLAGS=
1064
+ AC_TRY_RUN([#include <stdio.h>
1065
+ #if STDC_HEADERS
1066
+ #include <stdlib.h>
1067
+ #include <stddef.h>
1068
+ #endif
1069
+ #ifdef HAVE_INTTYPES_H
1070
+ #include <inttypes.h>
1071
+ #endif
1072
+ #ifdef HAVE_UNISTD_H
1073
+ #include <unistd.h>
1074
+ #endif
1075
+ $3
1076
+
1077
+ int main()
1078
+ {
1079
+ FILE *fp = fopen("conftestval", "w");
1080
+ if (!fp) return(1);
1081
+ fprintf(fp, "%d\n", sizeof($1));
1082
+ return(0);
1083
+ }
1084
+ ], [
1085
+ eval $php_cache_value=`cat conftestval`
1086
+ ], [
1087
+ eval $php_cache_value=0
1088
+ ], [
1089
+ ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
1090
+ ])
1091
+ LDFLAGS=$old_LDFLAGS
1092
+ LIBS=$old_LIBS
1093
+ ])
1094
+ if eval test "\$$php_cache_value" != "0"; then
1095
+ ifelse([$4],[],:,[$4])
1096
+ ifelse([$5],[],,[else $5])
1097
+ fi
1098
+ ])
1099
+
1100
+ dnl
1101
+ dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
1102
+ dnl
1103
+ AC_DEFUN([PHP_CHECK_SIZEOF], [
1104
+ AC_MSG_CHECKING([size of $1])
1105
+ _PHP_CHECK_SIZEOF($1, $2, $3, [
1106
+ AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1107
+ AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1108
+ ])
1109
+ AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
1110
+ ])
1111
+
1112
+ dnl
1113
+ dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
1114
+ dnl
1115
+ AC_DEFUN([PHP_CHECK_TYPES], [
1116
+ for php_typename in $1; do
1117
+ AC_MSG_CHECKING([whether $php_typename exists])
1118
+ _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
1119
+ _PHP_DEF_HAVE_FILE($php_typename, $2)
1120
+ AC_MSG_RESULT([yes])
1121
+ ], [
1122
+ AC_MSG_RESULT([no])
1123
+ ])
1124
+ done
1125
+ ])
1126
+
1127
+ dnl
1128
+ dnl PHP_CHECK_IN_ADDR_T
1129
+ dnl
1130
+ AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
1131
+ dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
1132
+ AC_MSG_CHECKING([for in_addr_t])
1133
+ AC_CACHE_VAL(ac_cv_type_in_addr_t,
1134
+ [AC_EGREP_CPP(dnl
1135
+ changequote(<<,>>)dnl
1136
+ <<in_addr_t[^a-zA-Z_0-9]>>dnl
1137
+ changequote([,]), [#include <sys/types.h>
1138
+ #if STDC_HEADERS
1139
+ #include <stdlib.h>
1140
+ #include <stddef.h>
1141
+ #endif
1142
+ #ifdef HAVE_NETINET_IN_H
1143
+ #include <netinet/in.h>
1144
+ #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
1145
+ AC_MSG_RESULT([$ac_cv_type_in_addr_t])
1146
+ if test $ac_cv_type_in_addr_t = no; then
1147
+ AC_DEFINE(in_addr_t, u_int, [ ])
1148
+ fi
1149
+ ])
1150
+
1151
+ dnl
1152
+ dnl PHP_TIME_R_TYPE
1153
+ dnl
1154
+ dnl Check type of reentrant time-related functions
1155
+ dnl Type can be: irix, hpux or POSIX
1156
+ dnl
1157
+ AC_DEFUN([PHP_TIME_R_TYPE],[
1158
+ AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
1159
+ AC_TRY_RUN([
1160
+ #include <time.h>
1161
+
1162
+ main() {
1163
+ char buf[27];
1164
+ struct tm t;
1165
+ time_t old = 0;
1166
+ int r, s;
1167
+
1168
+ s = gmtime_r(&old, &t);
1169
+ r = (int) asctime_r(&t, buf, 26);
1170
+ if (r == s && s == 0) return (0);
1171
+ return (1);
1172
+ }
1173
+ ],[
1174
+ ac_cv_time_r_type=hpux
1175
+ ],[
1176
+ AC_TRY_RUN([
1177
+ #include <time.h>
1178
+ main() {
1179
+ struct tm t, *s;
1180
+ time_t old = 0;
1181
+ char buf[27], *p;
1182
+
1183
+ s = gmtime_r(&old, &t);
1184
+ p = asctime_r(&t, buf, 26);
1185
+ if (p == buf && s == &t) return (0);
1186
+ return (1);
1187
+ }
1188
+ ],[
1189
+ ac_cv_time_r_type=irix
1190
+ ],[
1191
+ ac_cv_time_r_type=POSIX
1192
+ ],[
1193
+ ac_cv_time_r_type=POSIX
1194
+ ])
1195
+ ],[
1196
+ ac_cv_time_r_type=POSIX
1197
+ ])
1198
+ ])
1199
+ case $ac_cv_time_r_type in
1200
+ hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
1201
+ irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
1202
+ esac
1203
+ ])
1204
+
1205
+ dnl
1206
+ dnl PHP_DOES_PWRITE_WORK
1207
+ dnl internal
1208
+ AC_DEFUN([PHP_DOES_PWRITE_WORK],[
1209
+ AC_TRY_RUN([
1210
+ #include <sys/types.h>
1211
+ #include <sys/stat.h>
1212
+ #include <fcntl.h>
1213
+ #include <unistd.h>
1214
+ #include <errno.h>
1215
+ $1
1216
+ main() {
1217
+ int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1218
+
1219
+ if (fd < 0) exit(1);
1220
+ if (pwrite(fd, "text", 4, 0) != 4) exit(1);
1221
+ /* Linux glibc breakage until 2.2.5 */
1222
+ if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
1223
+ exit(0);
1224
+ }
1225
+
1226
+ ],[
1227
+ ac_cv_pwrite=yes
1228
+ ],[
1229
+ ac_cv_pwrite=no
1230
+ ],[
1231
+ ac_cv_pwrite=no
1232
+ ])
1233
+ ])
1234
+
1235
+ dnl PHP_DOES_PREAD_WORK
1236
+ dnl internal
1237
+ AC_DEFUN([PHP_DOES_PREAD_WORK],[
1238
+ echo test > conftest_in
1239
+ AC_TRY_RUN([
1240
+ #include <sys/types.h>
1241
+ #include <sys/stat.h>
1242
+ #include <fcntl.h>
1243
+ #include <unistd.h>
1244
+ #include <errno.h>
1245
+ $1
1246
+ main() {
1247
+ char buf[3];
1248
+ int fd = open("conftest_in", O_RDONLY);
1249
+ if (fd < 0) exit(1);
1250
+ if (pread(fd, buf, 2, 0) != 2) exit(1);
1251
+ /* Linux glibc breakage until 2.2.5 */
1252
+ if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
1253
+ exit(0);
1254
+ }
1255
+ ],[
1256
+ ac_cv_pread=yes
1257
+ ],[
1258
+ ac_cv_pread=no
1259
+ ],[
1260
+ ac_cv_pread=no
1261
+ ])
1262
+ rm -f conftest_in
1263
+ ])
1264
+
1265
+ dnl
1266
+ dnl PHP_PWRITE_TEST
1267
+ dnl
1268
+ AC_DEFUN([PHP_PWRITE_TEST],[
1269
+ AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
1270
+ PHP_DOES_PWRITE_WORK
1271
+ if test "$ac_cv_pwrite" = "no"; then
1272
+ PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
1273
+ if test "$ac_cv_pwrite" = "yes"; then
1274
+ ac_cv_pwrite=64
1275
+ fi
1276
+ fi
1277
+ ])
1278
+
1279
+ if test "$ac_cv_pwrite" != "no"; then
1280
+ AC_DEFINE(HAVE_PWRITE, 1, [ ])
1281
+ if test "$ac_cv_pwrite" = "64"; then
1282
+ AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1283
+ fi
1284
+ fi
1285
+ ])
1286
+
1287
+ dnl
1288
+ dnl PHP_PREAD_TEST
1289
+ dnl
1290
+ AC_DEFUN([PHP_PREAD_TEST],[
1291
+ AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
1292
+ PHP_DOES_PREAD_WORK
1293
+ if test "$ac_cv_pread" = "no"; then
1294
+ PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
1295
+ if test "$ac_cv_pread" = "yes"; then
1296
+ ac_cv_pread=64
1297
+ fi
1298
+ fi
1299
+ ])
1300
+
1301
+ if test "$ac_cv_pread" != "no"; then
1302
+ AC_DEFINE(HAVE_PREAD, 1, [ ])
1303
+ if test "$ac_cv_pread" = "64"; then
1304
+ AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1305
+ fi
1306
+ fi
1307
+ ])
1308
+
1309
+ dnl
1310
+ dnl PHP_MISSING_TIME_R_DECL
1311
+ dnl
1312
+ AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1313
+ AC_MSG_CHECKING([for missing declarations of reentrant functions])
1314
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
1315
+ :
1316
+ ],[
1317
+ AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1318
+ ])
1319
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
1320
+ :
1321
+ ],[
1322
+ AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1323
+ ])
1324
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
1325
+ :
1326
+ ],[
1327
+ AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1328
+ ])
1329
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
1330
+ :
1331
+ ],[
1332
+ AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1333
+ ])
1334
+ AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
1335
+ :
1336
+ ],[
1337
+ AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1338
+ ])
1339
+ AC_MSG_RESULT([done])
1340
+ ])
1341
+
1342
+ dnl
1343
+ dnl PHP_READDIR_R_TYPE
1344
+ dnl
1345
+ AC_DEFUN([PHP_READDIR_R_TYPE],[
1346
+ dnl HAVE_READDIR_R is also defined by libmysql
1347
+ AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
1348
+ if test "$ac_cv_func_readdir_r" = "yes"; then
1349
+ AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
1350
+ AC_TRY_RUN([
1351
+ #define _REENTRANT
1352
+ #include <sys/types.h>
1353
+ #include <dirent.h>
1354
+
1355
+ #ifndef PATH_MAX
1356
+ #define PATH_MAX 1024
1357
+ #endif
1358
+
1359
+ main() {
1360
+ DIR *dir;
1361
+ char entry[sizeof(struct dirent)+PATH_MAX];
1362
+ struct dirent *pentry = (struct dirent *) &entry;
1363
+
1364
+ dir = opendir("/");
1365
+ if (!dir)
1366
+ exit(1);
1367
+ if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
1368
+ exit(0);
1369
+ exit(1);
1370
+ }
1371
+ ],[
1372
+ ac_cv_what_readdir_r=POSIX
1373
+ ],[
1374
+ AC_TRY_CPP([
1375
+ #define _REENTRANT
1376
+ #include <sys/types.h>
1377
+ #include <dirent.h>
1378
+ int readdir_r(DIR *, struct dirent *);
1379
+ ],[
1380
+ ac_cv_what_readdir_r=old-style
1381
+ ],[
1382
+ ac_cv_what_readdir_r=none
1383
+ ])
1384
+ ],[
1385
+ ac_cv_what_readdir_r=none
1386
+ ])
1387
+ ])
1388
+ case $ac_cv_what_readdir_r in
1389
+ POSIX)
1390
+ AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
1391
+ old-style)
1392
+ AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
1393
+ esac
1394
+ fi
1395
+ ])
1396
+
1397
+ dnl
1398
+ dnl PHP_TM_GMTOFF
1399
+ dnl
1400
+ AC_DEFUN([PHP_TM_GMTOFF],[
1401
+ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
1402
+ [AC_TRY_COMPILE([#include <sys/types.h>
1403
+ #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1404
+ ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
1405
+
1406
+ if test "$ac_cv_struct_tm_gmtoff" = yes; then
1407
+ AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
1408
+ fi
1409
+ ])
1410
+
1411
+ dnl
1412
+ dnl PHP_STRUCT_FLOCK
1413
+ dnl
1414
+ AC_DEFUN([PHP_STRUCT_FLOCK],[
1415
+ AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
1416
+ AC_TRY_COMPILE([
1417
+ #include <unistd.h>
1418
+ #include <fcntl.h>
1419
+ ],
1420
+ [struct flock x;],
1421
+ [
1422
+ ac_cv_struct_flock=yes
1423
+ ],[
1424
+ ac_cv_struct_flock=no
1425
+ ])
1426
+ )
1427
+ if test "$ac_cv_struct_flock" = "yes" ; then
1428
+ AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
1429
+ fi
1430
+ ])
1431
+
1432
+ dnl
1433
+ dnl PHP_SOCKLEN_T
1434
+ dnl
1435
+ AC_DEFUN([PHP_SOCKLEN_T],[
1436
+ AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
1437
+ AC_TRY_COMPILE([
1438
+ #include <sys/types.h>
1439
+ #include <sys/socket.h>
1440
+ ],[
1441
+ socklen_t x;
1442
+ ],[
1443
+ ac_cv_socklen_t=yes
1444
+ ],[
1445
+ ac_cv_socklen_t=no
1446
+ ]))
1447
+ if test "$ac_cv_socklen_t" = "yes"; then
1448
+ AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
1449
+ fi
1450
+ ])
1451
+
1452
+ dnl
1453
+ dnl PHP_MISSING_FCLOSE_DECL
1454
+ dnl
1455
+ dnl See if we have broken header files like SunOS has.
1456
+ dnl
1457
+ AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
1458
+ AC_MSG_CHECKING([for fclose declaration])
1459
+ AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
1460
+ AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
1461
+ AC_MSG_RESULT([ok])
1462
+ ],[
1463
+ AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
1464
+ AC_MSG_RESULT([missing])
1465
+ ])
1466
+ ])
1467
+
1468
+ dnl
1469
+ dnl PHP_AC_BROKEN_SPRINTF
1470
+ dnl
1471
+ dnl Check for broken sprintf(), C99 conformance
1472
+ dnl
1473
+ AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
1474
+ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
1475
+ AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
1476
+ ac_cv_broken_sprintf=no
1477
+ ],[
1478
+ ac_cv_broken_sprintf=yes
1479
+ ],[
1480
+ ac_cv_broken_sprintf=no
1481
+ ])
1482
+ ])
1483
+ if test "$ac_cv_broken_sprintf" = "yes"; then
1484
+ AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
1485
+ else
1486
+ AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
1487
+ fi
1488
+ ])
1489
+
1490
+ dnl
1491
+ dnl PHP_AC_BROKEN_SNPRINTF
1492
+ dnl
1493
+ dnl Check for broken snprintf(), C99 conformance
1494
+ dnl
1495
+ AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
1496
+ AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
1497
+ AC_TRY_RUN([
1498
+ #define NULL (0L)
1499
+ main() {
1500
+ char buf[20];
1501
+ int res = 0;
1502
+ res = res || (snprintf(buf, 2, "marcus") != 6);
1503
+ res = res || (buf[1] != '\0');
1504
+ /* Implementations may consider this as an encoding error */
1505
+ snprintf(buf, 0, "boerger");
1506
+ /* However, they MUST ignore the pointer */
1507
+ res = res || (buf[0] != 'm');
1508
+ res = res || (snprintf(NULL, 0, "boerger") != 7);
1509
+ res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
1510
+ exit(res);
1511
+ }
1512
+ ],[
1513
+ ac_cv_broken_snprintf=no
1514
+ ],[
1515
+ ac_cv_broken_snprintf=yes
1516
+ ],[
1517
+ ac_cv_broken_snprintf=no
1518
+ ])
1519
+ ])
1520
+ if test "$ac_cv_broken_snprintf" = "yes"; then
1521
+ AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
1522
+ else
1523
+ AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
1524
+ fi
1525
+ ])
1526
+
1527
+ dnl
1528
+ dnl PHP_SOLARIS_PIC_WEIRDNESS
1529
+ dnl
1530
+ dnl Solaris requires main code to be position independent in order
1531
+ dnl to let shared objects find symbols. Weird. Ugly.
1532
+ dnl
1533
+ dnl Must be run after all --with-NN options that let the user
1534
+ dnl choose dynamic extensions, and after the gcc test.
1535
+ dnl
1536
+ AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
1537
+ AC_MSG_CHECKING([whether -fPIC is required])
1538
+ if test -n "$EXT_SHARED"; then
1539
+ os=`uname -sr 2>/dev/null`
1540
+ case $os in
1541
+ "SunOS 5.6"|"SunOS 5.7"[)]
1542
+ case $CC in
1543
+ gcc*|egcs*)
1544
+ CFLAGS="$CFLAGS -fPIC";;
1545
+ *[)]
1546
+ CFLAGS="$CFLAGS -fpic";;
1547
+ esac
1548
+ AC_MSG_RESULT([yes]);;
1549
+ *[)]
1550
+ AC_MSG_RESULT([no]);;
1551
+ esac
1552
+ else
1553
+ AC_MSG_RESULT([no])
1554
+ fi
1555
+ ])
1556
+
1557
+ dnl
1558
+ dnl PHP_SYS_LFS
1559
+ dnl
1560
+ dnl The problem is that the default compilation flags in Solaris 2.6 won't
1561
+ dnl let programs access large files; you need to tell the compiler that
1562
+ dnl you actually want your programs to work on large files. For more
1563
+ dnl details about this brain damage please see:
1564
+ dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
1565
+ dnl
1566
+ dnl Written by Paul Eggert <eggert@twinsun.com>.
1567
+ dnl
1568
+ AC_DEFUN([PHP_SYS_LFS],
1569
+ [dnl
1570
+ # If available, prefer support for large files unless the user specified
1571
+ # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1572
+ AC_MSG_CHECKING([whether large file support needs explicit enabling])
1573
+ ac_getconfs=''
1574
+ ac_result=yes
1575
+ ac_set=''
1576
+ ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1577
+ for ac_shellvar in $ac_shellvars; do
1578
+ case $ac_shellvar in
1579
+ CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
1580
+ *[)] ac_lfsvar=LFS_$ac_shellvar ;;
1581
+ esac
1582
+ eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1583
+ (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1584
+ ac_getconf=`getconf $ac_lfsvar`
1585
+ ac_getconfs=$ac_getconfs$ac_getconf
1586
+ eval ac_test_$ac_shellvar=\$ac_getconf
1587
+ done
1588
+ case "$ac_result$ac_getconfs" in
1589
+ yes[)] ac_result=no ;;
1590
+ esac
1591
+ case "$ac_result$ac_set" in
1592
+ yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
1593
+ esac
1594
+ AC_MSG_RESULT([$ac_result])
1595
+ case $ac_result in
1596
+ yes[)]
1597
+ for ac_shellvar in $ac_shellvars; do
1598
+ eval $ac_shellvar=\$ac_test_$ac_shellvar
1599
+ done ;;
1600
+ esac
1601
+ ])
1602
+
1603
+ dnl
1604
+ dnl PHP_SOCKADDR_CHECKS
1605
+ dnl
1606
+ AC_DEFUN([PHP_SOCKADDR_CHECKS], [
1607
+ dnl Check for struct sockaddr_storage exists
1608
+ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
1609
+ [AC_TRY_COMPILE([#include <sys/types.h>
1610
+ #include <sys/socket.h>],
1611
+ [struct sockaddr_storage s; s],
1612
+ [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
1613
+ ])
1614
+ if test "$ac_cv_sockaddr_storage" = "yes"; then
1615
+ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
1616
+ fi
1617
+ dnl Check if field sa_len exists in struct sockaddr
1618
+ AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
1619
+ AC_TRY_COMPILE([#include <sys/types.h>
1620
+ #include <sys/socket.h>],
1621
+ [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
1622
+ [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
1623
+ ])
1624
+ if test "$ac_cv_sockaddr_sa_len" = "yes"; then
1625
+ AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
1626
+ fi
1627
+ ])
1628
+
1629
+ dnl
1630
+ dnl PHP_DECLARED_TIMEZONE
1631
+ dnl
1632
+ AC_DEFUN([PHP_DECLARED_TIMEZONE],[
1633
+ AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
1634
+ AC_TRY_COMPILE([
1635
+ #include <sys/types.h>
1636
+ #include <time.h>
1637
+ #ifdef HAVE_SYS_TIME_H
1638
+ #include <sys/time.h>
1639
+ #endif
1640
+ ],[
1641
+ time_t foo = (time_t) timezone;
1642
+ ],[
1643
+ ac_cv_declared_timezone=yes
1644
+ ],[
1645
+ ac_cv_declared_timezone=no
1646
+ ])])
1647
+ if test "$ac_cv_declared_timezone" = "yes"; then
1648
+ AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
1649
+ fi
1650
+ ])
1651
+
1652
+ dnl
1653
+ dnl PHP_EBCDIC
1654
+ dnl
1655
+ AC_DEFUN([PHP_EBCDIC], [
1656
+ AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
1657
+ AC_TRY_RUN( [
1658
+ int main(void) {
1659
+ return (unsigned char)'A' != (unsigned char)0xC1;
1660
+ }
1661
+ ],[
1662
+ ac_cv_ebcdic=yes
1663
+ ],[
1664
+ ac_cv_ebcdic=no
1665
+ ],[
1666
+ ac_cv_ebcdic=no
1667
+ ])])
1668
+ if test "$ac_cv_ebcdic" = "yes"; then
1669
+ AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
1670
+ fi
1671
+ ])
1672
+
1673
+ dnl
1674
+ dnl PHP_BROKEN_GETCWD
1675
+ dnl
1676
+ dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
1677
+ dnl component of the path has execute but not read permissions
1678
+ dnl
1679
+ AC_DEFUN([PHP_BROKEN_GETCWD],[
1680
+ AC_MSG_CHECKING([for broken getcwd])
1681
+ os=`uname -sr 2>/dev/null`
1682
+ case $os in
1683
+ SunOS*[)]
1684
+ AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1685
+ AC_MSG_RESULT([yes]);;
1686
+ *[)]
1687
+ AC_MSG_RESULT([no]);;
1688
+ esac
1689
+ ])
1690
+
1691
+ dnl
1692
+ dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
1693
+ dnl
1694
+ AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
1695
+ AC_MSG_CHECKING([for broken libc stdio])
1696
+ AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
1697
+ AC_TRY_RUN([
1698
+ #include <stdio.h>
1699
+ int main(int argc, char *argv[])
1700
+ {
1701
+ FILE *fp;
1702
+ long position;
1703
+ char *filename = "/tmp/phpglibccheck";
1704
+
1705
+ fp = fopen(filename, "w");
1706
+ if (fp == NULL) {
1707
+ perror("fopen");
1708
+ exit(2);
1709
+ }
1710
+ fputs("foobar", fp);
1711
+ fclose(fp);
1712
+
1713
+ fp = fopen(filename, "a+");
1714
+ position = ftell(fp);
1715
+ fclose(fp);
1716
+ unlink(filename);
1717
+ if (position == 0)
1718
+ return 1;
1719
+ return 0;
1720
+ }
1721
+ ],
1722
+ [_cv_have_broken_glibc_fopen_append=no],
1723
+ [_cv_have_broken_glibc_fopen_append=yes ],
1724
+ AC_TRY_COMPILE([
1725
+ #include <features.h>
1726
+ ],[
1727
+ #if !__GLIBC_PREREQ(2,2)
1728
+ choke me
1729
+ #endif
1730
+ ],
1731
+ [_cv_have_broken_glibc_fopen_append=yes],
1732
+ [_cv_have_broken_glibc_fopen_append=no ])
1733
+ )])
1734
+
1735
+ if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
1736
+ AC_MSG_RESULT(yes)
1737
+ AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
1738
+ else
1739
+ AC_MSG_RESULT(no)
1740
+ fi
1741
+ ])
1742
+
1743
+ dnl
1744
+ dnl PHP_FOPENCOOKIE
1745
+ dnl
1746
+ AC_DEFUN([PHP_FOPENCOOKIE], [
1747
+ AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
1748
+
1749
+ if test "$have_glibc_fopencookie" = "yes"; then
1750
+ dnl this comes in two flavors:
1751
+ dnl newer glibcs (since 2.1.2 ? )
1752
+ dnl have a type called cookie_io_functions_t
1753
+ AC_TRY_COMPILE([
1754
+ #define _GNU_SOURCE
1755
+ #include <stdio.h>
1756
+ ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
1757
+
1758
+ if test "$have_cookie_io_functions_t" = "yes"; then
1759
+ cookie_io_functions_t=cookie_io_functions_t
1760
+ have_fopen_cookie=yes
1761
+
1762
+ dnl even newer glibcs have a different seeker definition...
1763
+ AC_TRY_RUN([
1764
+ #define _GNU_SOURCE
1765
+ #include <stdio.h>
1766
+
1767
+ struct cookiedata {
1768
+ __off64_t pos;
1769
+ };
1770
+
1771
+ __ssize_t reader(void *cookie, char *buffer, size_t size)
1772
+ { return size; }
1773
+ __ssize_t writer(void *cookie, const char *buffer, size_t size)
1774
+ { return size; }
1775
+ int closer(void *cookie)
1776
+ { return 0; }
1777
+ int seeker(void *cookie, __off64_t *position, int whence)
1778
+ { ((struct cookiedata*)cookie)->pos = *position; return 0; }
1779
+
1780
+ cookie_io_functions_t funcs = {reader, writer, seeker, closer};
1781
+
1782
+ main() {
1783
+ struct cookiedata g = { 0 };
1784
+ FILE *fp = fopencookie(&g, "r", funcs);
1785
+
1786
+ if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
1787
+ exit(0);
1788
+ exit(1);
1789
+ }
1790
+
1791
+ ], [
1792
+ cookie_io_functions_use_off64_t=yes
1793
+ ], [
1794
+ cookie_io_functions_use_off64_t=no
1795
+ ], [
1796
+ cookie_io_functions_use_off64_t=no
1797
+ ])
1798
+
1799
+ else
1800
+
1801
+ dnl older glibc versions (up to 2.1.2 ?)
1802
+ dnl call it _IO_cookie_io_functions_t
1803
+ AC_TRY_COMPILE([
1804
+ #define _GNU_SOURCE
1805
+ #include <stdio.h>
1806
+ ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
1807
+ if test "$have_cookie_io_functions_t" = "yes" ; then
1808
+ cookie_io_functions_t=_IO_cookie_io_functions_t
1809
+ have_fopen_cookie=yes
1810
+ fi
1811
+ fi
1812
+
1813
+ if test "$have_fopen_cookie" = "yes" ; then
1814
+ AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
1815
+ AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
1816
+ if test "$cookie_io_functions_use_off64_t" = "yes" ; then
1817
+ AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
1818
+ fi
1819
+ fi
1820
+ fi
1821
+ ])
1822
+
1823
+ dnl -------------------------------------------------------------------------
1824
+ dnl Library/function existance and build sanity checks
1825
+ dnl -------------------------------------------------------------------------
1826
+
1827
+ dnl
1828
+ dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
1829
+ dnl
1830
+ dnl Wrapper for AC_CHECK_LIB
1831
+ dnl
1832
+ AC_DEFUN([PHP_CHECK_LIBRARY], [
1833
+ save_old_LDFLAGS=$LDFLAGS
1834
+ ac_stuff="$5"
1835
+
1836
+ save_ext_shared=$ext_shared
1837
+ ext_shared=yes
1838
+ PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
1839
+ AC_CHECK_LIB([$1],[$2],[
1840
+ LDFLAGS=$save_old_LDFLAGS
1841
+ ext_shared=$save_ext_shared
1842
+ $3
1843
+ ],[
1844
+ LDFLAGS=$save_old_LDFLAGS
1845
+ ext_shared=$save_ext_shared
1846
+ unset ac_cv_lib_$1[]_$2
1847
+ $4
1848
+ ])dnl
1849
+ ])
1850
+
1851
+ dnl
1852
+ dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
1853
+ dnl
1854
+ dnl El cheapo wrapper for AC_CHECK_LIB
1855
+ dnl
1856
+ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
1857
+ save_old_LDFLAGS=$LDFLAGS
1858
+ LDFLAGS="-framework $1 $LDFLAGS"
1859
+ dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
1860
+ dnl rewriting AC_CHECK_LIB is overkill and this only affects
1861
+ dnl the "checking.." output anyway.
1862
+ AC_CHECK_LIB(c,[$2],[
1863
+ LDFLAGS=$save_old_LDFLAGS
1864
+ $3
1865
+ ],[
1866
+ LDFLAGS=$save_old_LDFLAGS
1867
+ $4
1868
+ ])
1869
+ ])
1870
+
1871
+ dnl
1872
+ dnl PHP_CHECK_FUNC_LIB(func, libs)
1873
+ dnl
1874
+ dnl This macro checks whether 'func' or '__func' exists
1875
+ dnl in the specified library.
1876
+ dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1877
+ dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
1878
+ dnl
1879
+ dnl
1880
+ dnl autoconf undefines the builtin "shift" :-(
1881
+ dnl If possible, we use the builtin shift anyway, otherwise we use
1882
+ dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
1883
+ ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
1884
+ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
1885
+ ])
1886
+ dnl
1887
+ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
1888
+ ifelse($2,,:,[
1889
+ unset ac_cv_lib_$2[]_$1
1890
+ unset ac_cv_lib_$2[]___$1
1891
+ unset found
1892
+ AC_CHECK_LIB($2, $1, [found=yes], [
1893
+ AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
1894
+ ])
1895
+
1896
+ if test "$found" = "yes"; then
1897
+ ac_libs=$LIBS
1898
+ LIBS="$LIBS -l$2"
1899
+ AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
1900
+ LIBS=$ac_libs
1901
+ fi
1902
+
1903
+ if test "$found" = "yes"; then
1904
+ PHP_ADD_LIBRARY($2)
1905
+ PHP_DEF_HAVE($1)
1906
+ PHP_DEF_HAVE(lib$2)
1907
+ ac_cv_func_$1=yes
1908
+ else
1909
+ PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
1910
+ fi
1911
+ ])
1912
+ ])
1913
+
1914
+ dnl
1915
+ dnl PHP_CHECK_FUNC(func, ...)
1916
+ dnl
1917
+ dnl This macro checks whether 'func' or '__func' exists
1918
+ dnl in the default libraries and as a fall back in the specified library.
1919
+ dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1920
+ dnl
1921
+ AC_DEFUN([PHP_CHECK_FUNC],[
1922
+ unset ac_cv_func_$1
1923
+ unset ac_cv_func___$1
1924
+ unset found
1925
+
1926
+ AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
1927
+
1928
+ case $found in
1929
+ yes[)]
1930
+ PHP_DEF_HAVE($1)
1931
+ ac_cv_func_$1=yes
1932
+ ;;
1933
+ ifelse($#,1,,[
1934
+ *[)] PHP_CHECK_FUNC_LIB($@) ;;
1935
+ ])
1936
+ esac
1937
+ ])
1938
+
1939
+ dnl
1940
+ dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
1941
+ dnl
1942
+ dnl This macro checks whether build works and given function exists.
1943
+ dnl
1944
+ AC_DEFUN([PHP_TEST_BUILD], [
1945
+ old_LIBS=$LIBS
1946
+ LIBS="$4 $LIBS"
1947
+ AC_TRY_RUN([
1948
+ $5
1949
+ char $1();
1950
+ int main() {
1951
+ $1();
1952
+ return 0;
1953
+ }
1954
+ ], [
1955
+ LIBS=$old_LIBS
1956
+ $2
1957
+ ],[
1958
+ LIBS=$old_LIBS
1959
+ $3
1960
+ ],[
1961
+ LIBS=$old_LIBS
1962
+ ])
1963
+ ])
1964
+
1965
+ dnl -------------------------------------------------------------------------
1966
+ dnl Platform characteristics checks
1967
+ dnl -------------------------------------------------------------------------
1968
+
1969
+ dnl
1970
+ dnl PHP_SHLIB_SUFFIX_NAMES
1971
+ dnl
1972
+ dnl Determines link library suffix SHLIB_SUFFIX_NAME
1973
+ dnl which can be: .so, .sl or .dylib
1974
+ dnl
1975
+ dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
1976
+ dnl suffix can be: .so or .sl
1977
+ dnl
1978
+ AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
1979
+ AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
1980
+ PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
1981
+ PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
1982
+ SHLIB_SUFFIX_NAME=so
1983
+ SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
1984
+ case $host_alias in
1985
+ *hpux*[)]
1986
+ SHLIB_SUFFIX_NAME=sl
1987
+ SHLIB_DL_SUFFIX_NAME=sl
1988
+ ;;
1989
+ *darwin*[)]
1990
+ SHLIB_SUFFIX_NAME=dylib
1991
+ SHLIB_DL_SUFFIX_NAME=so
1992
+ ;;
1993
+ esac
1994
+ ])
1995
+
1996
+ dnl
1997
+ dnl PHP_CHECK_64BIT([do if 32], [do if 64])
1998
+ dnl
1999
+ dnl This macro is used to detect if we're at 64-bit platform or not.
2000
+ dnl It could be useful for those external libs, that have different precompiled
2001
+ dnl versions in different directories.
2002
+ dnl
2003
+ AC_DEFUN([PHP_CHECK_64BIT],[
2004
+ AC_CHECK_SIZEOF(long int, 4)
2005
+ AC_MSG_CHECKING([checking if we're at 64-bit platform])
2006
+ if test "$ac_cv_sizeof_long_int" = "4" ; then
2007
+ AC_MSG_RESULT([no])
2008
+ $1
2009
+ else
2010
+ AC_MSG_RESULT([yes])
2011
+ $2
2012
+ fi
2013
+ ])
2014
+
2015
+ dnl
2016
+ dnl PHP_C_BIGENDIAN
2017
+ dnl
2018
+ dnl Replacement macro for AC_C_BIGENDIAN
2019
+ dnl
2020
+ AC_DEFUN([PHP_C_BIGENDIAN],
2021
+ [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
2022
+ [
2023
+ ac_cv_c_bigendian_php=unknown
2024
+ AC_TRY_RUN(
2025
+ [
2026
+ int main(void)
2027
+ {
2028
+ short one = 1;
2029
+ char *cp = (char *)&one;
2030
+
2031
+ if (*cp == 0) {
2032
+ return(0);
2033
+ } else {
2034
+ return(1);
2035
+ }
2036
+ }
2037
+ ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
2038
+ ])
2039
+ if test $ac_cv_c_bigendian_php = yes; then
2040
+ AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
2041
+ fi
2042
+ ])
2043
+
2044
+ dnl -------------------------------------------------------------------------
2045
+ dnl Checks for programs: PHP_PROG_<program>
2046
+ dnl -------------------------------------------------------------------------
2047
+
2048
+ dnl
2049
+ dnl PHP_PROG_SENDMAIL
2050
+ dnl
2051
+ dnl Search for the sendmail binary
2052
+ dnl
2053
+ AC_DEFUN([PHP_PROG_SENDMAIL], [
2054
+ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
2055
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
2056
+ PHP_SUBST(PROG_SENDMAIL)
2057
+ ])
2058
+
2059
+ dnl
2060
+ dnl PHP_PROG_AWK
2061
+ dnl
2062
+ dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
2063
+ dnl
2064
+ AC_DEFUN([PHP_PROG_AWK], [
2065
+ AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
2066
+ case "$AWK" in
2067
+ *mawk)
2068
+ AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
2069
+ ;;
2070
+ *gawk)
2071
+ ;;
2072
+ bork)
2073
+ AC_MSG_ERROR([Could not find awk; Install GNU awk])
2074
+ ;;
2075
+ *)
2076
+ AC_MSG_CHECKING([if $AWK is broken])
2077
+ if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
2078
+ AC_MSG_RESULT([yes])
2079
+ AC_MSG_ERROR([You should install GNU awk])
2080
+ else
2081
+ AC_MSG_RESULT([no])
2082
+ fi
2083
+ ;;
2084
+ esac
2085
+ PHP_SUBST(AWK)
2086
+ ])
2087
+
2088
+ dnl
2089
+ dnl PHP_PROG_BISON
2090
+ dnl
2091
+ dnl Search for bison and check it's version
2092
+ dnl
2093
+ AC_DEFUN([PHP_PROG_BISON], [
2094
+ AC_PROG_YACC
2095
+ LIBZEND_BISON_CHECK
2096
+ PHP_SUBST(YACC)
2097
+ ])
2098
+
2099
+ dnl
2100
+ dnl PHP_PROG_LEX
2101
+ dnl
2102
+ dnl Search for (f)lex and check it's version
2103
+ dnl
2104
+ AC_DEFUN([PHP_PROG_LEX], [
2105
+ dnl we only support certain flex versions
2106
+ flex_version_list="2.5.4"
2107
+
2108
+ AC_PROG_LEX
2109
+ if test "$LEX" = "flex"; then
2110
+ dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
2111
+ dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
2112
+ dnl it should be removed once we drop support of autoconf 2.13 (if ever)
2113
+ AC_DECL_YYTEXT
2114
+ :
2115
+ fi
2116
+ dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2117
+ dnl ## true, for compilers like Sun's that only set __STDC__ true in
2118
+ dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2119
+ AC_C_CONST
2120
+ if test "$ac_cv_c_const" = "yes" ; then
2121
+ LEX_CFLAGS="-DYY_USE_CONST"
2122
+ fi
2123
+
2124
+ if test "$LEX" = "flex"; then
2125
+ AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2126
+ flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2127
+ php_cv_flex_version=invalid
2128
+ for flex_check_version in $flex_version_list; do
2129
+ if test "$flex_version" = "$flex_check_version"; then
2130
+ php_cv_flex_version="$flex_check_version (ok)"
2131
+ fi
2132
+ done
2133
+ ])
2134
+ else
2135
+ flex_version=none
2136
+ fi
2137
+
2138
+ case $php_cv_flex_version in
2139
+ ""|invalid[)]
2140
+ if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2141
+ AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
2142
+ else
2143
+ flex_msg="Supported flex versions are: $flex_version_list"
2144
+ if test "$flex_version" = "none"; then
2145
+ flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2146
+ else
2147
+ flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2148
+ fi
2149
+ AC_MSG_ERROR([$flex_msg])
2150
+ fi
2151
+ LEX="exit 0;"
2152
+ ;;
2153
+ esac
2154
+ PHP_SUBST(LEX)
2155
+ ])
2156
+
2157
+ dnl
2158
+ dnl PHP_PROG_RE2C
2159
+ dnl
2160
+ dnl Search for the re2c binary and check the version
2161
+ dnl
2162
+ AC_DEFUN([PHP_PROG_RE2C],[
2163
+ AC_CHECK_PROG(RE2C, re2c, re2c)
2164
+ if test -n "$RE2C"; then
2165
+ AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
2166
+ re2c_vernum=`$RE2C --vernum 2>/dev/null`
2167
+ if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
2168
+ php_cv_re2c_version=invalid
2169
+ else
2170
+ php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
2171
+ fi
2172
+ ])
2173
+ fi
2174
+ case $php_cv_re2c_version in
2175
+ ""|invalid[)]
2176
+ AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
2177
+ RE2C="exit 0;"
2178
+ ;;
2179
+ esac
2180
+ PHP_SUBST(RE2C)
2181
+ ])
2182
+
2183
+ dnl -------------------------------------------------------------------------
2184
+ dnl Common setup macros: PHP_SETUP_<what>
2185
+ dnl -------------------------------------------------------------------------
2186
+
2187
+ dnl
2188
+ dnl PHP_SETUP_ICU([shared-add])
2189
+ dnl
2190
+ dnl Common setup macro for ICU
2191
+ dnl
2192
+ AC_DEFUN([PHP_SETUP_ICU],[
2193
+ PHP_ARG_WITH(icu-dir,,
2194
+ [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
2195
+
2196
+ if test "$PHP_ICU_DIR" = "no"; then
2197
+ PHP_ICU_DIR=DEFAULT
2198
+ fi
2199
+
2200
+ if test "$PHP_ICU_DIR" = "DEFAULT"; then
2201
+ dnl Try to find icu-config
2202
+ AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
2203
+ else
2204
+ ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
2205
+ fi
2206
+
2207
+ AC_MSG_CHECKING([for location of ICU headers and libraries])
2208
+
2209
+ dnl Trust icu-config to know better what the install prefix is..
2210
+ icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
2211
+ if test "$?" != "0" || test -z "$icu_install_prefix"; then
2212
+ AC_MSG_RESULT([not found])
2213
+ AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
2214
+ else
2215
+ AC_MSG_RESULT([$icu_install_prefix])
2216
+
2217
+ dnl Check ICU version
2218
+ AC_MSG_CHECKING([for ICU 3.4 or greater])
2219
+ icu_version_full=`$ICU_CONFIG --version`
2220
+ ac_IFS=$IFS
2221
+ IFS="."
2222
+ set $icu_version_full
2223
+ IFS=$ac_IFS
2224
+ icu_version=`expr [$]1 \* 1000 + [$]2`
2225
+ AC_MSG_RESULT([found $icu_version_full])
2226
+
2227
+ if test "$icu_version" -lt "3004"; then
2228
+ AC_MSG_ERROR([ICU version 3.4 or later is required])
2229
+ fi
2230
+
2231
+ ICU_VERSION=$icu_version
2232
+ ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2233
+ ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2234
+ PHP_EVAL_INCLINE($ICU_INCS)
2235
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
2236
+ fi
2237
+ ])
2238
+
2239
+ dnl
2240
+ dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
2241
+ dnl
2242
+ dnl Common setup macro for kerberos
2243
+ dnl
2244
+ AC_DEFUN([PHP_SETUP_KERBEROS],[
2245
+ found_kerberos=no
2246
+ unset KERBEROS_CFLAGS
2247
+ unset KERBEROS_LIBS
2248
+
2249
+ dnl First try to find krb5-config
2250
+ if test -z "$KRB5_CONFIG"; then
2251
+ AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
2252
+ fi
2253
+
2254
+ dnl If krb5-config is found try using it
2255
+ if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
2256
+ KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
2257
+ KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
2258
+
2259
+ if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
2260
+ found_kerberos=yes
2261
+ PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
2262
+ PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
2263
+ fi
2264
+ fi
2265
+
2266
+ dnl If still not found use old skool method
2267
+ if test "$found_kerberos" = "no"; then
2268
+
2269
+ if test "$PHP_KERBEROS" = "yes"; then
2270
+ PHP_KERBEROS="/usr/kerberos /usr/local /usr"
2271
+ fi
2272
+
2273
+ for i in $PHP_KERBEROS; do
2274
+ if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then
2275
+ PHP_KERBEROS_DIR=$i
2276
+ break
2277
+ fi
2278
+ done
2279
+
2280
+ if test "$PHP_KERBEROS_DIR"; then
2281
+ found_kerberos=yes
2282
+ PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
2283
+ PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
2284
+ PHP_ADD_LIBRARY(krb5, 1, $1)
2285
+ PHP_ADD_LIBRARY(k5crypto, 1, $1)
2286
+ PHP_ADD_LIBRARY(com_err, 1, $1)
2287
+ PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
2288
+ fi
2289
+ fi
2290
+
2291
+ if test "$found_kerberos" = "yes"; then
2292
+ ifelse([$2],[],:,[$2])
2293
+ ifelse([$3],[],,[else $3])
2294
+ fi
2295
+ ])
2296
+
2297
+ dnl
2298
+ dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
2299
+ dnl
2300
+ dnl Common setup macro for openssl
2301
+ dnl
2302
+ AC_DEFUN([PHP_SETUP_OPENSSL],[
2303
+ found_openssl=no
2304
+ unset OPENSSL_INCDIR
2305
+ unset OPENSSL_LIBDIR
2306
+
2307
+ dnl Empty variable means 'no'
2308
+ test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
2309
+ test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
2310
+
2311
+ dnl Fallbacks for different configure options
2312
+ if test "$PHP_OPENSSL" != "no"; then
2313
+ PHP_OPENSSL_DIR=$PHP_OPENSSL
2314
+ elif test "$PHP_IMAP_SSL" != "no"; then
2315
+ PHP_OPENSSL_DIR=$PHP_IMAP_SSL
2316
+ fi
2317
+
2318
+ dnl First try to find pkg-config
2319
+ if test -z "$PKG_CONFIG"; then
2320
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2321
+ fi
2322
+
2323
+ dnl If pkg-config is found try using it
2324
+ if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
2325
+ if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
2326
+ found_openssl=yes
2327
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
2328
+ OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
2329
+ OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
2330
+ else
2331
+ AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2332
+ fi
2333
+
2334
+ if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
2335
+ PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
2336
+ PHP_EVAL_INCLINE($OPENSSL_INCS)
2337
+ fi
2338
+ fi
2339
+
2340
+ dnl If pkg-config fails for some reason, revert to the old method
2341
+ if test "$found_openssl" = "no"; then
2342
+
2343
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
2344
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
2345
+ fi
2346
+
2347
+ for i in $PHP_OPENSSL_DIR; do
2348
+ if test -r $i/include/openssl/evp.h; then
2349
+ OPENSSL_INCDIR=$i/include
2350
+ fi
2351
+ if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
2352
+ OPENSSL_LIBDIR=$i/$PHP_LIBDIR
2353
+ fi
2354
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
2355
+ done
2356
+
2357
+ if test -z "$OPENSSL_INCDIR"; then
2358
+ AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
2359
+ fi
2360
+
2361
+ if test -z "$OPENSSL_LIBDIR"; then
2362
+ AC_MSG_ERROR([Cannot find OpenSSL's libraries])
2363
+ fi
2364
+
2365
+ old_CPPFLAGS=$CPPFLAGS
2366
+ CPPFLAGS=-I$OPENSSL_INCDIR
2367
+ AC_MSG_CHECKING([for OpenSSL version])
2368
+ AC_EGREP_CPP(yes,[
2369
+ #include <openssl/opensslv.h>
2370
+ #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
2371
+ yes
2372
+ #endif
2373
+ ],[
2374
+ AC_MSG_RESULT([>= 0.9.6])
2375
+ ],[
2376
+ AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2377
+ ])
2378
+ CPPFLAGS=$old_CPPFLAGS
2379
+
2380
+ PHP_ADD_INCLUDE($OPENSSL_INCDIR)
2381
+
2382
+ PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
2383
+ PHP_ADD_LIBRARY(crypto,,$1)
2384
+ ],[
2385
+ AC_MSG_ERROR([libcrypto not found!])
2386
+ ],[
2387
+ -L$OPENSSL_LIBDIR
2388
+ ])
2389
+
2390
+ old_LIBS=$LIBS
2391
+ LIBS="$LIBS -lcrypto"
2392
+ PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
2393
+ found_openssl=yes
2394
+ ],[
2395
+ AC_MSG_ERROR([libssl not found!])
2396
+ ],[
2397
+ -L$OPENSSL_LIBDIR
2398
+ ])
2399
+ LIBS=$old_LIBS
2400
+ PHP_ADD_LIBRARY(ssl,,$1)
2401
+
2402
+ PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
2403
+ fi
2404
+
2405
+ if test "$found_openssl" = "yes"; then
2406
+ dnl For apache 1.3.x static build
2407
+ OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
2408
+ AC_SUBST(OPENSSL_INCDIR_OPT)
2409
+
2410
+ ifelse([$2],[],:,[$2])
2411
+ ifelse([$3],[],,[else $3])
2412
+ fi
2413
+ ])
2414
+
2415
+ dnl
2416
+ dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
2417
+ dnl
2418
+ dnl Common setup macro for iconv
2419
+ dnl
2420
+ AC_DEFUN([PHP_SETUP_ICONV], [
2421
+ found_iconv=no
2422
+ unset ICONV_DIR
2423
+
2424
+ # Create the directories for a VPATH build:
2425
+ $php_shtool mkdir -p ext/iconv
2426
+
2427
+ echo > ext/iconv/php_have_bsd_iconv.h
2428
+ echo > ext/iconv/php_have_ibm_iconv.h
2429
+ echo > ext/iconv/php_have_glibc_iconv.h
2430
+ echo > ext/iconv/php_have_libiconv.h
2431
+ echo > ext/iconv/php_have_iconv.h
2432
+ echo > ext/iconv/php_php_iconv_impl.h
2433
+ echo > ext/iconv/php_iconv_aliased_libiconv.h
2434
+ echo > ext/iconv/php_php_iconv_h_path.h
2435
+ echo > ext/iconv/php_iconv_supports_errno.h
2436
+
2437
+ dnl
2438
+ dnl Check libc first if no path is provided in --with-iconv
2439
+ dnl
2440
+ if test "$PHP_ICONV" = "yes"; then
2441
+ AC_CHECK_FUNC(iconv, [
2442
+ found_iconv=yes
2443
+ ],[
2444
+ AC_CHECK_FUNC(libiconv,[
2445
+ PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2446
+ AC_DEFINE(HAVE_LIBICONV, 1, [ ])
2447
+ found_iconv=yes
2448
+ ])
2449
+ ])
2450
+ fi
2451
+
2452
+ dnl
2453
+ dnl Check external libs for iconv funcs
2454
+ dnl
2455
+ if test "$found_iconv" = "no"; then
2456
+
2457
+ for i in $PHP_ICONV /usr/local /usr; do
2458
+ if test -r $i/include/giconv.h; then
2459
+ AC_DEFINE(HAVE_GICONV_H, 1, [ ])
2460
+ ICONV_DIR=$i
2461
+ iconv_lib_name=giconv
2462
+ break
2463
+ elif test -r $i/include/iconv.h; then
2464
+ ICONV_DIR=$i
2465
+ iconv_lib_name=iconv
2466
+ break
2467
+ fi
2468
+ done
2469
+
2470
+ if test -z "$ICONV_DIR"; then
2471
+ AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
2472
+ fi
2473
+
2474
+ if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
2475
+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
2476
+ then
2477
+ PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
2478
+ found_iconv=yes
2479
+ PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2480
+ AC_DEFINE(HAVE_LIBICONV,1,[ ])
2481
+ PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
2482
+ AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
2483
+ ], [
2484
+ PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
2485
+ found_iconv=yes
2486
+ ], [], [
2487
+ -L$ICONV_DIR/$PHP_LIBDIR
2488
+ ])
2489
+ ], [
2490
+ -L$ICONV_DIR/$PHP_LIBDIR
2491
+ ])
2492
+ fi
2493
+ fi
2494
+
2495
+ if test "$found_iconv" = "yes"; then
2496
+ PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
2497
+ AC_DEFINE(HAVE_ICONV,1,[ ])
2498
+ if test -n "$ICONV_DIR"; then
2499
+ PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
2500
+ PHP_ADD_INCLUDE($ICONV_DIR/include)
2501
+ fi
2502
+ $2
2503
+ ifelse([$3],[],,[else $3])
2504
+ fi
2505
+ ])
2506
+
2507
+ dnl
2508
+ dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
2509
+ dnl
2510
+ dnl Common setup macro for libxml
2511
+ dnl
2512
+ AC_DEFUN([PHP_SETUP_LIBXML], [
2513
+ AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
2514
+ [
2515
+ for i in $PHP_LIBXML_DIR /usr/local /usr; do
2516
+ if test -x "$i/bin/xml2-config"; then
2517
+ ac_cv_php_xml2_config_path="$i/bin/xml2-config"
2518
+ break
2519
+ fi
2520
+ done
2521
+ ])
2522
+
2523
+ if test -x "$ac_cv_php_xml2_config_path"; then
2524
+ XML2_CONFIG="$ac_cv_php_xml2_config_path"
2525
+ libxml_full_version=`$XML2_CONFIG --version`
2526
+ ac_IFS=$IFS
2527
+ IFS="."
2528
+ set $libxml_full_version
2529
+ IFS=$ac_IFS
2530
+ LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
2531
+ if test "$LIBXML_VERSION" -ge "2006011"; then
2532
+ LIBXML_LIBS=`$XML2_CONFIG --libs`
2533
+ LIBXML_INCS=`$XML2_CONFIG --cflags`
2534
+ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
2535
+ PHP_EVAL_INCLINE($LIBXML_INCS)
2536
+
2537
+ dnl Check that build works with given libs
2538
+ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
2539
+ PHP_TEST_BUILD(xmlInitParser,
2540
+ [
2541
+ php_cv_libxml_build_works=yes
2542
+ ], [
2543
+ AC_MSG_RESULT(no)
2544
+ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
2545
+ ], [
2546
+ [$]$1
2547
+ ])
2548
+ ])
2549
+ if test "$php_cv_libxml_build_works" = "yes"; then
2550
+ AC_DEFINE(HAVE_LIBXML, 1, [ ])
2551
+ fi
2552
+ $2
2553
+ else
2554
+ AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
2555
+ fi
2556
+ ifelse([$3],[],,[else $3])
2557
+ fi
2558
+ ])
2559
+
2560
+ dnl -------------------------------------------------------------------------
2561
+ dnl Misc. macros
2562
+ dnl -------------------------------------------------------------------------
2563
+
2564
+ dnl
2565
+ dnl PHP_INSTALL_HEADERS(path [, file ...])
2566
+ dnl
2567
+ dnl PHP header files to be installed
2568
+ dnl
2569
+ AC_DEFUN([PHP_INSTALL_HEADERS],[
2570
+ ifelse([$2],[],[
2571
+ for header_file in $1; do
2572
+ PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
2573
+ INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
2574
+ ])
2575
+ done
2576
+ ], [
2577
+ header_path=$1
2578
+ for header_file in $2; do
2579
+ hp_hf="$header_path/$header_file"
2580
+ PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
2581
+ INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
2582
+ ])
2583
+ done
2584
+ ])
2585
+ ])
2586
+
2587
+ dnl
2588
+ dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
2589
+ dnl
2590
+ dnl This macro is used to get a comparable
2591
+ dnl version for apache1/2.
2592
+ dnl
2593
+ AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2594
+ ac_output=`$1 -v 2>&1 | grep version`
2595
+ ac_IFS=$IFS
2596
+ IFS="- /.
2597
+ "
2598
+ set $ac_output
2599
+ IFS=$ac_IFS
2600
+
2601
+ APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
2602
+ ])
2603
+
2604
+ dnl
2605
+ dnl PHP_DEBUG_MACRO(filename)
2606
+ dnl
2607
+ AC_DEFUN([PHP_DEBUG_MACRO],[
2608
+ DEBUG_LOG=$1
2609
+ cat >$1 <<X
2610
+ CONFIGURE: $CONFIGURE_COMMAND
2611
+ CC: $CC
2612
+ CFLAGS: $CFLAGS
2613
+ CPPFLAGS: $CPPFLAGS
2614
+ CXX: $CXX
2615
+ CXXFLAGS: $CXXFLAGS
2616
+ INCLUDES: $INCLUDES
2617
+ LDFLAGS: $LDFLAGS
2618
+ LIBS: $LIBS
2619
+ DLIBS: $DLIBS
2620
+ SAPI: $PHP_SAPI
2621
+ PHP_RPATHS: $PHP_RPATHS
2622
+ uname -a: `uname -a`
2623
+
2624
+ X
2625
+ cat >conftest.$ac_ext <<X
2626
+ main()
2627
+ {
2628
+ exit(0);
2629
+ }
2630
+ X
2631
+ (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
2632
+ rm -fr conftest*
2633
+ ])
2634
+
2635
+ dnl
2636
+ dnl PHP_CONFIG_NICE(filename)
2637
+ dnl
2638
+ dnl Generates the config.nice file
2639
+ dnl
2640
+ AC_DEFUN([PHP_CONFIG_NICE],[
2641
+ AC_REQUIRE([AC_PROG_EGREP])
2642
+ AC_REQUIRE([LT_AC_PROG_SED])
2643
+ PHP_SUBST_OLD(EGREP)
2644
+ PHP_SUBST_OLD(SED)
2645
+ test -f $1 && mv $1 $1.old
2646
+ rm -f $1.old
2647
+ cat >$1<<EOF
2648
+ #! /bin/sh
2649
+ #
2650
+ # Created by configure
2651
+
2652
+ EOF
2653
+
2654
+ for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2655
+ eval val=\$$var
2656
+ if test -n "$val"; then
2657
+ echo "$var='$val' \\" >> $1
2658
+ fi
2659
+ done
2660
+
2661
+ echo "'[$]0' \\" >> $1
2662
+ if test `expr -- [$]0 : "'.*"` = 0; then
2663
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
2664
+ else
2665
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
2666
+ fi
2667
+ for arg in $ac_configure_args; do
2668
+ if test `expr -- $arg : "'.*"` = 0; then
2669
+ if test `expr -- $arg : "--.*"` = 0; then
2670
+ break;
2671
+ fi
2672
+ echo "'[$]arg' \\" >> $1
2673
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
2674
+ else
2675
+ if test `expr -- $arg : "'--.*"` = 0; then
2676
+ break;
2677
+ fi
2678
+ echo "[$]arg \\" >> $1
2679
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
2680
+ fi
2681
+ done
2682
+ echo '"[$]@"' >> $1
2683
+ chmod +x $1
2684
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2685
+ PHP_SUBST_OLD(CONFIGURE_COMMAND)
2686
+ PHP_SUBST_OLD(CONFIGURE_OPTIONS)
2687
+ ])
2688
+
2689
+ dnl
2690
+ dnl PHP_CHECK_CONFIGURE_OPTIONS
2691
+ dnl
2692
+ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2693
+ for arg in $ac_configure_args; do
2694
+ case $arg in
2695
+ --with-*[)]
2696
+ arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2697
+ ;;
2698
+ --without-*[)]
2699
+ arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2700
+ ;;
2701
+ --enable-*[)]
2702
+ arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2703
+ ;;
2704
+ --disable-*[)]
2705
+ arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2706
+ ;;
2707
+ *[)]
2708
+ continue
2709
+ ;;
2710
+ esac
2711
+ case $arg_name in
2712
+ # Allow --disable-all / --enable-all
2713
+ enable-all[)];;
2714
+
2715
+ # Allow certain libtool options
2716
+ enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2717
+
2718
+ # Allow certain TSRM options
2719
+ with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
2720
+
2721
+ # Allow certain Zend options
2722
+ with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2723
+
2724
+ # All the rest must be set using the PHP_ARG_* macros
2725
+ # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
2726
+ *[)]
2727
+ # Options that exist before PHP 6
2728
+ if test "$PHP_MAJOR_VERSION" -lt "6"; then
2729
+ case $arg_name in
2730
+ enable-zend-multibyte[)] continue;;
2731
+ esac
2732
+ fi
2733
+
2734
+ is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2735
+ if eval test "x\$$is_arg_set" = "x"; then
2736
+ PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2737
+ [$]arg"
2738
+ fi
2739
+ ;;
2740
+ esac
2741
+ done
2742
+ ])
2743
+
2744
+ dnl
2745
+ dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2746
+ dnl
2747
+ AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
2748
+ AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [
2749
+ AC_MSG_CHECKING([for PDO includes])
2750
+ if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
2751
+ pdo_inc_path=$abs_srcdir/ext
2752
+ elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
2753
+ pdo_inc_path=$abs_srcdir/ext
2754
+ elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
2755
+ pdo_inc_path=$prefix/include/php/ext
2756
+ fi
2757
+ ])
2758
+ if test -n "$pdo_inc_path"; then
2759
+ ifelse([$1],[],:,[$1])
2760
+ else
2761
+ ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
2762
+ fi
2763
+ ])
2764
+
2765
+ dnl
2766
+ dnl PHP_DETECT_ICC
2767
+ dnl Detect Intel C++ Compiler and unset $GCC if ICC found
2768
+ AC_DEFUN([PHP_DETECT_ICC],
2769
+ [
2770
+ ICC="no"
2771
+ AC_MSG_CHECKING([for icc])
2772
+ AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
2773
+ ICC="no"
2774
+ AC_MSG_RESULT([no]),
2775
+ ICC="yes"
2776
+ GCC="no"
2777
+ AC_MSG_RESULT([yes])
2778
+ )
2779
+ ])
2780
+
2781
+ dnl PHP_DETECT_SUNCC
2782
+ dnl Detect if the systems default compiler is suncc.
2783
+ dnl We also set some usefull CFLAGS if the user didn't set any
2784
+ AC_DEFUN([PHP_DETECT_SUNCC],[
2785
+ SUNCC="no"
2786
+ AC_MSG_CHECKING([for suncc])
2787
+ AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
2788
+ SUNCC="no"
2789
+ AC_MSG_RESULT([no]),
2790
+ SUNCC="yes"
2791
+ GCC="no"
2792
+ test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
2793
+ GCC=""
2794
+ AC_MSG_RESULT([yes])
2795
+ )
2796
+ ])
2797
+
2798
+ dnl
2799
+ dnl PHP_CRYPT_R_STYLE
2800
+ dnl detect the style of crypt_r() is any is available
2801
+ dnl see APR_CHECK_CRYPT_R_STYLE() for original version
2802
+ dnl
2803
+ AC_DEFUN([PHP_CRYPT_R_STYLE],
2804
+ [
2805
+ AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
2806
+ php_cv_crypt_r_style=none
2807
+ AC_TRY_COMPILE([
2808
+ #define _REENTRANT 1
2809
+ #include <crypt.h>
2810
+ ],[
2811
+ CRYPTD buffer;
2812
+ crypt_r("passwd", "hash", &buffer);
2813
+ ],
2814
+ php_cv_crypt_r_style=cryptd)
2815
+
2816
+ if test "$php_cv_crypt_r_style" = "none"; then
2817
+ AC_TRY_COMPILE([
2818
+ #define _REENTRANT 1
2819
+ #include <crypt.h>
2820
+ ],[
2821
+ struct crypt_data buffer;
2822
+ crypt_r("passwd", "hash", &buffer);
2823
+ ],
2824
+ php_cv_crypt_r_style=struct_crypt_data)
2825
+ fi
2826
+
2827
+ if test "$php_cv_crypt_r_style" = "none"; then
2828
+ AC_TRY_COMPILE([
2829
+ #define _REENTRANT 1
2830
+ #define _GNU_SOURCE
2831
+ #include <crypt.h>
2832
+ ],[
2833
+ struct crypt_data buffer;
2834
+ crypt_r("passwd", "hash", &buffer);
2835
+ ],
2836
+ php_cv_crypt_r_style=struct_crypt_data_gnu_source)
2837
+ fi
2838
+ ])
2839
+
2840
+ if test "$php_cv_crypt_r_style" = "cryptd"; then
2841
+ AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
2842
+ fi
2843
+ if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2844
+ AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
2845
+ fi
2846
+ if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2847
+ AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
2848
+ fi
2849
+ if test "$php_cv_crypt_r_style" = "none"; then
2850
+ AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
2851
+ fi
2852
+ ])
2853
+
2854
+ dnl
2855
+ dnl PHP_TEST_WRITE_STDOUT
2856
+ dnl
2857
+ AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
2858
+ AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
2859
+ AC_TRY_RUN([
2860
+ #ifdef HAVE_UNISTD_H
2861
+ #include <unistd.h>
2862
+ #endif
2863
+
2864
+ #define TEXT "This is the test message -- "
2865
+
2866
+ main()
2867
+ {
2868
+ int n;
2869
+
2870
+ n = write(1, TEXT, sizeof(TEXT)-1);
2871
+ return (!(n == sizeof(TEXT)-1));
2872
+ }
2873
+ ],[
2874
+ ac_cv_write_stdout=yes
2875
+ ],[
2876
+ ac_cv_write_stdout=no
2877
+ ],[
2878
+ ac_cv_write_stdout=no
2879
+ ])
2880
+ ])
2881
+ if test "$ac_cv_write_stdout" = "yes"; then
2882
+ AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
2883
+ fi
2884
+ ])
2885
+
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/aclocal.m4 ADDED
@@ -0,0 +1,9251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dnl
2
+ dnl $Id: acinclude.m4 308352 2011-02-15 08:28:22Z pajoye $
3
+ dnl
4
+ dnl This file contains local autoconf functions.
5
+ dnl
6
+
7
+ dnl -------------------------------------------------------------------------
8
+ dnl Output stylize macros for configure (help/runtime)
9
+ dnl -------------------------------------------------------------------------
10
+
11
+ dnl
12
+ dnl PHP_HELP_SEPARATOR(title)
13
+ dnl
14
+ dnl Adds separator title into the configure --help display.
15
+ dnl
16
+ AC_DEFUN([PHP_HELP_SEPARATOR],[
17
+ AC_ARG_ENABLE([],[
18
+ $1
19
+ ],[])
20
+ ])
21
+
22
+ dnl
23
+ dnl PHP_CONFIGURE_PART(title)
24
+ dnl
25
+ dnl Adds separator title configure output (idea borrowed from mm)
26
+ dnl
27
+ AC_DEFUN([PHP_CONFIGURE_PART],[
28
+ AC_MSG_RESULT()
29
+ AC_MSG_RESULT([${T_MD}$1${T_ME}])
30
+ ])
31
+
32
+ dnl -------------------------------------------------------------------------
33
+ dnl Build system helper macros
34
+ dnl -------------------------------------------------------------------------
35
+
36
+ dnl
37
+ dnl PHP_DEF_HAVE(what)
38
+ dnl
39
+ dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
40
+ dnl
41
+ AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
42
+
43
+ dnl
44
+ dnl PHP_RUN_ONCE(namespace, variable, code)
45
+ dnl
46
+ dnl execute code, if variable is not set in namespace
47
+ dnl
48
+ AC_DEFUN([PHP_RUN_ONCE],[
49
+ changequote({,})
50
+ unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
51
+ changequote([,])
52
+ cmd="echo $ac_n \"\$$1$unique$ac_c\""
53
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
54
+ eval "$1$unique=set"
55
+ $3
56
+ fi
57
+ ])
58
+
59
+ dnl
60
+ dnl PHP_EXPAND_PATH(path, variable)
61
+ dnl
62
+ dnl expands path to an absolute path and assigns it to variable
63
+ dnl
64
+ AC_DEFUN([PHP_EXPAND_PATH],[
65
+ if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
66
+ $2=$1
67
+ else
68
+ changequote({,})
69
+ ep_dir="`echo $1|$SED 's%/*[^/][^/]*/*$%%'`"
70
+ changequote([,])
71
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
72
+ $2="$ep_realdir/`basename \"$1\"`"
73
+ fi
74
+ ])
75
+
76
+ dnl
77
+ dnl PHP_DEFINE(WHAT [, value[, directory]])
78
+ dnl
79
+ dnl Creates builddir/include/what.h and in there #define WHAT value
80
+ dnl
81
+ AC_DEFUN([PHP_DEFINE],[
82
+ [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
83
+ ])
84
+
85
+ dnl
86
+ dnl PHP_SUBST(varname)
87
+ dnl
88
+ dnl Adds variable with it's value into Makefile, e.g.:
89
+ dnl CC = gcc
90
+ dnl
91
+ AC_DEFUN([PHP_SUBST],[
92
+ PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
93
+ ])
94
+
95
+ dnl
96
+ dnl PHP_SUBST_OLD(varname)
97
+ dnl
98
+ dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
99
+ dnl instances in every file passed to AC_OUTPUT()
100
+ dnl
101
+ AC_DEFUN([PHP_SUBST_OLD],[
102
+ PHP_SUBST($1)
103
+ AC_SUBST($1)
104
+ ])
105
+
106
+ dnl
107
+ dnl PHP_OUTPUT(file)
108
+ dnl
109
+ dnl Adds "file" to the list of files generated by AC_OUTPUT
110
+ dnl This macro can be used several times.
111
+ dnl
112
+ AC_DEFUN([PHP_OUTPUT],[
113
+ PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
114
+ ])
115
+
116
+
117
+ dnl -------------------------------------------------------------------------
118
+ dnl Build system base macros
119
+ dnl -------------------------------------------------------------------------
120
+
121
+ dnl
122
+ dnl PHP_CANONICAL_HOST_TARGET
123
+ dnl
124
+ AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
125
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
126
+ AC_REQUIRE([AC_CANONICAL_TARGET])dnl
127
+ dnl Make sure we do not continue if host_alias is empty.
128
+ if test -z "$host_alias" && test -n "$host"; then
129
+ host_alias=$host
130
+ fi
131
+ if test -z "$host_alias"; then
132
+ AC_MSG_ERROR([host_alias is not set!])
133
+ fi
134
+ ])
135
+
136
+ dnl
137
+ dnl PHP_INIT_BUILD_SYSTEM
138
+ dnl
139
+ AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
140
+ AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
141
+ test -d include || $php_shtool mkdir include
142
+ > Makefile.objects
143
+ > Makefile.fragments
144
+ dnl We need to play tricks here to avoid matching the grep line itself
145
+ pattern=define
146
+ $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
147
+ ])
148
+
149
+ dnl
150
+ dnl PHP_GEN_GLOBAL_MAKEFILE
151
+ dnl
152
+ dnl Generates the global makefile.
153
+ dnl
154
+ AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
155
+ cat >Makefile <<EOF
156
+ srcdir = $abs_srcdir
157
+ builddir = $abs_builddir
158
+ top_srcdir = $abs_srcdir
159
+ top_builddir = $abs_builddir
160
+ EOF
161
+ for i in $PHP_VAR_SUBST; do
162
+ eval echo "$i = \$$i" >> Makefile
163
+ done
164
+
165
+ cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
166
+ ])
167
+
168
+ dnl
169
+ dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
170
+ dnl
171
+ dnl Processes a file called Makefile.frag in the source directory
172
+ dnl of the most recently added extension. $(srcdir) and $(builddir)
173
+ dnl are substituted with the proper paths. Can be used to supply
174
+ dnl custom rules and/or additional targets.
175
+ dnl
176
+ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
177
+ ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
178
+ ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
179
+ ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
180
+ test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
181
+ ])
182
+
183
+ dnl
184
+ dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
185
+ dnl
186
+ dnl Adds sources which are located relative to source-path to the
187
+ dnl array of type type. Sources are processed with optional
188
+ dnl special-flags which are passed to the compiler. Sources
189
+ dnl can be either written in C or C++ (filenames shall end in .c
190
+ dnl or .cpp, respectively).
191
+ dnl
192
+ dnl Note: If source-path begins with a "/", the "/" is removed and
193
+ dnl the path is interpreted relative to the top build-directory.
194
+ dnl
195
+ dnl which array to append to?
196
+ AC_DEFUN([PHP_ADD_SOURCES],[
197
+ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
198
+ ])
199
+
200
+ dnl
201
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
202
+ dnl internal, don't use
203
+ AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
204
+ ifelse($1,shared,[
205
+ b_c_pre=$shared_c_pre
206
+ b_cxx_pre=$shared_cxx_pre
207
+ b_c_meta=$shared_c_meta
208
+ b_cxx_meta=$shared_cxx_meta
209
+ b_c_post=$shared_c_post
210
+ b_cxx_post=$shared_cxx_post
211
+ ],[
212
+ b_c_pre=$php_c_pre
213
+ b_cxx_pre=$php_cxx_pre
214
+ b_c_meta=$php_c_meta
215
+ b_cxx_meta=$php_cxx_meta
216
+ b_c_post=$php_c_post
217
+ b_cxx_post=$php_cxx_post
218
+ ])dnl
219
+ b_lo=[$]$1_lo
220
+ ])
221
+
222
+ dnl
223
+ dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
224
+ dnl
225
+ dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
226
+ dnl name of the array target-var directly, as well as whether
227
+ dnl shared objects will be built from the sources.
228
+ dnl
229
+ dnl Should not be used directly.
230
+ dnl
231
+ AC_DEFUN([PHP_ADD_SOURCES_X],[
232
+ dnl relative to source- or build-directory?
233
+ dnl ac_srcdir/ac_bdir include trailing slash
234
+ case $1 in
235
+ ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
236
+ /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
237
+ *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
238
+ esac
239
+
240
+ dnl how to build .. shared or static?
241
+ ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
242
+
243
+ dnl iterate over the sources
244
+ old_IFS=[$]IFS
245
+ for ac_src in $2; do
246
+
247
+ dnl remove the suffix
248
+ IFS=.
249
+ set $ac_src
250
+ ac_obj=[$]1
251
+ IFS=$old_IFS
252
+
253
+ dnl append to the array which has been dynamically chosen at m4 time
254
+ $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
255
+
256
+ dnl choose the right compiler/flags/etc. for the source-file
257
+ case $ac_src in
258
+ *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
259
+ *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
260
+ *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
261
+ *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
262
+ esac
263
+
264
+ dnl create a rule for the object/source combo
265
+ cat >>Makefile.objects<<EOF
266
+ $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
267
+ $ac_comp
268
+ EOF
269
+ done
270
+ ])
271
+
272
+ dnl -------------------------------------------------------------------------
273
+ dnl Compiler characteristics checks
274
+ dnl -------------------------------------------------------------------------
275
+
276
+ dnl
277
+ dnl PHP_TARGET_RDYNAMIC
278
+ dnl
279
+ dnl Checks whether -rdynamic is supported by the compiler. This
280
+ dnl is necessary for some targets to populate the global symbol
281
+ dnl table. Otherwise, dynamic modules would not be able to resolve
282
+ dnl PHP-related symbols.
283
+ dnl
284
+ dnl If successful, adds -rdynamic to PHP_LDFLAGS.
285
+ dnl
286
+ AC_DEFUN([PHP_TARGET_RDYNAMIC],[
287
+ if test -n "$GCC"; then
288
+ dnl we should use a PHP-specific macro here
289
+ PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
290
+ if test "$gcc_rdynamic" = "yes"; then
291
+ PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
292
+ fi
293
+ fi
294
+ ])
295
+
296
+ dnl
297
+ dnl PHP_RUNPATH_SWITCH
298
+ dnl
299
+ dnl Checks for -R, etc. switch
300
+ dnl
301
+ AC_DEFUN([PHP_RUNPATH_SWITCH],[
302
+ AC_MSG_CHECKING([if compiler supports -R])
303
+ AC_CACHE_VAL(php_cv_cc_dashr,[
304
+ SAVE_LIBS=$LIBS
305
+ LIBS="-R /usr/$PHP_LIBDIR $LIBS"
306
+ AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
307
+ LIBS=$SAVE_LIBS])
308
+ AC_MSG_RESULT([$php_cv_cc_dashr])
309
+ if test $php_cv_cc_dashr = "yes"; then
310
+ ld_runpath_switch=-R
311
+ else
312
+ AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
313
+ AC_CACHE_VAL(php_cv_cc_rpath,[
314
+ SAVE_LIBS=$LIBS
315
+ LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
316
+ AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
317
+ LIBS=$SAVE_LIBS])
318
+ AC_MSG_RESULT([$php_cv_cc_rpath])
319
+ if test $php_cv_cc_rpath = "yes"; then
320
+ ld_runpath_switch=-Wl,-rpath,
321
+ else
322
+ dnl something innocuous
323
+ ld_runpath_switch=-L
324
+ fi
325
+ fi
326
+ if test "$PHP_RPATH" = "no"; then
327
+ ld_runpath_switch=
328
+ fi
329
+ ])
330
+
331
+ dnl
332
+ dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
333
+ dnl
334
+ AC_DEFUN([PHP_CHECK_GCC_ARG],[
335
+ gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
336
+ AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
337
+ echo 'void somefunc() { };' > conftest.c
338
+ cmd='$CC $1 -c conftest.c'
339
+ if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
340
+ ac_result=no
341
+ else
342
+ ac_result=yes
343
+ fi
344
+ eval $gcc_arg_name=$ac_result
345
+ rm -f conftest.*
346
+ ])
347
+ if eval test "\$$gcc_arg_name" = "yes"; then
348
+ $2
349
+ else
350
+ :
351
+ $3
352
+ fi
353
+ ])
354
+
355
+ dnl
356
+ dnl PHP_LIBGCC_LIBPATH(gcc)
357
+ dnl
358
+ dnl Stores the location of libgcc in libgcc_libpath
359
+ dnl
360
+ AC_DEFUN([PHP_LIBGCC_LIBPATH],[
361
+ changequote({,})
362
+ libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
363
+ changequote([,])
364
+ ])
365
+
366
+ dnl -------------------------------------------------------------------------
367
+ dnl Macros to modify LIBS, INCLUDES, etc. variables
368
+ dnl -------------------------------------------------------------------------
369
+
370
+ dnl
371
+ dnl PHP_REMOVE_USR_LIB(NAME)
372
+ dnl
373
+ dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
374
+ dnl
375
+ AC_DEFUN([PHP_REMOVE_USR_LIB],[
376
+ unset ac_new_flags
377
+ for i in [$]$1; do
378
+ case [$]i in
379
+ -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
380
+ *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
381
+ esac
382
+ done
383
+ $1=[$]ac_new_flags
384
+ ])
385
+
386
+ dnl
387
+ dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
388
+ dnl
389
+ dnl Use this macro, if you need to add libraries and or library search
390
+ dnl paths to the PHP build system which are only given in compiler
391
+ dnl notation.
392
+ dnl
393
+ AC_DEFUN([PHP_EVAL_LIBLINE],[
394
+ for ac_i in $1; do
395
+ case $ac_i in
396
+ -pthread[)]
397
+ if test "$ext_shared" = "yes"; then
398
+ $2="[$]$2 -pthread"
399
+ else
400
+ PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
401
+ fi
402
+ ;;
403
+ -l*[)]
404
+ ac_ii=`echo $ac_i|cut -c 3-`
405
+ PHP_ADD_LIBRARY($ac_ii,1,$2)
406
+ ;;
407
+ -L*[)]
408
+ ac_ii=`echo $ac_i|cut -c 3-`
409
+ PHP_ADD_LIBPATH($ac_ii,$2)
410
+ ;;
411
+ esac
412
+ done
413
+ ])
414
+
415
+ dnl
416
+ dnl PHP_EVAL_INCLINE(headerline)
417
+ dnl
418
+ dnl Use this macro, if you need to add header search paths to the PHP
419
+ dnl build system which are only given in compiler notation.
420
+ dnl
421
+ AC_DEFUN([PHP_EVAL_INCLINE],[
422
+ for ac_i in $1; do
423
+ case $ac_i in
424
+ -I*[)]
425
+ ac_ii=`echo $ac_i|cut -c 3-`
426
+ PHP_ADD_INCLUDE($ac_ii)
427
+ ;;
428
+ esac
429
+ done
430
+ ])
431
+
432
+ dnl internal, don't use
433
+ AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
434
+ PHP_RUN_ONCE(LIBPATH, $1, [
435
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
436
+ LDFLAGS="$LDFLAGS -L$1"
437
+ PHP_RPATHS="$PHP_RPATHS $1"
438
+ ])
439
+ ])dnl
440
+ dnl
441
+ dnl
442
+ dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
443
+ dnl
444
+ dnl Adds a path to linkpath/runpath (LDFLAGS)
445
+ dnl
446
+ AC_DEFUN([PHP_ADD_LIBPATH],[
447
+ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
448
+ PHP_EXPAND_PATH($1, ai_p)
449
+ ifelse([$2],,[
450
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
451
+ ],[
452
+ if test "$ext_shared" = "yes"; then
453
+ $2="-L$ai_p [$]$2"
454
+ test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
455
+ else
456
+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
457
+ fi
458
+ ])
459
+ fi
460
+ ])
461
+
462
+ dnl
463
+ dnl PHP_UTILIZE_RPATHS()
464
+ dnl
465
+ dnl builds RPATHS/LDFLAGS from PHP_RPATHS
466
+ dnl
467
+ AC_DEFUN([PHP_UTILIZE_RPATHS],[
468
+ OLD_RPATHS=$PHP_RPATHS
469
+ unset PHP_RPATHS
470
+
471
+ for i in $OLD_RPATHS; do
472
+ dnl Can be passed to native cc/libtool
473
+ PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
474
+ dnl Libtool-specific
475
+ PHP_RPATHS="$PHP_RPATHS -R $i"
476
+ dnl cc-specific
477
+ NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
478
+ done
479
+
480
+ if test "$PHP_RPATH" = "no"; then
481
+ unset PHP_RPATHS
482
+ unset NATIVE_RPATHS
483
+ fi
484
+ ])
485
+
486
+ dnl
487
+ dnl PHP_ADD_INCLUDE(path [,before])
488
+ dnl
489
+ dnl add an include path.
490
+ dnl if before is 1, add in the beginning of INCLUDES.
491
+ dnl
492
+ AC_DEFUN([PHP_ADD_INCLUDE],[
493
+ if test "$1" != "/usr/include"; then
494
+ PHP_EXPAND_PATH($1, ai_p)
495
+ PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
496
+ if test "$2"; then
497
+ INCLUDES="-I$ai_p $INCLUDES"
498
+ else
499
+ INCLUDES="$INCLUDES -I$ai_p"
500
+ fi
501
+ ])
502
+ fi
503
+ ])
504
+
505
+ dnl internal, don't use
506
+ AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
507
+ ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
508
+ ])dnl
509
+ dnl
510
+ dnl internal, don't use
511
+ AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
512
+ case $1 in
513
+ c|c_r|pthread*[)] ;;
514
+ *[)] ifelse($3,,[
515
+ _PHP_X_ADD_LIBRARY($1,$2,$5)
516
+ ],[
517
+ if test "$ext_shared" = "yes"; then
518
+ _PHP_X_ADD_LIBRARY($1,$2,$3)
519
+ else
520
+ $4($1,$2)
521
+ fi
522
+ ]) ;;
523
+ esac
524
+ ])dnl
525
+ dnl
526
+ dnl
527
+ dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
528
+ dnl
529
+ dnl add a library to the link line
530
+ dnl
531
+ AC_DEFUN([PHP_ADD_LIBRARY],[
532
+ _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
533
+ ])
534
+
535
+ dnl
536
+ dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
537
+ dnl
538
+ dnl add a library to the link line (deferred, not used during configure)
539
+ dnl
540
+ AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
541
+ _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
542
+ ])
543
+
544
+ dnl
545
+ dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
546
+ dnl
547
+ dnl add a library to the link line and path to linkpath/runpath.
548
+ dnl if shared-libadd is not empty and $ext_shared is yes,
549
+ dnl shared-libadd will be assigned the library information
550
+ dnl
551
+ AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
552
+ ifelse($3,,[
553
+ if test -n "$2"; then
554
+ PHP_ADD_LIBPATH($2)
555
+ fi
556
+ PHP_ADD_LIBRARY($1)
557
+ ],[
558
+ if test "$ext_shared" = "yes"; then
559
+ $3="-l$1 [$]$3"
560
+ if test -n "$2"; then
561
+ PHP_ADD_LIBPATH($2,$3)
562
+ fi
563
+ else
564
+ PHP_ADD_LIBRARY_WITH_PATH($1,$2)
565
+ fi
566
+ ])
567
+ ])
568
+
569
+ dnl
570
+ dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
571
+ dnl
572
+ dnl add a library to the link line (deferred)
573
+ dnl and path to linkpath/runpath (not deferred)
574
+ dnl if shared-libadd is not empty and $ext_shared is yes,
575
+ dnl shared-libadd will be assigned the library information
576
+ dnl
577
+ AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
578
+ ifelse($3,,[
579
+ if test -n "$2"; then
580
+ PHP_ADD_LIBPATH($2)
581
+ fi
582
+ PHP_ADD_LIBRARY_DEFER($1)
583
+ ],[
584
+ if test "$ext_shared" = "yes"; then
585
+ $3="-l$1 [$]$3"
586
+ if test -n "$2"; then
587
+ PHP_ADD_LIBPATH($2,$3)
588
+ fi
589
+ else
590
+ PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
591
+ fi
592
+ ])
593
+ ])
594
+
595
+ dnl
596
+ dnl PHP_ADD_FRAMEWORK(framework [,before])
597
+ dnl
598
+ dnl add a (Darwin / Mac OS X) framework to the link
599
+ dnl line. if before is 1, the framework is added
600
+ dnl to the beginning of the line.
601
+ dnl
602
+ AC_DEFUN([PHP_ADD_FRAMEWORK], [
603
+ PHP_RUN_ONCE(FRAMEWORKS, $1, [
604
+ if test "$2"; then
605
+ PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
606
+ else
607
+ PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
608
+ fi
609
+ ])
610
+ ])
611
+
612
+ dnl
613
+ dnl PHP_ADD_FRAMEWORKPATH(path [,before])
614
+ dnl
615
+ dnl add a (Darwin / Mac OS X) framework path to the link
616
+ dnl and include lines. default paths include (but are
617
+ dnl not limited to) /Local/Library/Frameworks and
618
+ dnl /System/Library/Frameworks, so these don't need
619
+ dnl to be specifically added. if before is 1, the
620
+ dnl framework path is added to the beginning of the
621
+ dnl relevant lines.
622
+ dnl
623
+ AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
624
+ PHP_EXPAND_PATH($1, ai_p)
625
+ PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
626
+ if test "$2"; then
627
+ PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
628
+ else
629
+ PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
630
+ fi
631
+ ])
632
+ ])
633
+
634
+ dnl
635
+ dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
636
+ dnl
637
+ dnl Adds a (Darwin / Mac OS X) framework path and the
638
+ dnl framework itself to the link and include lines.
639
+ dnl
640
+ AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
641
+ PHP_ADD_FRAMEWORKPATH($2)
642
+ PHP_ADD_FRAMEWORK($1)
643
+ ])
644
+
645
+ dnl
646
+ dnl PHP_SET_LIBTOOL_VARIABLE(var)
647
+ dnl
648
+ dnl Set libtool variable
649
+ dnl
650
+ AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
651
+ if test -z "$LIBTOOL"; then
652
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
653
+ else
654
+ LIBTOOL="$LIBTOOL $1"
655
+ fi
656
+ ])
657
+
658
+ dnl -------------------------------------------------------------------------
659
+ dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
660
+ dnl -------------------------------------------------------------------------
661
+
662
+ dnl PHP_ARG_ANALYZE_EX
663
+ dnl internal
664
+ AC_DEFUN([PHP_ARG_ANALYZE_EX],[
665
+ ext_output="yes, shared"
666
+ ext_shared=yes
667
+ case [$]$1 in
668
+ shared,*[)]
669
+ $1=`echo "[$]$1"|$SED 's/^shared,//'`
670
+ ;;
671
+ shared[)]
672
+ $1=yes
673
+ ;;
674
+ no[)]
675
+ ext_output=no
676
+ ext_shared=no
677
+ ;;
678
+ *[)]
679
+ ext_output=yes
680
+ ext_shared=no
681
+ ;;
682
+ esac
683
+
684
+ PHP_ALWAYS_SHARED([$1])
685
+ ])
686
+
687
+ dnl PHP_ARG_ANALYZE
688
+ dnl internal
689
+ AC_DEFUN([PHP_ARG_ANALYZE],[
690
+ ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
691
+ ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
692
+ ])
693
+
694
+ dnl
695
+ dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
696
+ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
697
+ dnl default-val defaults to no. This will also set the variable ext_shared,
698
+ dnl and will overwrite any previous variable of that name.
699
+ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
700
+ dnl the PHP_ARG_ANALYZE_EX.
701
+ dnl
702
+ AC_DEFUN([PHP_ARG_WITH],[
703
+ php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
704
+ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
705
+ ])
706
+
707
+ dnl PHP_REAL_ARG_WITH
708
+ dnl internal
709
+ AC_DEFUN([PHP_REAL_ARG_WITH],[
710
+ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
711
+ AC_ARG_WITH($1,[$3],$5=[$]withval,
712
+ [
713
+ $5=ifelse($4,,no,$4)
714
+ ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
715
+ ])
716
+ PHP_ARG_ANALYZE($5,[$2],$6)
717
+ ])
718
+
719
+ dnl
720
+ dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
721
+ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
722
+ dnl default-val defaults to no. This will also set the variable ext_shared,
723
+ dnl and will overwrite any previous variable of that name.
724
+ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
725
+ dnl the PHP_ARG_ANALYZE_EX.
726
+ dnl
727
+ AC_DEFUN([PHP_ARG_ENABLE],[
728
+ php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
729
+ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
730
+ ])
731
+
732
+ dnl PHP_REAL_ARG_ENABLE
733
+ dnl internal
734
+ AC_DEFUN([PHP_REAL_ARG_ENABLE],[
735
+ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
736
+ AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
737
+ [
738
+ $5=ifelse($4,,no,$4)
739
+ ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
740
+ ])
741
+ PHP_ARG_ANALYZE($5,[$2],$6)
742
+ ])
743
+
744
+ dnl -------------------------------------------------------------------------
745
+ dnl Build macros
746
+ dnl -------------------------------------------------------------------------
747
+
748
+ dnl
749
+ dnl PHP_BUILD_THREAD_SAFE
750
+ dnl
751
+ AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
752
+ enable_maintainer_zts=yes
753
+ if test "$pthreads_working" != "yes"; then
754
+ AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
755
+ fi
756
+ ])
757
+
758
+ dnl
759
+ dnl PHP_REQUIRE_CXX
760
+ dnl
761
+ AC_DEFUN([PHP_REQUIRE_CXX],[
762
+ if test -z "$php_cxx_done"; then
763
+ AC_PROG_CXX
764
+ AC_PROG_CXXCPP
765
+ php_cxx_done=yes
766
+ fi
767
+ ])
768
+
769
+ dnl
770
+ dnl PHP_BUILD_SHARED
771
+ dnl
772
+ AC_DEFUN([PHP_BUILD_SHARED],[
773
+ PHP_BUILD_PROGRAM
774
+ OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
775
+ php_build_target=shared
776
+
777
+ php_c_pre=$shared_c_pre
778
+ php_c_meta=$shared_c_meta
779
+ php_c_post=$shared_c_post
780
+ php_cxx_pre=$shared_cxx_pre
781
+ php_cxx_meta=$shared_cxx_meta
782
+ php_cxx_post=$shared_cxx_post
783
+ php_lo=$shared_lo
784
+ ])
785
+
786
+ dnl
787
+ dnl PHP_BUILD_STATIC
788
+ dnl
789
+ AC_DEFUN([PHP_BUILD_STATIC],[
790
+ PHP_BUILD_PROGRAM
791
+ OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
792
+ php_build_target=static
793
+ ])
794
+
795
+ dnl
796
+ dnl PHP_BUILD_BUNDLE
797
+ dnl
798
+ AC_DEFUN([PHP_BUILD_BUNDLE],[
799
+ PHP_BUILD_PROGRAM
800
+ OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
801
+ php_build_target=static
802
+ ])
803
+
804
+ dnl
805
+ dnl PHP_BUILD_PROGRAM
806
+ dnl
807
+ AC_DEFUN([PHP_BUILD_PROGRAM],[
808
+ OVERALL_TARGET=[]ifelse($1,,php,$1)
809
+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
810
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
811
+ php_c_post=
812
+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
813
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
814
+ php_cxx_post=
815
+ php_lo=lo
816
+
817
+ case $with_pic in
818
+ yes) pic_setting='-prefer-pic';;
819
+ no) pic_setting='-prefer-non-pic';;
820
+ esac
821
+
822
+ shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
823
+ shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
824
+ shared_c_post=
825
+ shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
826
+ shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
827
+ shared_cxx_post=
828
+ shared_lo=lo
829
+
830
+ php_build_target=program
831
+ ])
832
+
833
+ dnl
834
+ dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
835
+ dnl
836
+ dnl Basically sets up the link-stage for building module-name
837
+ dnl from object_var in build-dir.
838
+ dnl
839
+ AC_DEFUN([PHP_SHARED_MODULE],[
840
+ install_modules="install-modules"
841
+
842
+ case $host_alias in
843
+ *aix*[)]
844
+ suffix=so
845
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
846
+ ;;
847
+ *netware*[)]
848
+ suffix=nlm
849
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
850
+ ;;
851
+ *[)]
852
+ suffix=la
853
+ link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
854
+ ;;
855
+ esac
856
+
857
+ if test "x$5" = "xyes"; then
858
+ PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
859
+ else
860
+ PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
861
+ fi
862
+ PHP_SUBST($2)
863
+ cat >>Makefile.objects<<EOF
864
+ \$(phplibdir)/$1.$suffix: $3/$1.$suffix
865
+ \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
866
+
867
+ $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
868
+ $link_cmd
869
+
870
+ EOF
871
+ ])
872
+
873
+ dnl
874
+ dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
875
+ dnl
876
+ dnl Selects the SAPI name and type (static, shared, programm)
877
+ dnl and optionally also the source-files for the SAPI-specific
878
+ dnl objects.
879
+ dnl
880
+ AC_DEFUN([PHP_SELECT_SAPI],[
881
+ if test "$PHP_SAPI" != "default"; then
882
+ AC_MSG_ERROR([
883
+ +--------------------------------------------------------------------+
884
+ | *** ATTENTION *** |
885
+ | |
886
+ | You've configured multiple SAPIs to be build. You can build only |
887
+ | one SAPI module and CLI binary at the same time. |
888
+ +--------------------------------------------------------------------+
889
+ ])
890
+ fi
891
+
892
+ PHP_SAPI=$1
893
+
894
+ case "$2" in
895
+ static[)] PHP_BUILD_STATIC;;
896
+ shared[)] PHP_BUILD_SHARED;;
897
+ bundle[)] PHP_BUILD_BUNDLE;;
898
+ program[)] PHP_BUILD_PROGRAM($5);;
899
+ esac
900
+
901
+ ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
902
+ ])
903
+
904
+ dnl deprecated
905
+ AC_DEFUN([PHP_EXTENSION],[
906
+ sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
907
+
908
+ PHP_NEW_EXTENSION($1, $sources, $2, $3)
909
+
910
+ if test -r "$ext_srcdir/Makefile.frag"; then
911
+ PHP_ADD_MAKEFILE_FRAGMENT
912
+ fi
913
+ ])
914
+
915
+ AC_DEFUN([PHP_ADD_BUILD_DIR],[
916
+ ifelse($2,,[
917
+ BUILD_DIR="$BUILD_DIR $1"
918
+ ], [
919
+ $php_shtool mkdir -p $1
920
+ ])
921
+ ])
922
+
923
+ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
924
+ $php_shtool mkdir -p $BUILD_DIR
925
+ ])
926
+
927
+ dnl
928
+ dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
929
+ dnl
930
+ dnl Includes an extension in the build.
931
+ dnl
932
+ dnl "extname" is the name of the ext/ subdir where the extension resides.
933
+ dnl "sources" is a list of files relative to the subdir which are used
934
+ dnl to build the extension.
935
+ dnl "shared" can be set to "shared" or "yes" to build the extension as
936
+ dnl a dynamically loadable library. Optional parameter "sapi_class" can
937
+ dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
938
+ dnl "extra-cflags" are passed to the compiler, with
939
+ dnl @ext_srcdir@ and @ext_builddir@ being substituted.
940
+ dnl "cxx" can be used to indicate that a C++ shared module is desired.
941
+ dnl "zend_ext" indicates a zend extension.
942
+ AC_DEFUN([PHP_NEW_EXTENSION],[
943
+ ext_builddir=[]PHP_EXT_BUILDDIR($1)
944
+ ext_srcdir=[]PHP_EXT_SRCDIR($1)
945
+
946
+ ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
947
+
948
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
949
+ dnl ---------------------------------------------- Static module
950
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
951
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
952
+ EXT_STATIC="$EXT_STATIC $1"
953
+ if test "$3" != "nocli"; then
954
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
955
+ fi
956
+ else
957
+ if test "$3" = "shared" || test "$3" = "yes"; then
958
+ dnl ---------------------------------------------- Shared module
959
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
960
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
961
+ case $host_alias in
962
+ *netware*[)]
963
+ PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
964
+ ;;
965
+ *[)]
966
+ PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
967
+ ;;
968
+ esac
969
+ AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
970
+ fi
971
+ fi
972
+
973
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
974
+ dnl ---------------------------------------------- CLI static module
975
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
976
+ case "$PHP_SAPI" in
977
+ cgi|embed[)]
978
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
979
+ EXT_STATIC="$EXT_STATIC $1"
980
+ ;;
981
+ *[)]
982
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
983
+ ;;
984
+ esac
985
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
986
+ fi
987
+ PHP_ADD_BUILD_DIR($ext_builddir)
988
+
989
+ dnl Set for phpize builds only
990
+ dnl ---------------------------
991
+ if test "$ext_builddir" = "."; then
992
+ PHP_PECL_EXTENSION=$1
993
+ PHP_SUBST(PHP_PECL_EXTENSION)
994
+ fi
995
+ ])
996
+
997
+ dnl
998
+ dnl PHP_WITH_SHARED
999
+ dnl
1000
+ dnl Checks whether $withval is "shared" or starts with "shared,XXX"
1001
+ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
1002
+ dnl from $withval.
1003
+ dnl
1004
+ AC_DEFUN([PHP_WITH_SHARED],[
1005
+ PHP_ARG_ANALYZE_EX(withval)
1006
+ shared=$ext_shared
1007
+ unset ext_shared ext_output
1008
+ ])
1009
+
1010
+ dnl
1011
+ dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
1012
+ dnl
1013
+ dnl This macro is scanned by genif.sh when it builds the internal functions
1014
+ dnl list, so that modules can be init'd in the correct order
1015
+ dnl $1 = name of extension, $2 = extension upon which it depends
1016
+ dnl $3 = optional: if true, it's ok for $2 to have not been configured
1017
+ dnl default is false and should halt the build.
1018
+ dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
1019
+ dnl The extension on which it depends must also have been configured.
1020
+ dnl See ADD_EXTENSION_DEP in win32 build
1021
+ dnl
1022
+ AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
1023
+ am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
1024
+ is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
1025
+ is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
1026
+ if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
1027
+ AC_MSG_ERROR([
1028
+ You've configured extension $1 to build statically, but it
1029
+ depends on extension $2, which you've configured to build shared.
1030
+ You either need to build $1 shared or build $2 statically for the
1031
+ build to be successful.
1032
+ ])
1033
+ fi
1034
+ if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
1035
+ AC_MSG_ERROR([
1036
+ You've configured extension $1, which depends on extension $2,
1037
+ but you've either not enabled $2, or have disabled it.
1038
+ ])
1039
+ fi
1040
+ dnl Some systems require that we link $2 to $1 when building
1041
+ ])
1042
+
1043
+ dnl -------------------------------------------------------------------------
1044
+ dnl Checks for structures, typedefs, broken functions, etc.
1045
+ dnl -------------------------------------------------------------------------
1046
+
1047
+ dnl Internal helper macros
1048
+ dnl
1049
+ dnl _PHP_DEF_HAVE_FILE(what, filename)
1050
+ AC_DEFUN([_PHP_DEF_HAVE_FILE], [
1051
+ php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
1052
+ echo "#define $php_def_have_what 1" >> $2
1053
+ ])
1054
+ dnl
1055
+ dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
1056
+ dnl
1057
+ AC_DEFUN([_PHP_CHECK_SIZEOF], [
1058
+ php_cache_value=php_cv_sizeof_[]$1
1059
+ AC_CACHE_VAL(php_cv_sizeof_[]$1, [
1060
+ old_LIBS=$LIBS
1061
+ LIBS=
1062
+ old_LDFLAGS=$LDFLAGS
1063
+ LDFLAGS=
1064
+ AC_TRY_RUN([#include <stdio.h>
1065
+ #if STDC_HEADERS
1066
+ #include <stdlib.h>
1067
+ #include <stddef.h>
1068
+ #endif
1069
+ #ifdef HAVE_INTTYPES_H
1070
+ #include <inttypes.h>
1071
+ #endif
1072
+ #ifdef HAVE_UNISTD_H
1073
+ #include <unistd.h>
1074
+ #endif
1075
+ $3
1076
+
1077
+ int main()
1078
+ {
1079
+ FILE *fp = fopen("conftestval", "w");
1080
+ if (!fp) return(1);
1081
+ fprintf(fp, "%d\n", sizeof($1));
1082
+ return(0);
1083
+ }
1084
+ ], [
1085
+ eval $php_cache_value=`cat conftestval`
1086
+ ], [
1087
+ eval $php_cache_value=0
1088
+ ], [
1089
+ ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
1090
+ ])
1091
+ LDFLAGS=$old_LDFLAGS
1092
+ LIBS=$old_LIBS
1093
+ ])
1094
+ if eval test "\$$php_cache_value" != "0"; then
1095
+ ifelse([$4],[],:,[$4])
1096
+ ifelse([$5],[],,[else $5])
1097
+ fi
1098
+ ])
1099
+
1100
+ dnl
1101
+ dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
1102
+ dnl
1103
+ AC_DEFUN([PHP_CHECK_SIZEOF], [
1104
+ AC_MSG_CHECKING([size of $1])
1105
+ _PHP_CHECK_SIZEOF($1, $2, $3, [
1106
+ AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1107
+ AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1108
+ ])
1109
+ AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
1110
+ ])
1111
+
1112
+ dnl
1113
+ dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
1114
+ dnl
1115
+ AC_DEFUN([PHP_CHECK_TYPES], [
1116
+ for php_typename in $1; do
1117
+ AC_MSG_CHECKING([whether $php_typename exists])
1118
+ _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
1119
+ _PHP_DEF_HAVE_FILE($php_typename, $2)
1120
+ AC_MSG_RESULT([yes])
1121
+ ], [
1122
+ AC_MSG_RESULT([no])
1123
+ ])
1124
+ done
1125
+ ])
1126
+
1127
+ dnl
1128
+ dnl PHP_CHECK_IN_ADDR_T
1129
+ dnl
1130
+ AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
1131
+ dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
1132
+ AC_MSG_CHECKING([for in_addr_t])
1133
+ AC_CACHE_VAL(ac_cv_type_in_addr_t,
1134
+ [AC_EGREP_CPP(dnl
1135
+ changequote(<<,>>)dnl
1136
+ <<in_addr_t[^a-zA-Z_0-9]>>dnl
1137
+ changequote([,]), [#include <sys/types.h>
1138
+ #if STDC_HEADERS
1139
+ #include <stdlib.h>
1140
+ #include <stddef.h>
1141
+ #endif
1142
+ #ifdef HAVE_NETINET_IN_H
1143
+ #include <netinet/in.h>
1144
+ #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
1145
+ AC_MSG_RESULT([$ac_cv_type_in_addr_t])
1146
+ if test $ac_cv_type_in_addr_t = no; then
1147
+ AC_DEFINE(in_addr_t, u_int, [ ])
1148
+ fi
1149
+ ])
1150
+
1151
+ dnl
1152
+ dnl PHP_TIME_R_TYPE
1153
+ dnl
1154
+ dnl Check type of reentrant time-related functions
1155
+ dnl Type can be: irix, hpux or POSIX
1156
+ dnl
1157
+ AC_DEFUN([PHP_TIME_R_TYPE],[
1158
+ AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
1159
+ AC_TRY_RUN([
1160
+ #include <time.h>
1161
+
1162
+ main() {
1163
+ char buf[27];
1164
+ struct tm t;
1165
+ time_t old = 0;
1166
+ int r, s;
1167
+
1168
+ s = gmtime_r(&old, &t);
1169
+ r = (int) asctime_r(&t, buf, 26);
1170
+ if (r == s && s == 0) return (0);
1171
+ return (1);
1172
+ }
1173
+ ],[
1174
+ ac_cv_time_r_type=hpux
1175
+ ],[
1176
+ AC_TRY_RUN([
1177
+ #include <time.h>
1178
+ main() {
1179
+ struct tm t, *s;
1180
+ time_t old = 0;
1181
+ char buf[27], *p;
1182
+
1183
+ s = gmtime_r(&old, &t);
1184
+ p = asctime_r(&t, buf, 26);
1185
+ if (p == buf && s == &t) return (0);
1186
+ return (1);
1187
+ }
1188
+ ],[
1189
+ ac_cv_time_r_type=irix
1190
+ ],[
1191
+ ac_cv_time_r_type=POSIX
1192
+ ],[
1193
+ ac_cv_time_r_type=POSIX
1194
+ ])
1195
+ ],[
1196
+ ac_cv_time_r_type=POSIX
1197
+ ])
1198
+ ])
1199
+ case $ac_cv_time_r_type in
1200
+ hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
1201
+ irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
1202
+ esac
1203
+ ])
1204
+
1205
+ dnl
1206
+ dnl PHP_DOES_PWRITE_WORK
1207
+ dnl internal
1208
+ AC_DEFUN([PHP_DOES_PWRITE_WORK],[
1209
+ AC_TRY_RUN([
1210
+ #include <sys/types.h>
1211
+ #include <sys/stat.h>
1212
+ #include <fcntl.h>
1213
+ #include <unistd.h>
1214
+ #include <errno.h>
1215
+ $1
1216
+ main() {
1217
+ int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1218
+
1219
+ if (fd < 0) exit(1);
1220
+ if (pwrite(fd, "text", 4, 0) != 4) exit(1);
1221
+ /* Linux glibc breakage until 2.2.5 */
1222
+ if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
1223
+ exit(0);
1224
+ }
1225
+
1226
+ ],[
1227
+ ac_cv_pwrite=yes
1228
+ ],[
1229
+ ac_cv_pwrite=no
1230
+ ],[
1231
+ ac_cv_pwrite=no
1232
+ ])
1233
+ ])
1234
+
1235
+ dnl PHP_DOES_PREAD_WORK
1236
+ dnl internal
1237
+ AC_DEFUN([PHP_DOES_PREAD_WORK],[
1238
+ echo test > conftest_in
1239
+ AC_TRY_RUN([
1240
+ #include <sys/types.h>
1241
+ #include <sys/stat.h>
1242
+ #include <fcntl.h>
1243
+ #include <unistd.h>
1244
+ #include <errno.h>
1245
+ $1
1246
+ main() {
1247
+ char buf[3];
1248
+ int fd = open("conftest_in", O_RDONLY);
1249
+ if (fd < 0) exit(1);
1250
+ if (pread(fd, buf, 2, 0) != 2) exit(1);
1251
+ /* Linux glibc breakage until 2.2.5 */
1252
+ if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
1253
+ exit(0);
1254
+ }
1255
+ ],[
1256
+ ac_cv_pread=yes
1257
+ ],[
1258
+ ac_cv_pread=no
1259
+ ],[
1260
+ ac_cv_pread=no
1261
+ ])
1262
+ rm -f conftest_in
1263
+ ])
1264
+
1265
+ dnl
1266
+ dnl PHP_PWRITE_TEST
1267
+ dnl
1268
+ AC_DEFUN([PHP_PWRITE_TEST],[
1269
+ AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
1270
+ PHP_DOES_PWRITE_WORK
1271
+ if test "$ac_cv_pwrite" = "no"; then
1272
+ PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
1273
+ if test "$ac_cv_pwrite" = "yes"; then
1274
+ ac_cv_pwrite=64
1275
+ fi
1276
+ fi
1277
+ ])
1278
+
1279
+ if test "$ac_cv_pwrite" != "no"; then
1280
+ AC_DEFINE(HAVE_PWRITE, 1, [ ])
1281
+ if test "$ac_cv_pwrite" = "64"; then
1282
+ AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1283
+ fi
1284
+ fi
1285
+ ])
1286
+
1287
+ dnl
1288
+ dnl PHP_PREAD_TEST
1289
+ dnl
1290
+ AC_DEFUN([PHP_PREAD_TEST],[
1291
+ AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
1292
+ PHP_DOES_PREAD_WORK
1293
+ if test "$ac_cv_pread" = "no"; then
1294
+ PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
1295
+ if test "$ac_cv_pread" = "yes"; then
1296
+ ac_cv_pread=64
1297
+ fi
1298
+ fi
1299
+ ])
1300
+
1301
+ if test "$ac_cv_pread" != "no"; then
1302
+ AC_DEFINE(HAVE_PREAD, 1, [ ])
1303
+ if test "$ac_cv_pread" = "64"; then
1304
+ AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1305
+ fi
1306
+ fi
1307
+ ])
1308
+
1309
+ dnl
1310
+ dnl PHP_MISSING_TIME_R_DECL
1311
+ dnl
1312
+ AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1313
+ AC_MSG_CHECKING([for missing declarations of reentrant functions])
1314
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
1315
+ :
1316
+ ],[
1317
+ AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1318
+ ])
1319
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
1320
+ :
1321
+ ],[
1322
+ AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1323
+ ])
1324
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
1325
+ :
1326
+ ],[
1327
+ AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1328
+ ])
1329
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
1330
+ :
1331
+ ],[
1332
+ AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1333
+ ])
1334
+ AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
1335
+ :
1336
+ ],[
1337
+ AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1338
+ ])
1339
+ AC_MSG_RESULT([done])
1340
+ ])
1341
+
1342
+ dnl
1343
+ dnl PHP_READDIR_R_TYPE
1344
+ dnl
1345
+ AC_DEFUN([PHP_READDIR_R_TYPE],[
1346
+ dnl HAVE_READDIR_R is also defined by libmysql
1347
+ AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
1348
+ if test "$ac_cv_func_readdir_r" = "yes"; then
1349
+ AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
1350
+ AC_TRY_RUN([
1351
+ #define _REENTRANT
1352
+ #include <sys/types.h>
1353
+ #include <dirent.h>
1354
+
1355
+ #ifndef PATH_MAX
1356
+ #define PATH_MAX 1024
1357
+ #endif
1358
+
1359
+ main() {
1360
+ DIR *dir;
1361
+ char entry[sizeof(struct dirent)+PATH_MAX];
1362
+ struct dirent *pentry = (struct dirent *) &entry;
1363
+
1364
+ dir = opendir("/");
1365
+ if (!dir)
1366
+ exit(1);
1367
+ if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
1368
+ exit(0);
1369
+ exit(1);
1370
+ }
1371
+ ],[
1372
+ ac_cv_what_readdir_r=POSIX
1373
+ ],[
1374
+ AC_TRY_CPP([
1375
+ #define _REENTRANT
1376
+ #include <sys/types.h>
1377
+ #include <dirent.h>
1378
+ int readdir_r(DIR *, struct dirent *);
1379
+ ],[
1380
+ ac_cv_what_readdir_r=old-style
1381
+ ],[
1382
+ ac_cv_what_readdir_r=none
1383
+ ])
1384
+ ],[
1385
+ ac_cv_what_readdir_r=none
1386
+ ])
1387
+ ])
1388
+ case $ac_cv_what_readdir_r in
1389
+ POSIX)
1390
+ AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
1391
+ old-style)
1392
+ AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
1393
+ esac
1394
+ fi
1395
+ ])
1396
+
1397
+ dnl
1398
+ dnl PHP_TM_GMTOFF
1399
+ dnl
1400
+ AC_DEFUN([PHP_TM_GMTOFF],[
1401
+ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
1402
+ [AC_TRY_COMPILE([#include <sys/types.h>
1403
+ #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1404
+ ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
1405
+
1406
+ if test "$ac_cv_struct_tm_gmtoff" = yes; then
1407
+ AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
1408
+ fi
1409
+ ])
1410
+
1411
+ dnl
1412
+ dnl PHP_STRUCT_FLOCK
1413
+ dnl
1414
+ AC_DEFUN([PHP_STRUCT_FLOCK],[
1415
+ AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
1416
+ AC_TRY_COMPILE([
1417
+ #include <unistd.h>
1418
+ #include <fcntl.h>
1419
+ ],
1420
+ [struct flock x;],
1421
+ [
1422
+ ac_cv_struct_flock=yes
1423
+ ],[
1424
+ ac_cv_struct_flock=no
1425
+ ])
1426
+ )
1427
+ if test "$ac_cv_struct_flock" = "yes" ; then
1428
+ AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
1429
+ fi
1430
+ ])
1431
+
1432
+ dnl
1433
+ dnl PHP_SOCKLEN_T
1434
+ dnl
1435
+ AC_DEFUN([PHP_SOCKLEN_T],[
1436
+ AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
1437
+ AC_TRY_COMPILE([
1438
+ #include <sys/types.h>
1439
+ #include <sys/socket.h>
1440
+ ],[
1441
+ socklen_t x;
1442
+ ],[
1443
+ ac_cv_socklen_t=yes
1444
+ ],[
1445
+ ac_cv_socklen_t=no
1446
+ ]))
1447
+ if test "$ac_cv_socklen_t" = "yes"; then
1448
+ AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
1449
+ fi
1450
+ ])
1451
+
1452
+ dnl
1453
+ dnl PHP_MISSING_FCLOSE_DECL
1454
+ dnl
1455
+ dnl See if we have broken header files like SunOS has.
1456
+ dnl
1457
+ AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
1458
+ AC_MSG_CHECKING([for fclose declaration])
1459
+ AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
1460
+ AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
1461
+ AC_MSG_RESULT([ok])
1462
+ ],[
1463
+ AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
1464
+ AC_MSG_RESULT([missing])
1465
+ ])
1466
+ ])
1467
+
1468
+ dnl
1469
+ dnl PHP_AC_BROKEN_SPRINTF
1470
+ dnl
1471
+ dnl Check for broken sprintf(), C99 conformance
1472
+ dnl
1473
+ AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
1474
+ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
1475
+ AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
1476
+ ac_cv_broken_sprintf=no
1477
+ ],[
1478
+ ac_cv_broken_sprintf=yes
1479
+ ],[
1480
+ ac_cv_broken_sprintf=no
1481
+ ])
1482
+ ])
1483
+ if test "$ac_cv_broken_sprintf" = "yes"; then
1484
+ AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
1485
+ else
1486
+ AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
1487
+ fi
1488
+ ])
1489
+
1490
+ dnl
1491
+ dnl PHP_AC_BROKEN_SNPRINTF
1492
+ dnl
1493
+ dnl Check for broken snprintf(), C99 conformance
1494
+ dnl
1495
+ AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
1496
+ AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
1497
+ AC_TRY_RUN([
1498
+ #define NULL (0L)
1499
+ main() {
1500
+ char buf[20];
1501
+ int res = 0;
1502
+ res = res || (snprintf(buf, 2, "marcus") != 6);
1503
+ res = res || (buf[1] != '\0');
1504
+ /* Implementations may consider this as an encoding error */
1505
+ snprintf(buf, 0, "boerger");
1506
+ /* However, they MUST ignore the pointer */
1507
+ res = res || (buf[0] != 'm');
1508
+ res = res || (snprintf(NULL, 0, "boerger") != 7);
1509
+ res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
1510
+ exit(res);
1511
+ }
1512
+ ],[
1513
+ ac_cv_broken_snprintf=no
1514
+ ],[
1515
+ ac_cv_broken_snprintf=yes
1516
+ ],[
1517
+ ac_cv_broken_snprintf=no
1518
+ ])
1519
+ ])
1520
+ if test "$ac_cv_broken_snprintf" = "yes"; then
1521
+ AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
1522
+ else
1523
+ AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
1524
+ fi
1525
+ ])
1526
+
1527
+ dnl
1528
+ dnl PHP_SOLARIS_PIC_WEIRDNESS
1529
+ dnl
1530
+ dnl Solaris requires main code to be position independent in order
1531
+ dnl to let shared objects find symbols. Weird. Ugly.
1532
+ dnl
1533
+ dnl Must be run after all --with-NN options that let the user
1534
+ dnl choose dynamic extensions, and after the gcc test.
1535
+ dnl
1536
+ AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
1537
+ AC_MSG_CHECKING([whether -fPIC is required])
1538
+ if test -n "$EXT_SHARED"; then
1539
+ os=`uname -sr 2>/dev/null`
1540
+ case $os in
1541
+ "SunOS 5.6"|"SunOS 5.7"[)]
1542
+ case $CC in
1543
+ gcc*|egcs*)
1544
+ CFLAGS="$CFLAGS -fPIC";;
1545
+ *[)]
1546
+ CFLAGS="$CFLAGS -fpic";;
1547
+ esac
1548
+ AC_MSG_RESULT([yes]);;
1549
+ *[)]
1550
+ AC_MSG_RESULT([no]);;
1551
+ esac
1552
+ else
1553
+ AC_MSG_RESULT([no])
1554
+ fi
1555
+ ])
1556
+
1557
+ dnl
1558
+ dnl PHP_SYS_LFS
1559
+ dnl
1560
+ dnl The problem is that the default compilation flags in Solaris 2.6 won't
1561
+ dnl let programs access large files; you need to tell the compiler that
1562
+ dnl you actually want your programs to work on large files. For more
1563
+ dnl details about this brain damage please see:
1564
+ dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
1565
+ dnl
1566
+ dnl Written by Paul Eggert <eggert@twinsun.com>.
1567
+ dnl
1568
+ AC_DEFUN([PHP_SYS_LFS],
1569
+ [dnl
1570
+ # If available, prefer support for large files unless the user specified
1571
+ # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1572
+ AC_MSG_CHECKING([whether large file support needs explicit enabling])
1573
+ ac_getconfs=''
1574
+ ac_result=yes
1575
+ ac_set=''
1576
+ ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1577
+ for ac_shellvar in $ac_shellvars; do
1578
+ case $ac_shellvar in
1579
+ CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
1580
+ *[)] ac_lfsvar=LFS_$ac_shellvar ;;
1581
+ esac
1582
+ eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1583
+ (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1584
+ ac_getconf=`getconf $ac_lfsvar`
1585
+ ac_getconfs=$ac_getconfs$ac_getconf
1586
+ eval ac_test_$ac_shellvar=\$ac_getconf
1587
+ done
1588
+ case "$ac_result$ac_getconfs" in
1589
+ yes[)] ac_result=no ;;
1590
+ esac
1591
+ case "$ac_result$ac_set" in
1592
+ yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
1593
+ esac
1594
+ AC_MSG_RESULT([$ac_result])
1595
+ case $ac_result in
1596
+ yes[)]
1597
+ for ac_shellvar in $ac_shellvars; do
1598
+ eval $ac_shellvar=\$ac_test_$ac_shellvar
1599
+ done ;;
1600
+ esac
1601
+ ])
1602
+
1603
+ dnl
1604
+ dnl PHP_SOCKADDR_CHECKS
1605
+ dnl
1606
+ AC_DEFUN([PHP_SOCKADDR_CHECKS], [
1607
+ dnl Check for struct sockaddr_storage exists
1608
+ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
1609
+ [AC_TRY_COMPILE([#include <sys/types.h>
1610
+ #include <sys/socket.h>],
1611
+ [struct sockaddr_storage s; s],
1612
+ [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
1613
+ ])
1614
+ if test "$ac_cv_sockaddr_storage" = "yes"; then
1615
+ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
1616
+ fi
1617
+ dnl Check if field sa_len exists in struct sockaddr
1618
+ AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
1619
+ AC_TRY_COMPILE([#include <sys/types.h>
1620
+ #include <sys/socket.h>],
1621
+ [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
1622
+ [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
1623
+ ])
1624
+ if test "$ac_cv_sockaddr_sa_len" = "yes"; then
1625
+ AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
1626
+ fi
1627
+ ])
1628
+
1629
+ dnl
1630
+ dnl PHP_DECLARED_TIMEZONE
1631
+ dnl
1632
+ AC_DEFUN([PHP_DECLARED_TIMEZONE],[
1633
+ AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
1634
+ AC_TRY_COMPILE([
1635
+ #include <sys/types.h>
1636
+ #include <time.h>
1637
+ #ifdef HAVE_SYS_TIME_H
1638
+ #include <sys/time.h>
1639
+ #endif
1640
+ ],[
1641
+ time_t foo = (time_t) timezone;
1642
+ ],[
1643
+ ac_cv_declared_timezone=yes
1644
+ ],[
1645
+ ac_cv_declared_timezone=no
1646
+ ])])
1647
+ if test "$ac_cv_declared_timezone" = "yes"; then
1648
+ AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
1649
+ fi
1650
+ ])
1651
+
1652
+ dnl
1653
+ dnl PHP_EBCDIC
1654
+ dnl
1655
+ AC_DEFUN([PHP_EBCDIC], [
1656
+ AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
1657
+ AC_TRY_RUN( [
1658
+ int main(void) {
1659
+ return (unsigned char)'A' != (unsigned char)0xC1;
1660
+ }
1661
+ ],[
1662
+ ac_cv_ebcdic=yes
1663
+ ],[
1664
+ ac_cv_ebcdic=no
1665
+ ],[
1666
+ ac_cv_ebcdic=no
1667
+ ])])
1668
+ if test "$ac_cv_ebcdic" = "yes"; then
1669
+ AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
1670
+ fi
1671
+ ])
1672
+
1673
+ dnl
1674
+ dnl PHP_BROKEN_GETCWD
1675
+ dnl
1676
+ dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
1677
+ dnl component of the path has execute but not read permissions
1678
+ dnl
1679
+ AC_DEFUN([PHP_BROKEN_GETCWD],[
1680
+ AC_MSG_CHECKING([for broken getcwd])
1681
+ os=`uname -sr 2>/dev/null`
1682
+ case $os in
1683
+ SunOS*[)]
1684
+ AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1685
+ AC_MSG_RESULT([yes]);;
1686
+ *[)]
1687
+ AC_MSG_RESULT([no]);;
1688
+ esac
1689
+ ])
1690
+
1691
+ dnl
1692
+ dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
1693
+ dnl
1694
+ AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
1695
+ AC_MSG_CHECKING([for broken libc stdio])
1696
+ AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
1697
+ AC_TRY_RUN([
1698
+ #include <stdio.h>
1699
+ int main(int argc, char *argv[])
1700
+ {
1701
+ FILE *fp;
1702
+ long position;
1703
+ char *filename = "/tmp/phpglibccheck";
1704
+
1705
+ fp = fopen(filename, "w");
1706
+ if (fp == NULL) {
1707
+ perror("fopen");
1708
+ exit(2);
1709
+ }
1710
+ fputs("foobar", fp);
1711
+ fclose(fp);
1712
+
1713
+ fp = fopen(filename, "a+");
1714
+ position = ftell(fp);
1715
+ fclose(fp);
1716
+ unlink(filename);
1717
+ if (position == 0)
1718
+ return 1;
1719
+ return 0;
1720
+ }
1721
+ ],
1722
+ [_cv_have_broken_glibc_fopen_append=no],
1723
+ [_cv_have_broken_glibc_fopen_append=yes ],
1724
+ AC_TRY_COMPILE([
1725
+ #include <features.h>
1726
+ ],[
1727
+ #if !__GLIBC_PREREQ(2,2)
1728
+ choke me
1729
+ #endif
1730
+ ],
1731
+ [_cv_have_broken_glibc_fopen_append=yes],
1732
+ [_cv_have_broken_glibc_fopen_append=no ])
1733
+ )])
1734
+
1735
+ if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
1736
+ AC_MSG_RESULT(yes)
1737
+ AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
1738
+ else
1739
+ AC_MSG_RESULT(no)
1740
+ fi
1741
+ ])
1742
+
1743
+ dnl
1744
+ dnl PHP_FOPENCOOKIE
1745
+ dnl
1746
+ AC_DEFUN([PHP_FOPENCOOKIE], [
1747
+ AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
1748
+
1749
+ if test "$have_glibc_fopencookie" = "yes"; then
1750
+ dnl this comes in two flavors:
1751
+ dnl newer glibcs (since 2.1.2 ? )
1752
+ dnl have a type called cookie_io_functions_t
1753
+ AC_TRY_COMPILE([
1754
+ #define _GNU_SOURCE
1755
+ #include <stdio.h>
1756
+ ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
1757
+
1758
+ if test "$have_cookie_io_functions_t" = "yes"; then
1759
+ cookie_io_functions_t=cookie_io_functions_t
1760
+ have_fopen_cookie=yes
1761
+
1762
+ dnl even newer glibcs have a different seeker definition...
1763
+ AC_TRY_RUN([
1764
+ #define _GNU_SOURCE
1765
+ #include <stdio.h>
1766
+
1767
+ struct cookiedata {
1768
+ __off64_t pos;
1769
+ };
1770
+
1771
+ __ssize_t reader(void *cookie, char *buffer, size_t size)
1772
+ { return size; }
1773
+ __ssize_t writer(void *cookie, const char *buffer, size_t size)
1774
+ { return size; }
1775
+ int closer(void *cookie)
1776
+ { return 0; }
1777
+ int seeker(void *cookie, __off64_t *position, int whence)
1778
+ { ((struct cookiedata*)cookie)->pos = *position; return 0; }
1779
+
1780
+ cookie_io_functions_t funcs = {reader, writer, seeker, closer};
1781
+
1782
+ main() {
1783
+ struct cookiedata g = { 0 };
1784
+ FILE *fp = fopencookie(&g, "r", funcs);
1785
+
1786
+ if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
1787
+ exit(0);
1788
+ exit(1);
1789
+ }
1790
+
1791
+ ], [
1792
+ cookie_io_functions_use_off64_t=yes
1793
+ ], [
1794
+ cookie_io_functions_use_off64_t=no
1795
+ ], [
1796
+ cookie_io_functions_use_off64_t=no
1797
+ ])
1798
+
1799
+ else
1800
+
1801
+ dnl older glibc versions (up to 2.1.2 ?)
1802
+ dnl call it _IO_cookie_io_functions_t
1803
+ AC_TRY_COMPILE([
1804
+ #define _GNU_SOURCE
1805
+ #include <stdio.h>
1806
+ ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
1807
+ if test "$have_cookie_io_functions_t" = "yes" ; then
1808
+ cookie_io_functions_t=_IO_cookie_io_functions_t
1809
+ have_fopen_cookie=yes
1810
+ fi
1811
+ fi
1812
+
1813
+ if test "$have_fopen_cookie" = "yes" ; then
1814
+ AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
1815
+ AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
1816
+ if test "$cookie_io_functions_use_off64_t" = "yes" ; then
1817
+ AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
1818
+ fi
1819
+ fi
1820
+ fi
1821
+ ])
1822
+
1823
+ dnl -------------------------------------------------------------------------
1824
+ dnl Library/function existance and build sanity checks
1825
+ dnl -------------------------------------------------------------------------
1826
+
1827
+ dnl
1828
+ dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
1829
+ dnl
1830
+ dnl Wrapper for AC_CHECK_LIB
1831
+ dnl
1832
+ AC_DEFUN([PHP_CHECK_LIBRARY], [
1833
+ save_old_LDFLAGS=$LDFLAGS
1834
+ ac_stuff="$5"
1835
+
1836
+ save_ext_shared=$ext_shared
1837
+ ext_shared=yes
1838
+ PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
1839
+ AC_CHECK_LIB([$1],[$2],[
1840
+ LDFLAGS=$save_old_LDFLAGS
1841
+ ext_shared=$save_ext_shared
1842
+ $3
1843
+ ],[
1844
+ LDFLAGS=$save_old_LDFLAGS
1845
+ ext_shared=$save_ext_shared
1846
+ unset ac_cv_lib_$1[]_$2
1847
+ $4
1848
+ ])dnl
1849
+ ])
1850
+
1851
+ dnl
1852
+ dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
1853
+ dnl
1854
+ dnl El cheapo wrapper for AC_CHECK_LIB
1855
+ dnl
1856
+ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
1857
+ save_old_LDFLAGS=$LDFLAGS
1858
+ LDFLAGS="-framework $1 $LDFLAGS"
1859
+ dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
1860
+ dnl rewriting AC_CHECK_LIB is overkill and this only affects
1861
+ dnl the "checking.." output anyway.
1862
+ AC_CHECK_LIB(c,[$2],[
1863
+ LDFLAGS=$save_old_LDFLAGS
1864
+ $3
1865
+ ],[
1866
+ LDFLAGS=$save_old_LDFLAGS
1867
+ $4
1868
+ ])
1869
+ ])
1870
+
1871
+ dnl
1872
+ dnl PHP_CHECK_FUNC_LIB(func, libs)
1873
+ dnl
1874
+ dnl This macro checks whether 'func' or '__func' exists
1875
+ dnl in the specified library.
1876
+ dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1877
+ dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
1878
+ dnl
1879
+ dnl
1880
+ dnl autoconf undefines the builtin "shift" :-(
1881
+ dnl If possible, we use the builtin shift anyway, otherwise we use
1882
+ dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
1883
+ ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
1884
+ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
1885
+ ])
1886
+ dnl
1887
+ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
1888
+ ifelse($2,,:,[
1889
+ unset ac_cv_lib_$2[]_$1
1890
+ unset ac_cv_lib_$2[]___$1
1891
+ unset found
1892
+ AC_CHECK_LIB($2, $1, [found=yes], [
1893
+ AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
1894
+ ])
1895
+
1896
+ if test "$found" = "yes"; then
1897
+ ac_libs=$LIBS
1898
+ LIBS="$LIBS -l$2"
1899
+ AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
1900
+ LIBS=$ac_libs
1901
+ fi
1902
+
1903
+ if test "$found" = "yes"; then
1904
+ PHP_ADD_LIBRARY($2)
1905
+ PHP_DEF_HAVE($1)
1906
+ PHP_DEF_HAVE(lib$2)
1907
+ ac_cv_func_$1=yes
1908
+ else
1909
+ PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
1910
+ fi
1911
+ ])
1912
+ ])
1913
+
1914
+ dnl
1915
+ dnl PHP_CHECK_FUNC(func, ...)
1916
+ dnl
1917
+ dnl This macro checks whether 'func' or '__func' exists
1918
+ dnl in the default libraries and as a fall back in the specified library.
1919
+ dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1920
+ dnl
1921
+ AC_DEFUN([PHP_CHECK_FUNC],[
1922
+ unset ac_cv_func_$1
1923
+ unset ac_cv_func___$1
1924
+ unset found
1925
+
1926
+ AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
1927
+
1928
+ case $found in
1929
+ yes[)]
1930
+ PHP_DEF_HAVE($1)
1931
+ ac_cv_func_$1=yes
1932
+ ;;
1933
+ ifelse($#,1,,[
1934
+ *[)] PHP_CHECK_FUNC_LIB($@) ;;
1935
+ ])
1936
+ esac
1937
+ ])
1938
+
1939
+ dnl
1940
+ dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
1941
+ dnl
1942
+ dnl This macro checks whether build works and given function exists.
1943
+ dnl
1944
+ AC_DEFUN([PHP_TEST_BUILD], [
1945
+ old_LIBS=$LIBS
1946
+ LIBS="$4 $LIBS"
1947
+ AC_TRY_RUN([
1948
+ $5
1949
+ char $1();
1950
+ int main() {
1951
+ $1();
1952
+ return 0;
1953
+ }
1954
+ ], [
1955
+ LIBS=$old_LIBS
1956
+ $2
1957
+ ],[
1958
+ LIBS=$old_LIBS
1959
+ $3
1960
+ ],[
1961
+ LIBS=$old_LIBS
1962
+ ])
1963
+ ])
1964
+
1965
+ dnl -------------------------------------------------------------------------
1966
+ dnl Platform characteristics checks
1967
+ dnl -------------------------------------------------------------------------
1968
+
1969
+ dnl
1970
+ dnl PHP_SHLIB_SUFFIX_NAMES
1971
+ dnl
1972
+ dnl Determines link library suffix SHLIB_SUFFIX_NAME
1973
+ dnl which can be: .so, .sl or .dylib
1974
+ dnl
1975
+ dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
1976
+ dnl suffix can be: .so or .sl
1977
+ dnl
1978
+ AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
1979
+ AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
1980
+ PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
1981
+ PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
1982
+ SHLIB_SUFFIX_NAME=so
1983
+ SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
1984
+ case $host_alias in
1985
+ *hpux*[)]
1986
+ SHLIB_SUFFIX_NAME=sl
1987
+ SHLIB_DL_SUFFIX_NAME=sl
1988
+ ;;
1989
+ *darwin*[)]
1990
+ SHLIB_SUFFIX_NAME=dylib
1991
+ SHLIB_DL_SUFFIX_NAME=so
1992
+ ;;
1993
+ esac
1994
+ ])
1995
+
1996
+ dnl
1997
+ dnl PHP_CHECK_64BIT([do if 32], [do if 64])
1998
+ dnl
1999
+ dnl This macro is used to detect if we're at 64-bit platform or not.
2000
+ dnl It could be useful for those external libs, that have different precompiled
2001
+ dnl versions in different directories.
2002
+ dnl
2003
+ AC_DEFUN([PHP_CHECK_64BIT],[
2004
+ AC_CHECK_SIZEOF(long int, 4)
2005
+ AC_MSG_CHECKING([checking if we're at 64-bit platform])
2006
+ if test "$ac_cv_sizeof_long_int" = "4" ; then
2007
+ AC_MSG_RESULT([no])
2008
+ $1
2009
+ else
2010
+ AC_MSG_RESULT([yes])
2011
+ $2
2012
+ fi
2013
+ ])
2014
+
2015
+ dnl
2016
+ dnl PHP_C_BIGENDIAN
2017
+ dnl
2018
+ dnl Replacement macro for AC_C_BIGENDIAN
2019
+ dnl
2020
+ AC_DEFUN([PHP_C_BIGENDIAN],
2021
+ [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
2022
+ [
2023
+ ac_cv_c_bigendian_php=unknown
2024
+ AC_TRY_RUN(
2025
+ [
2026
+ int main(void)
2027
+ {
2028
+ short one = 1;
2029
+ char *cp = (char *)&one;
2030
+
2031
+ if (*cp == 0) {
2032
+ return(0);
2033
+ } else {
2034
+ return(1);
2035
+ }
2036
+ }
2037
+ ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
2038
+ ])
2039
+ if test $ac_cv_c_bigendian_php = yes; then
2040
+ AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
2041
+ fi
2042
+ ])
2043
+
2044
+ dnl -------------------------------------------------------------------------
2045
+ dnl Checks for programs: PHP_PROG_<program>
2046
+ dnl -------------------------------------------------------------------------
2047
+
2048
+ dnl
2049
+ dnl PHP_PROG_SENDMAIL
2050
+ dnl
2051
+ dnl Search for the sendmail binary
2052
+ dnl
2053
+ AC_DEFUN([PHP_PROG_SENDMAIL], [
2054
+ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
2055
+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
2056
+ PHP_SUBST(PROG_SENDMAIL)
2057
+ ])
2058
+
2059
+ dnl
2060
+ dnl PHP_PROG_AWK
2061
+ dnl
2062
+ dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
2063
+ dnl
2064
+ AC_DEFUN([PHP_PROG_AWK], [
2065
+ AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
2066
+ case "$AWK" in
2067
+ *mawk)
2068
+ AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
2069
+ ;;
2070
+ *gawk)
2071
+ ;;
2072
+ bork)
2073
+ AC_MSG_ERROR([Could not find awk; Install GNU awk])
2074
+ ;;
2075
+ *)
2076
+ AC_MSG_CHECKING([if $AWK is broken])
2077
+ if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
2078
+ AC_MSG_RESULT([yes])
2079
+ AC_MSG_ERROR([You should install GNU awk])
2080
+ else
2081
+ AC_MSG_RESULT([no])
2082
+ fi
2083
+ ;;
2084
+ esac
2085
+ PHP_SUBST(AWK)
2086
+ ])
2087
+
2088
+ dnl
2089
+ dnl PHP_PROG_BISON
2090
+ dnl
2091
+ dnl Search for bison and check it's version
2092
+ dnl
2093
+ AC_DEFUN([PHP_PROG_BISON], [
2094
+ AC_PROG_YACC
2095
+ LIBZEND_BISON_CHECK
2096
+ PHP_SUBST(YACC)
2097
+ ])
2098
+
2099
+ dnl
2100
+ dnl PHP_PROG_LEX
2101
+ dnl
2102
+ dnl Search for (f)lex and check it's version
2103
+ dnl
2104
+ AC_DEFUN([PHP_PROG_LEX], [
2105
+ dnl we only support certain flex versions
2106
+ flex_version_list="2.5.4"
2107
+
2108
+ AC_PROG_LEX
2109
+ if test "$LEX" = "flex"; then
2110
+ dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
2111
+ dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
2112
+ dnl it should be removed once we drop support of autoconf 2.13 (if ever)
2113
+ AC_DECL_YYTEXT
2114
+ :
2115
+ fi
2116
+ dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2117
+ dnl ## true, for compilers like Sun's that only set __STDC__ true in
2118
+ dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2119
+ AC_C_CONST
2120
+ if test "$ac_cv_c_const" = "yes" ; then
2121
+ LEX_CFLAGS="-DYY_USE_CONST"
2122
+ fi
2123
+
2124
+ if test "$LEX" = "flex"; then
2125
+ AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2126
+ flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2127
+ php_cv_flex_version=invalid
2128
+ for flex_check_version in $flex_version_list; do
2129
+ if test "$flex_version" = "$flex_check_version"; then
2130
+ php_cv_flex_version="$flex_check_version (ok)"
2131
+ fi
2132
+ done
2133
+ ])
2134
+ else
2135
+ flex_version=none
2136
+ fi
2137
+
2138
+ case $php_cv_flex_version in
2139
+ ""|invalid[)]
2140
+ if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2141
+ AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
2142
+ else
2143
+ flex_msg="Supported flex versions are: $flex_version_list"
2144
+ if test "$flex_version" = "none"; then
2145
+ flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2146
+ else
2147
+ flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2148
+ fi
2149
+ AC_MSG_ERROR([$flex_msg])
2150
+ fi
2151
+ LEX="exit 0;"
2152
+ ;;
2153
+ esac
2154
+ PHP_SUBST(LEX)
2155
+ ])
2156
+
2157
+ dnl
2158
+ dnl PHP_PROG_RE2C
2159
+ dnl
2160
+ dnl Search for the re2c binary and check the version
2161
+ dnl
2162
+ AC_DEFUN([PHP_PROG_RE2C],[
2163
+ AC_CHECK_PROG(RE2C, re2c, re2c)
2164
+ if test -n "$RE2C"; then
2165
+ AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
2166
+ re2c_vernum=`$RE2C --vernum 2>/dev/null`
2167
+ if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
2168
+ php_cv_re2c_version=invalid
2169
+ else
2170
+ php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
2171
+ fi
2172
+ ])
2173
+ fi
2174
+ case $php_cv_re2c_version in
2175
+ ""|invalid[)]
2176
+ AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
2177
+ RE2C="exit 0;"
2178
+ ;;
2179
+ esac
2180
+ PHP_SUBST(RE2C)
2181
+ ])
2182
+
2183
+ dnl -------------------------------------------------------------------------
2184
+ dnl Common setup macros: PHP_SETUP_<what>
2185
+ dnl -------------------------------------------------------------------------
2186
+
2187
+ dnl
2188
+ dnl PHP_SETUP_ICU([shared-add])
2189
+ dnl
2190
+ dnl Common setup macro for ICU
2191
+ dnl
2192
+ AC_DEFUN([PHP_SETUP_ICU],[
2193
+ PHP_ARG_WITH(icu-dir,,
2194
+ [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
2195
+
2196
+ if test "$PHP_ICU_DIR" = "no"; then
2197
+ PHP_ICU_DIR=DEFAULT
2198
+ fi
2199
+
2200
+ if test "$PHP_ICU_DIR" = "DEFAULT"; then
2201
+ dnl Try to find icu-config
2202
+ AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
2203
+ else
2204
+ ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
2205
+ fi
2206
+
2207
+ AC_MSG_CHECKING([for location of ICU headers and libraries])
2208
+
2209
+ dnl Trust icu-config to know better what the install prefix is..
2210
+ icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
2211
+ if test "$?" != "0" || test -z "$icu_install_prefix"; then
2212
+ AC_MSG_RESULT([not found])
2213
+ AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
2214
+ else
2215
+ AC_MSG_RESULT([$icu_install_prefix])
2216
+
2217
+ dnl Check ICU version
2218
+ AC_MSG_CHECKING([for ICU 3.4 or greater])
2219
+ icu_version_full=`$ICU_CONFIG --version`
2220
+ ac_IFS=$IFS
2221
+ IFS="."
2222
+ set $icu_version_full
2223
+ IFS=$ac_IFS
2224
+ icu_version=`expr [$]1 \* 1000 + [$]2`
2225
+ AC_MSG_RESULT([found $icu_version_full])
2226
+
2227
+ if test "$icu_version" -lt "3004"; then
2228
+ AC_MSG_ERROR([ICU version 3.4 or later is required])
2229
+ fi
2230
+
2231
+ ICU_VERSION=$icu_version
2232
+ ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2233
+ ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2234
+ PHP_EVAL_INCLINE($ICU_INCS)
2235
+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
2236
+ fi
2237
+ ])
2238
+
2239
+ dnl
2240
+ dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
2241
+ dnl
2242
+ dnl Common setup macro for kerberos
2243
+ dnl
2244
+ AC_DEFUN([PHP_SETUP_KERBEROS],[
2245
+ found_kerberos=no
2246
+ unset KERBEROS_CFLAGS
2247
+ unset KERBEROS_LIBS
2248
+
2249
+ dnl First try to find krb5-config
2250
+ if test -z "$KRB5_CONFIG"; then
2251
+ AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
2252
+ fi
2253
+
2254
+ dnl If krb5-config is found try using it
2255
+ if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
2256
+ KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
2257
+ KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
2258
+
2259
+ if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
2260
+ found_kerberos=yes
2261
+ PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
2262
+ PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
2263
+ fi
2264
+ fi
2265
+
2266
+ dnl If still not found use old skool method
2267
+ if test "$found_kerberos" = "no"; then
2268
+
2269
+ if test "$PHP_KERBEROS" = "yes"; then
2270
+ PHP_KERBEROS="/usr/kerberos /usr/local /usr"
2271
+ fi
2272
+
2273
+ for i in $PHP_KERBEROS; do
2274
+ if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then
2275
+ PHP_KERBEROS_DIR=$i
2276
+ break
2277
+ fi
2278
+ done
2279
+
2280
+ if test "$PHP_KERBEROS_DIR"; then
2281
+ found_kerberos=yes
2282
+ PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
2283
+ PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
2284
+ PHP_ADD_LIBRARY(krb5, 1, $1)
2285
+ PHP_ADD_LIBRARY(k5crypto, 1, $1)
2286
+ PHP_ADD_LIBRARY(com_err, 1, $1)
2287
+ PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
2288
+ fi
2289
+ fi
2290
+
2291
+ if test "$found_kerberos" = "yes"; then
2292
+ ifelse([$2],[],:,[$2])
2293
+ ifelse([$3],[],,[else $3])
2294
+ fi
2295
+ ])
2296
+
2297
+ dnl
2298
+ dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
2299
+ dnl
2300
+ dnl Common setup macro for openssl
2301
+ dnl
2302
+ AC_DEFUN([PHP_SETUP_OPENSSL],[
2303
+ found_openssl=no
2304
+ unset OPENSSL_INCDIR
2305
+ unset OPENSSL_LIBDIR
2306
+
2307
+ dnl Empty variable means 'no'
2308
+ test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
2309
+ test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
2310
+
2311
+ dnl Fallbacks for different configure options
2312
+ if test "$PHP_OPENSSL" != "no"; then
2313
+ PHP_OPENSSL_DIR=$PHP_OPENSSL
2314
+ elif test "$PHP_IMAP_SSL" != "no"; then
2315
+ PHP_OPENSSL_DIR=$PHP_IMAP_SSL
2316
+ fi
2317
+
2318
+ dnl First try to find pkg-config
2319
+ if test -z "$PKG_CONFIG"; then
2320
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2321
+ fi
2322
+
2323
+ dnl If pkg-config is found try using it
2324
+ if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
2325
+ if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
2326
+ found_openssl=yes
2327
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
2328
+ OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
2329
+ OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
2330
+ else
2331
+ AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2332
+ fi
2333
+
2334
+ if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
2335
+ PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
2336
+ PHP_EVAL_INCLINE($OPENSSL_INCS)
2337
+ fi
2338
+ fi
2339
+
2340
+ dnl If pkg-config fails for some reason, revert to the old method
2341
+ if test "$found_openssl" = "no"; then
2342
+
2343
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
2344
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
2345
+ fi
2346
+
2347
+ for i in $PHP_OPENSSL_DIR; do
2348
+ if test -r $i/include/openssl/evp.h; then
2349
+ OPENSSL_INCDIR=$i/include
2350
+ fi
2351
+ if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
2352
+ OPENSSL_LIBDIR=$i/$PHP_LIBDIR
2353
+ fi
2354
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
2355
+ done
2356
+
2357
+ if test -z "$OPENSSL_INCDIR"; then
2358
+ AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
2359
+ fi
2360
+
2361
+ if test -z "$OPENSSL_LIBDIR"; then
2362
+ AC_MSG_ERROR([Cannot find OpenSSL's libraries])
2363
+ fi
2364
+
2365
+ old_CPPFLAGS=$CPPFLAGS
2366
+ CPPFLAGS=-I$OPENSSL_INCDIR
2367
+ AC_MSG_CHECKING([for OpenSSL version])
2368
+ AC_EGREP_CPP(yes,[
2369
+ #include <openssl/opensslv.h>
2370
+ #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
2371
+ yes
2372
+ #endif
2373
+ ],[
2374
+ AC_MSG_RESULT([>= 0.9.6])
2375
+ ],[
2376
+ AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2377
+ ])
2378
+ CPPFLAGS=$old_CPPFLAGS
2379
+
2380
+ PHP_ADD_INCLUDE($OPENSSL_INCDIR)
2381
+
2382
+ PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
2383
+ PHP_ADD_LIBRARY(crypto,,$1)
2384
+ ],[
2385
+ AC_MSG_ERROR([libcrypto not found!])
2386
+ ],[
2387
+ -L$OPENSSL_LIBDIR
2388
+ ])
2389
+
2390
+ old_LIBS=$LIBS
2391
+ LIBS="$LIBS -lcrypto"
2392
+ PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
2393
+ found_openssl=yes
2394
+ ],[
2395
+ AC_MSG_ERROR([libssl not found!])
2396
+ ],[
2397
+ -L$OPENSSL_LIBDIR
2398
+ ])
2399
+ LIBS=$old_LIBS
2400
+ PHP_ADD_LIBRARY(ssl,,$1)
2401
+
2402
+ PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
2403
+ fi
2404
+
2405
+ if test "$found_openssl" = "yes"; then
2406
+ dnl For apache 1.3.x static build
2407
+ OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
2408
+ AC_SUBST(OPENSSL_INCDIR_OPT)
2409
+
2410
+ ifelse([$2],[],:,[$2])
2411
+ ifelse([$3],[],,[else $3])
2412
+ fi
2413
+ ])
2414
+
2415
+ dnl
2416
+ dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
2417
+ dnl
2418
+ dnl Common setup macro for iconv
2419
+ dnl
2420
+ AC_DEFUN([PHP_SETUP_ICONV], [
2421
+ found_iconv=no
2422
+ unset ICONV_DIR
2423
+
2424
+ # Create the directories for a VPATH build:
2425
+ $php_shtool mkdir -p ext/iconv
2426
+
2427
+ echo > ext/iconv/php_have_bsd_iconv.h
2428
+ echo > ext/iconv/php_have_ibm_iconv.h
2429
+ echo > ext/iconv/php_have_glibc_iconv.h
2430
+ echo > ext/iconv/php_have_libiconv.h
2431
+ echo > ext/iconv/php_have_iconv.h
2432
+ echo > ext/iconv/php_php_iconv_impl.h
2433
+ echo > ext/iconv/php_iconv_aliased_libiconv.h
2434
+ echo > ext/iconv/php_php_iconv_h_path.h
2435
+ echo > ext/iconv/php_iconv_supports_errno.h
2436
+
2437
+ dnl
2438
+ dnl Check libc first if no path is provided in --with-iconv
2439
+ dnl
2440
+ if test "$PHP_ICONV" = "yes"; then
2441
+ AC_CHECK_FUNC(iconv, [
2442
+ found_iconv=yes
2443
+ ],[
2444
+ AC_CHECK_FUNC(libiconv,[
2445
+ PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2446
+ AC_DEFINE(HAVE_LIBICONV, 1, [ ])
2447
+ found_iconv=yes
2448
+ ])
2449
+ ])
2450
+ fi
2451
+
2452
+ dnl
2453
+ dnl Check external libs for iconv funcs
2454
+ dnl
2455
+ if test "$found_iconv" = "no"; then
2456
+
2457
+ for i in $PHP_ICONV /usr/local /usr; do
2458
+ if test -r $i/include/giconv.h; then
2459
+ AC_DEFINE(HAVE_GICONV_H, 1, [ ])
2460
+ ICONV_DIR=$i
2461
+ iconv_lib_name=giconv
2462
+ break
2463
+ elif test -r $i/include/iconv.h; then
2464
+ ICONV_DIR=$i
2465
+ iconv_lib_name=iconv
2466
+ break
2467
+ fi
2468
+ done
2469
+
2470
+ if test -z "$ICONV_DIR"; then
2471
+ AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
2472
+ fi
2473
+
2474
+ if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
2475
+ test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
2476
+ then
2477
+ PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
2478
+ found_iconv=yes
2479
+ PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2480
+ AC_DEFINE(HAVE_LIBICONV,1,[ ])
2481
+ PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
2482
+ AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
2483
+ ], [
2484
+ PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
2485
+ found_iconv=yes
2486
+ ], [], [
2487
+ -L$ICONV_DIR/$PHP_LIBDIR
2488
+ ])
2489
+ ], [
2490
+ -L$ICONV_DIR/$PHP_LIBDIR
2491
+ ])
2492
+ fi
2493
+ fi
2494
+
2495
+ if test "$found_iconv" = "yes"; then
2496
+ PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
2497
+ AC_DEFINE(HAVE_ICONV,1,[ ])
2498
+ if test -n "$ICONV_DIR"; then
2499
+ PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
2500
+ PHP_ADD_INCLUDE($ICONV_DIR/include)
2501
+ fi
2502
+ $2
2503
+ ifelse([$3],[],,[else $3])
2504
+ fi
2505
+ ])
2506
+
2507
+ dnl
2508
+ dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
2509
+ dnl
2510
+ dnl Common setup macro for libxml
2511
+ dnl
2512
+ AC_DEFUN([PHP_SETUP_LIBXML], [
2513
+ AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
2514
+ [
2515
+ for i in $PHP_LIBXML_DIR /usr/local /usr; do
2516
+ if test -x "$i/bin/xml2-config"; then
2517
+ ac_cv_php_xml2_config_path="$i/bin/xml2-config"
2518
+ break
2519
+ fi
2520
+ done
2521
+ ])
2522
+
2523
+ if test -x "$ac_cv_php_xml2_config_path"; then
2524
+ XML2_CONFIG="$ac_cv_php_xml2_config_path"
2525
+ libxml_full_version=`$XML2_CONFIG --version`
2526
+ ac_IFS=$IFS
2527
+ IFS="."
2528
+ set $libxml_full_version
2529
+ IFS=$ac_IFS
2530
+ LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
2531
+ if test "$LIBXML_VERSION" -ge "2006011"; then
2532
+ LIBXML_LIBS=`$XML2_CONFIG --libs`
2533
+ LIBXML_INCS=`$XML2_CONFIG --cflags`
2534
+ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
2535
+ PHP_EVAL_INCLINE($LIBXML_INCS)
2536
+
2537
+ dnl Check that build works with given libs
2538
+ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
2539
+ PHP_TEST_BUILD(xmlInitParser,
2540
+ [
2541
+ php_cv_libxml_build_works=yes
2542
+ ], [
2543
+ AC_MSG_RESULT(no)
2544
+ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
2545
+ ], [
2546
+ [$]$1
2547
+ ])
2548
+ ])
2549
+ if test "$php_cv_libxml_build_works" = "yes"; then
2550
+ AC_DEFINE(HAVE_LIBXML, 1, [ ])
2551
+ fi
2552
+ $2
2553
+ else
2554
+ AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
2555
+ fi
2556
+ ifelse([$3],[],,[else $3])
2557
+ fi
2558
+ ])
2559
+
2560
+ dnl -------------------------------------------------------------------------
2561
+ dnl Misc. macros
2562
+ dnl -------------------------------------------------------------------------
2563
+
2564
+ dnl
2565
+ dnl PHP_INSTALL_HEADERS(path [, file ...])
2566
+ dnl
2567
+ dnl PHP header files to be installed
2568
+ dnl
2569
+ AC_DEFUN([PHP_INSTALL_HEADERS],[
2570
+ ifelse([$2],[],[
2571
+ for header_file in $1; do
2572
+ PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
2573
+ INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
2574
+ ])
2575
+ done
2576
+ ], [
2577
+ header_path=$1
2578
+ for header_file in $2; do
2579
+ hp_hf="$header_path/$header_file"
2580
+ PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
2581
+ INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
2582
+ ])
2583
+ done
2584
+ ])
2585
+ ])
2586
+
2587
+ dnl
2588
+ dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
2589
+ dnl
2590
+ dnl This macro is used to get a comparable
2591
+ dnl version for apache1/2.
2592
+ dnl
2593
+ AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2594
+ ac_output=`$1 -v 2>&1 | grep version`
2595
+ ac_IFS=$IFS
2596
+ IFS="- /.
2597
+ "
2598
+ set $ac_output
2599
+ IFS=$ac_IFS
2600
+
2601
+ APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
2602
+ ])
2603
+
2604
+ dnl
2605
+ dnl PHP_DEBUG_MACRO(filename)
2606
+ dnl
2607
+ AC_DEFUN([PHP_DEBUG_MACRO],[
2608
+ DEBUG_LOG=$1
2609
+ cat >$1 <<X
2610
+ CONFIGURE: $CONFIGURE_COMMAND
2611
+ CC: $CC
2612
+ CFLAGS: $CFLAGS
2613
+ CPPFLAGS: $CPPFLAGS
2614
+ CXX: $CXX
2615
+ CXXFLAGS: $CXXFLAGS
2616
+ INCLUDES: $INCLUDES
2617
+ LDFLAGS: $LDFLAGS
2618
+ LIBS: $LIBS
2619
+ DLIBS: $DLIBS
2620
+ SAPI: $PHP_SAPI
2621
+ PHP_RPATHS: $PHP_RPATHS
2622
+ uname -a: `uname -a`
2623
+
2624
+ X
2625
+ cat >conftest.$ac_ext <<X
2626
+ main()
2627
+ {
2628
+ exit(0);
2629
+ }
2630
+ X
2631
+ (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
2632
+ rm -fr conftest*
2633
+ ])
2634
+
2635
+ dnl
2636
+ dnl PHP_CONFIG_NICE(filename)
2637
+ dnl
2638
+ dnl Generates the config.nice file
2639
+ dnl
2640
+ AC_DEFUN([PHP_CONFIG_NICE],[
2641
+ AC_REQUIRE([AC_PROG_EGREP])
2642
+ AC_REQUIRE([LT_AC_PROG_SED])
2643
+ PHP_SUBST_OLD(EGREP)
2644
+ PHP_SUBST_OLD(SED)
2645
+ test -f $1 && mv $1 $1.old
2646
+ rm -f $1.old
2647
+ cat >$1<<EOF
2648
+ #! /bin/sh
2649
+ #
2650
+ # Created by configure
2651
+
2652
+ EOF
2653
+
2654
+ for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2655
+ eval val=\$$var
2656
+ if test -n "$val"; then
2657
+ echo "$var='$val' \\" >> $1
2658
+ fi
2659
+ done
2660
+
2661
+ echo "'[$]0' \\" >> $1
2662
+ if test `expr -- [$]0 : "'.*"` = 0; then
2663
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
2664
+ else
2665
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
2666
+ fi
2667
+ for arg in $ac_configure_args; do
2668
+ if test `expr -- $arg : "'.*"` = 0; then
2669
+ if test `expr -- $arg : "--.*"` = 0; then
2670
+ break;
2671
+ fi
2672
+ echo "'[$]arg' \\" >> $1
2673
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
2674
+ else
2675
+ if test `expr -- $arg : "'--.*"` = 0; then
2676
+ break;
2677
+ fi
2678
+ echo "[$]arg \\" >> $1
2679
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
2680
+ fi
2681
+ done
2682
+ echo '"[$]@"' >> $1
2683
+ chmod +x $1
2684
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2685
+ PHP_SUBST_OLD(CONFIGURE_COMMAND)
2686
+ PHP_SUBST_OLD(CONFIGURE_OPTIONS)
2687
+ ])
2688
+
2689
+ dnl
2690
+ dnl PHP_CHECK_CONFIGURE_OPTIONS
2691
+ dnl
2692
+ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2693
+ for arg in $ac_configure_args; do
2694
+ case $arg in
2695
+ --with-*[)]
2696
+ arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2697
+ ;;
2698
+ --without-*[)]
2699
+ arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2700
+ ;;
2701
+ --enable-*[)]
2702
+ arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2703
+ ;;
2704
+ --disable-*[)]
2705
+ arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2706
+ ;;
2707
+ *[)]
2708
+ continue
2709
+ ;;
2710
+ esac
2711
+ case $arg_name in
2712
+ # Allow --disable-all / --enable-all
2713
+ enable-all[)];;
2714
+
2715
+ # Allow certain libtool options
2716
+ enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2717
+
2718
+ # Allow certain TSRM options
2719
+ with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
2720
+
2721
+ # Allow certain Zend options
2722
+ with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2723
+
2724
+ # All the rest must be set using the PHP_ARG_* macros
2725
+ # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
2726
+ *[)]
2727
+ # Options that exist before PHP 6
2728
+ if test "$PHP_MAJOR_VERSION" -lt "6"; then
2729
+ case $arg_name in
2730
+ enable-zend-multibyte[)] continue;;
2731
+ esac
2732
+ fi
2733
+
2734
+ is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2735
+ if eval test "x\$$is_arg_set" = "x"; then
2736
+ PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2737
+ [$]arg"
2738
+ fi
2739
+ ;;
2740
+ esac
2741
+ done
2742
+ ])
2743
+
2744
+ dnl
2745
+ dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2746
+ dnl
2747
+ AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
2748
+ AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [
2749
+ AC_MSG_CHECKING([for PDO includes])
2750
+ if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
2751
+ pdo_inc_path=$abs_srcdir/ext
2752
+ elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
2753
+ pdo_inc_path=$abs_srcdir/ext
2754
+ elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
2755
+ pdo_inc_path=$prefix/include/php/ext
2756
+ fi
2757
+ ])
2758
+ if test -n "$pdo_inc_path"; then
2759
+ ifelse([$1],[],:,[$1])
2760
+ else
2761
+ ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
2762
+ fi
2763
+ ])
2764
+
2765
+ dnl
2766
+ dnl PHP_DETECT_ICC
2767
+ dnl Detect Intel C++ Compiler and unset $GCC if ICC found
2768
+ AC_DEFUN([PHP_DETECT_ICC],
2769
+ [
2770
+ ICC="no"
2771
+ AC_MSG_CHECKING([for icc])
2772
+ AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
2773
+ ICC="no"
2774
+ AC_MSG_RESULT([no]),
2775
+ ICC="yes"
2776
+ GCC="no"
2777
+ AC_MSG_RESULT([yes])
2778
+ )
2779
+ ])
2780
+
2781
+ dnl PHP_DETECT_SUNCC
2782
+ dnl Detect if the systems default compiler is suncc.
2783
+ dnl We also set some usefull CFLAGS if the user didn't set any
2784
+ AC_DEFUN([PHP_DETECT_SUNCC],[
2785
+ SUNCC="no"
2786
+ AC_MSG_CHECKING([for suncc])
2787
+ AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
2788
+ SUNCC="no"
2789
+ AC_MSG_RESULT([no]),
2790
+ SUNCC="yes"
2791
+ GCC="no"
2792
+ test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
2793
+ GCC=""
2794
+ AC_MSG_RESULT([yes])
2795
+ )
2796
+ ])
2797
+
2798
+ dnl
2799
+ dnl PHP_CRYPT_R_STYLE
2800
+ dnl detect the style of crypt_r() is any is available
2801
+ dnl see APR_CHECK_CRYPT_R_STYLE() for original version
2802
+ dnl
2803
+ AC_DEFUN([PHP_CRYPT_R_STYLE],
2804
+ [
2805
+ AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
2806
+ php_cv_crypt_r_style=none
2807
+ AC_TRY_COMPILE([
2808
+ #define _REENTRANT 1
2809
+ #include <crypt.h>
2810
+ ],[
2811
+ CRYPTD buffer;
2812
+ crypt_r("passwd", "hash", &buffer);
2813
+ ],
2814
+ php_cv_crypt_r_style=cryptd)
2815
+
2816
+ if test "$php_cv_crypt_r_style" = "none"; then
2817
+ AC_TRY_COMPILE([
2818
+ #define _REENTRANT 1
2819
+ #include <crypt.h>
2820
+ ],[
2821
+ struct crypt_data buffer;
2822
+ crypt_r("passwd", "hash", &buffer);
2823
+ ],
2824
+ php_cv_crypt_r_style=struct_crypt_data)
2825
+ fi
2826
+
2827
+ if test "$php_cv_crypt_r_style" = "none"; then
2828
+ AC_TRY_COMPILE([
2829
+ #define _REENTRANT 1
2830
+ #define _GNU_SOURCE
2831
+ #include <crypt.h>
2832
+ ],[
2833
+ struct crypt_data buffer;
2834
+ crypt_r("passwd", "hash", &buffer);
2835
+ ],
2836
+ php_cv_crypt_r_style=struct_crypt_data_gnu_source)
2837
+ fi
2838
+ ])
2839
+
2840
+ if test "$php_cv_crypt_r_style" = "cryptd"; then
2841
+ AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
2842
+ fi
2843
+ if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2844
+ AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
2845
+ fi
2846
+ if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2847
+ AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
2848
+ fi
2849
+ if test "$php_cv_crypt_r_style" = "none"; then
2850
+ AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
2851
+ fi
2852
+ ])
2853
+
2854
+ dnl
2855
+ dnl PHP_TEST_WRITE_STDOUT
2856
+ dnl
2857
+ AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
2858
+ AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
2859
+ AC_TRY_RUN([
2860
+ #ifdef HAVE_UNISTD_H
2861
+ #include <unistd.h>
2862
+ #endif
2863
+
2864
+ #define TEXT "This is the test message -- "
2865
+
2866
+ main()
2867
+ {
2868
+ int n;
2869
+
2870
+ n = write(1, TEXT, sizeof(TEXT)-1);
2871
+ return (!(n == sizeof(TEXT)-1));
2872
+ }
2873
+ ],[
2874
+ ac_cv_write_stdout=yes
2875
+ ],[
2876
+ ac_cv_write_stdout=no
2877
+ ],[
2878
+ ac_cv_write_stdout=no
2879
+ ])
2880
+ ])
2881
+ if test "$ac_cv_write_stdout" = "yes"; then
2882
+ AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
2883
+ fi
2884
+ ])
2885
+
2886
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2887
+ ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
2888
+ ## 2008 Free Software Foundation, Inc.
2889
+ ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2890
+ ##
2891
+ ## This file is free software; the Free Software Foundation gives
2892
+ ## unlimited permission to copy and/or distribute it, with or without
2893
+ ## modifications, as long as this notice is preserved.
2894
+
2895
+ # serial 52 AC_PROG_LIBTOOL
2896
+
2897
+ ifdef([AC_ACVERSION],[
2898
+ # autoconf 2.13 compatibility
2899
+ # Set PATH_SEPARATOR variable
2900
+ # ---------------------------------
2901
+ # Find the correct PATH separator. Usually this is :', but
2902
+ # DJGPP uses ;' like DOS.
2903
+ if test "X${PATH_SEPARATOR+set}" != Xset; then
2904
+ UNAME=${UNAME-`uname 2>/dev/null`}
2905
+ case X$UNAME in
2906
+ *-DOS) lt_cv_sys_path_separator=';' ;;
2907
+ *) lt_cv_sys_path_separator=':' ;;
2908
+ esac
2909
+ PATH_SEPARATOR=$lt_cv_sys_path_separator
2910
+ fi
2911
+ ])
2912
+
2913
+ # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2914
+ # -----------------------------------------------------------
2915
+ # If this macro is not defined by Autoconf, define it here.
2916
+ ifdef([AC_PROVIDE_IFELSE],
2917
+ [],
2918
+ [define([AC_PROVIDE_IFELSE],
2919
+ [ifdef([AC_PROVIDE_$1],
2920
+ [$2], [$3])])])
2921
+
2922
+ # AC_PROG_LIBTOOL
2923
+ # ---------------
2924
+ AC_DEFUN([AC_PROG_LIBTOOL],
2925
+ [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
2926
+ dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
2927
+ dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
2928
+ AC_PROVIDE_IFELSE([AC_PROG_CXX],
2929
+ [AC_LIBTOOL_CXX],
2930
+ [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
2931
+ ])])
2932
+ ])# AC_PROG_LIBTOOL
2933
+
2934
+
2935
+ # _AC_PROG_LIBTOOL
2936
+ # ----------------
2937
+ AC_DEFUN([_AC_PROG_LIBTOOL],
2938
+ [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
2939
+ AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
2940
+
2941
+ # This can be used to rebuild libtool when needed
2942
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
2943
+
2944
+ # Always use our own libtool.
2945
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2946
+ AC_SUBST(LIBTOOL)dnl
2947
+
2948
+ # Prevent multiple expansion
2949
+ define([AC_PROG_LIBTOOL], [])
2950
+ ])# _AC_PROG_LIBTOOL
2951
+
2952
+
2953
+ # AC_LIBTOOL_SETUP
2954
+ # ----------------
2955
+ AC_DEFUN([AC_LIBTOOL_SETUP],
2956
+ [AC_PREREQ(2.13)dnl
2957
+ AC_REQUIRE([AC_ENABLE_SHARED])dnl
2958
+ AC_REQUIRE([AC_ENABLE_STATIC])dnl
2959
+ AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
2960
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
2961
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2962
+ AC_REQUIRE([AC_PROG_CC])dnl
2963
+ AC_REQUIRE([AC_PROG_LD])dnl
2964
+ AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
2965
+ AC_REQUIRE([AC_PROG_NM])dnl
2966
+
2967
+ AC_REQUIRE([AC_PROG_LN_S])dnl
2968
+ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
2969
+ # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2970
+ AC_REQUIRE([AC_OBJEXT])dnl
2971
+ AC_REQUIRE([AC_EXEEXT])dnl
2972
+ dnl
2973
+ AC_LIBTOOL_SYS_MAX_CMD_LEN
2974
+ AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2975
+ AC_LIBTOOL_OBJDIR
2976
+
2977
+ AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2978
+ _LT_AC_PROG_ECHO_BACKSLASH
2979
+
2980
+ case $host_os in
2981
+ aix3*)
2982
+ # AIX sometimes has problems with the GCC collect2 program. For some
2983
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
2984
+ # vanish in a puff of smoke.
2985
+ if test "X${COLLECT_NAMES+set}" != Xset; then
2986
+ COLLECT_NAMES=
2987
+ export COLLECT_NAMES
2988
+ fi
2989
+ ;;
2990
+ esac
2991
+
2992
+ # Sed substitution that helps us do robust quoting. It backslashifies
2993
+ # metacharacters that are still active within double-quoted strings.
2994
+ Xsed='sed -e 1s/^X//'
2995
+ [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
2996
+
2997
+ # Same as above, but do not quote variable references.
2998
+ [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
2999
+
3000
+ # Sed substitution to delay expansion of an escaped shell variable in a
3001
+ # double_quote_subst'ed string.
3002
+ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3003
+
3004
+ # Sed substitution to avoid accidental globbing in evaled expressions
3005
+ no_glob_subst='s/\*/\\\*/g'
3006
+
3007
+ # Constants:
3008
+ rm="rm -f"
3009
+
3010
+ # Global variables:
3011
+ default_ofile=libtool
3012
+ can_build_shared=yes
3013
+
3014
+ # All known linkers require a `.a' archive for static linking (except MSVC,
3015
+ # which needs '.lib').
3016
+ libext=a
3017
+ ltmain="$ac_aux_dir/ltmain.sh"
3018
+ ofile="$default_ofile"
3019
+ with_gnu_ld="$lt_cv_prog_gnu_ld"
3020
+
3021
+ AC_CHECK_TOOL(AR, ar, false)
3022
+ AC_CHECK_TOOL(RANLIB, ranlib, :)
3023
+ AC_CHECK_TOOL(STRIP, strip, :)
3024
+
3025
+ old_CC="$CC"
3026
+ old_CFLAGS="$CFLAGS"
3027
+
3028
+ # Set sane defaults for various variables
3029
+ test -z "$AR" && AR=ar
3030
+ test -z "$AR_FLAGS" && AR_FLAGS=cru
3031
+ test -z "$AS" && AS=as
3032
+ test -z "$CC" && CC=cc
3033
+ test -z "$LTCC" && LTCC=$CC
3034
+ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3035
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
3036
+ test -z "$LD" && LD=ld
3037
+ test -z "$LN_S" && LN_S="ln -s"
3038
+ test -z "$MAGIC_CMD" && MAGIC_CMD=file
3039
+ test -z "$NM" && NM=nm
3040
+ test -z "$SED" && SED=sed
3041
+ test -z "$OBJDUMP" && OBJDUMP=objdump
3042
+ test -z "$RANLIB" && RANLIB=:
3043
+ test -z "$STRIP" && STRIP=:
3044
+ test -z "$ac_objext" && ac_objext=o
3045
+
3046
+ # Determine commands to create old-style static archives.
3047
+ old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3048
+ old_postinstall_cmds='chmod 644 $oldlib'
3049
+ old_postuninstall_cmds=
3050
+
3051
+ if test -n "$RANLIB"; then
3052
+ case $host_os in
3053
+ openbsd*)
3054
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3055
+ ;;
3056
+ *)
3057
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3058
+ ;;
3059
+ esac
3060
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3061
+ fi
3062
+
3063
+ _LT_CC_BASENAME([$compiler])
3064
+
3065
+ # Only perform the check for file, if the check method requires it
3066
+ case $deplibs_check_method in
3067
+ file_magic*)
3068
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3069
+ AC_PATH_MAGIC
3070
+ fi
3071
+ ;;
3072
+ esac
3073
+
3074
+ _LT_REQUIRED_DARWIN_CHECKS
3075
+
3076
+ AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
3077
+ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3078
+ enable_win32_dll=yes, enable_win32_dll=no)
3079
+
3080
+ AC_ARG_ENABLE([libtool-lock],
3081
+ [ --disable-libtool-lock avoid locking (might break parallel builds)])
3082
+ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3083
+
3084
+ AC_ARG_WITH([pic],
3085
+ [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
3086
+ [pic_mode="$withval"],
3087
+ [pic_mode=default])
3088
+ test -z "$pic_mode" && pic_mode=default
3089
+
3090
+ # Use C for the default configuration in the libtool script
3091
+ tagname=
3092
+ AC_LIBTOOL_LANG_C_CONFIG
3093
+ _LT_AC_TAGCONFIG
3094
+ ])# AC_LIBTOOL_SETUP
3095
+
3096
+
3097
+ # _LT_AC_SYS_COMPILER
3098
+ # -------------------
3099
+ AC_DEFUN([_LT_AC_SYS_COMPILER],
3100
+ [AC_REQUIRE([AC_PROG_CC])dnl
3101
+
3102
+ # If no C compiler was specified, use CC.
3103
+ LTCC=${LTCC-"$CC"}
3104
+
3105
+ # If no C compiler flags were specified, use CFLAGS.
3106
+ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3107
+
3108
+ # Allow CC to be a program name with arguments.
3109
+ compiler=$CC
3110
+ ])# _LT_AC_SYS_COMPILER
3111
+
3112
+
3113
+ # _LT_CC_BASENAME(CC)
3114
+ # -------------------
3115
+ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
3116
+ AC_DEFUN([_LT_CC_BASENAME],
3117
+ [for cc_temp in $1""; do
3118
+ case $cc_temp in
3119
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3120
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3121
+ \-*) ;;
3122
+ *) break;;
3123
+ esac
3124
+ done
3125
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
3126
+ ])
3127
+
3128
+
3129
+ # _LT_COMPILER_BOILERPLATE
3130
+ # ------------------------
3131
+ # Check for compiler boilerplate output or warnings with
3132
+ # the simple compiler test code.
3133
+ AC_DEFUN([_LT_COMPILER_BOILERPLATE],
3134
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
3135
+ ac_outfile=conftest.$ac_objext
3136
+ echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3137
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3138
+ _lt_compiler_boilerplate=`cat conftest.err`
3139
+ $rm conftest*
3140
+ ])# _LT_COMPILER_BOILERPLATE
3141
+
3142
+
3143
+ # _LT_LINKER_BOILERPLATE
3144
+ # ----------------------
3145
+ # Check for linker boilerplate output or warnings with
3146
+ # the simple link test code.
3147
+ AC_DEFUN([_LT_LINKER_BOILERPLATE],
3148
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
3149
+ ac_outfile=conftest.$ac_objext
3150
+ echo "$lt_simple_link_test_code" >conftest.$ac_ext
3151
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3152
+ _lt_linker_boilerplate=`cat conftest.err`
3153
+ $rm -r conftest*
3154
+ ])# _LT_LINKER_BOILERPLATE
3155
+
3156
+
3157
+ dnl autoconf 2.13 compatibility
3158
+ dnl _LT_AC_TRY_LINK()
3159
+ AC_DEFUN(_LT_AC_TRY_LINK, [
3160
+ cat > conftest.$ac_ext <<EOF
3161
+ dnl This sometimes fails to find confdefs.h, for some reason.
3162
+ dnl [#]line __oline__ "[$]0"
3163
+ [#]line __oline__ "configure"
3164
+ #include "confdefs.h"
3165
+ int main() {
3166
+ ; return 0; }
3167
+ EOF
3168
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3169
+ ifelse([$1], , :, [$1
3170
+ rm -rf conftest*])
3171
+ else
3172
+ echo "configure: failed program was:" >&5
3173
+ cat conftest.$ac_ext >&6
3174
+ ifelse([$2], , , [$2
3175
+ rm -rf conftest*
3176
+ ])dnl
3177
+ fi
3178
+ rm -f conftest*])
3179
+
3180
+ # _LT_REQUIRED_DARWIN_CHECKS
3181
+ # --------------------------
3182
+ # Check for some things on darwin
3183
+ AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
3184
+ case $host_os in
3185
+ rhapsody* | darwin*)
3186
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3187
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3188
+
3189
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3190
+ [lt_cv_apple_cc_single_mod=no
3191
+ if test -z "${LT_MULTI_MODULE}"; then
3192
+ # By default we will add the -single_module flag. You can override
3193
+ # by either setting the environment variable LT_MULTI_MODULE
3194
+ # non-empty at configure time, or by adding -multi_module to the
3195
+ # link flags.
3196
+ echo "int foo(void){return 1;}" > conftest.c
3197
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3198
+ -dynamiclib ${wl}-single_module conftest.c
3199
+ if test -f libconftest.dylib; then
3200
+ lt_cv_apple_cc_single_mod=yes
3201
+ rm -rf libconftest.dylib*
3202
+ fi
3203
+ rm conftest.c
3204
+ fi])
3205
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3206
+ [lt_cv_ld_exported_symbols_list],
3207
+ [lt_cv_ld_exported_symbols_list=no
3208
+ save_LDFLAGS=$LDFLAGS
3209
+ echo "_main" > conftest.sym
3210
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3211
+ _LT_AC_TRY_LINK([lt_cv_ld_exported_symbols_list=yes],[lt_cv_ld_exported_symbols_list=no])
3212
+ LDFLAGS="$save_LDFLAGS"
3213
+ ])
3214
+ case $host_os in
3215
+ rhapsody* | darwin1.[[0123]])
3216
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3217
+ darwin1.*)
3218
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3219
+ darwin*)
3220
+ # if running on 10.5 or later, the deployment target defaults
3221
+ # to the OS version, if on x86, and 10.4, the deployment
3222
+ # target defaults to 10.4. Don't you love it?
3223
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3224
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3225
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3226
+ 10.[[012]]*)
3227
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3228
+ 10.*)
3229
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3230
+ esac
3231
+ ;;
3232
+ esac
3233
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3234
+ _lt_dar_single_mod='$single_module'
3235
+ fi
3236
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3237
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3238
+ else
3239
+ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
3240
+ fi
3241
+ if test "$DSYMUTIL" != ":"; then
3242
+ _lt_dsymutil="~$DSYMUTIL \$lib || :"
3243
+ else
3244
+ _lt_dsymutil=
3245
+ fi
3246
+ ;;
3247
+ esac
3248
+ ])
3249
+
3250
+ # _LT_AC_SYS_LIBPATH_AIX
3251
+ # ----------------------
3252
+ # Links a minimal program and checks the executable
3253
+ # for the system default hardcoded library path. In most cases,
3254
+ # this is /usr/lib:/lib, but when the MPI compilers are used
3255
+ # the location of the communication and MPI libs are included too.
3256
+ # If we don't find anything, use the default library path according
3257
+ # to the aix ld manual.
3258
+ AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3259
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
3260
+ _LT_AC_TRY_LINK([
3261
+ lt_aix_libpath_sed='
3262
+ /Import File Strings/,/^$/ {
3263
+ /^0/ {
3264
+ s/^0 *\(.*\)$/\1/
3265
+ p
3266
+ }
3267
+ }'
3268
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3269
+ # Check for a 64-bit object if we didn't find anything.
3270
+ if test -z "$aix_libpath"; then
3271
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3272
+ fi],[])
3273
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3274
+ ])# _LT_AC_SYS_LIBPATH_AIX
3275
+
3276
+
3277
+ # _LT_AC_SHELL_INIT(ARG)
3278
+ # ----------------------
3279
+ AC_DEFUN([_LT_AC_SHELL_INIT],
3280
+ [ifdef([AC_DIVERSION_NOTICE],
3281
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3282
+ [AC_DIVERT_PUSH(NOTICE)])
3283
+ $1
3284
+ AC_DIVERT_POP
3285
+ ])# _LT_AC_SHELL_INIT
3286
+
3287
+
3288
+ # _LT_AC_PROG_ECHO_BACKSLASH
3289
+ # --------------------------
3290
+ # Add some code to the start of the generated configure script which
3291
+ # will find an echo command which doesn't interpret backslashes.
3292
+ AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
3293
+ [_LT_AC_SHELL_INIT([
3294
+ # Check that we are running under the correct shell.
3295
+ SHELL=${CONFIG_SHELL-/bin/sh}
3296
+
3297
+ case X$ECHO in
3298
+ X*--fallback-echo)
3299
+ # Remove one level of quotation (which was required for Make).
3300
+ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3301
+ ;;
3302
+ esac
3303
+
3304
+ echo=${ECHO-echo}
3305
+ if test "X[$]1" = X--no-reexec; then
3306
+ # Discard the --no-reexec flag, and continue.
3307
+ shift
3308
+ elif test "X[$]1" = X--fallback-echo; then
3309
+ # Avoid inline document here, it may be left over
3310
+ :
3311
+ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
3312
+ # Yippee, $echo works!
3313
+ :
3314
+ else
3315
+ # Restart under the correct shell.
3316
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3317
+ fi
3318
+
3319
+ if test "X[$]1" = X--fallback-echo; then
3320
+ # used as fallback echo
3321
+ shift
3322
+ cat <<EOF
3323
+ [$]*
3324
+ EOF
3325
+ exit 0
3326
+ fi
3327
+
3328
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
3329
+ # if CDPATH is set.
3330
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3331
+
3332
+ if test -z "$ECHO"; then
3333
+ if test "X${echo_test_string+set}" != Xset; then
3334
+ # find a string as large as possible, as long as the shell can cope with it
3335
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3336
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3337
+ if (echo_test_string=`eval $cmd`) 2>/dev/null &&
3338
+ echo_test_string=`eval $cmd` &&
3339
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3340
+ then
3341
+ break
3342
+ fi
3343
+ done
3344
+ fi
3345
+
3346
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3347
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3348
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3349
+ :
3350
+ else
3351
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
3352
+ # backslashes. This makes it impossible to quote backslashes using
3353
+ # echo "$something" | sed 's/\\/\\\\/g'
3354
+ #
3355
+ # So, first we look for a working echo in the user's PATH.
3356
+
3357
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3358
+ for dir in $PATH /usr/ucb; do
3359
+ IFS="$lt_save_ifs"
3360
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3361
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3362
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3363
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3364
+ echo="$dir/echo"
3365
+ break
3366
+ fi
3367
+ done
3368
+ IFS="$lt_save_ifs"
3369
+
3370
+ if test "X$echo" = Xecho; then
3371
+ # We didn't find a better echo, so look for alternatives.
3372
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
3373
+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
3374
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3375
+ # This shell has a builtin print -r that does the trick.
3376
+ echo='print -r'
3377
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
3378
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
3379
+ # If we have ksh, try running configure again with it.
3380
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3381
+ export ORIGINAL_CONFIG_SHELL
3382
+ CONFIG_SHELL=/bin/ksh
3383
+ export CONFIG_SHELL
3384
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3385
+ else
3386
+ # Try using printf.
3387
+ echo='printf %s\n'
3388
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3389
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3390
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3391
+ # Cool, printf works
3392
+ :
3393
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3394
+ test "X$echo_testing_string" = 'X\t' &&
3395
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3396
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3397
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3398
+ export CONFIG_SHELL
3399
+ SHELL="$CONFIG_SHELL"
3400
+ export SHELL
3401
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
3402
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3403
+ test "X$echo_testing_string" = 'X\t' &&
3404
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3405
+ test "X$echo_testing_string" = "X$echo_test_string"; then
3406
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
3407
+ else
3408
+ # maybe with a smaller string...
3409
+ prev=:
3410
+
3411
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3412
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
3413
+ then
3414
+ break
3415
+ fi
3416
+ prev="$cmd"
3417
+ done
3418
+
3419
+ if test "$prev" != 'sed 50q "[$]0"'; then
3420
+ echo_test_string=`eval $prev`
3421
+ export echo_test_string
3422
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3423
+ else
3424
+ # Oops. We lost completely, so just stick with echo.
3425
+ echo=echo
3426
+ fi
3427
+ fi
3428
+ fi
3429
+ fi
3430
+ fi
3431
+ fi
3432
+
3433
+ # Copy echo and quote the copy suitably for passing to libtool from
3434
+ # the Makefile, instead of quoting the original, which is used later.
3435
+ ECHO=$echo
3436
+ if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3437
+ ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3438
+ fi
3439
+
3440
+ AC_SUBST(ECHO)
3441
+ ])])# _LT_AC_PROG_ECHO_BACKSLASH
3442
+
3443
+
3444
+ # _LT_AC_LOCK
3445
+ # -----------
3446
+ AC_DEFUN([_LT_AC_LOCK],
3447
+ [dnl
3448
+ #AC_ARG_ENABLE([libtool-lock],
3449
+ #[ --disable-libtool-lock avoid locking (might break parallel builds)])
3450
+ #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3451
+
3452
+ # Some flags need to be propagated to the compiler or linker for good
3453
+ # libtool support.
3454
+ case $host in
3455
+ ia64-*-hpux*)
3456
+ # Find out which ABI we are using.
3457
+ echo 'int i;' > conftest.$ac_ext
3458
+ if AC_TRY_EVAL(ac_compile); then
3459
+ case `/usr/bin/file conftest.$ac_objext` in
3460
+ *ELF-32*)
3461
+ HPUX_IA64_MODE="32"
3462
+ ;;
3463
+ *ELF-64*)
3464
+ HPUX_IA64_MODE="64"
3465
+ ;;
3466
+ esac
3467
+ fi
3468
+ rm -rf conftest*
3469
+ ;;
3470
+ *-*-irix6*)
3471
+ # Find out which ABI we are using.
3472
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3473
+ if AC_TRY_EVAL(ac_compile); then
3474
+ if test "$lt_cv_prog_gnu_ld" = yes; then
3475
+ case `/usr/bin/file conftest.$ac_objext` in
3476
+ *32-bit*)
3477
+ LD="${LD-ld} -melf32bsmip"
3478
+ ;;
3479
+ *N32*)
3480
+ LD="${LD-ld} -melf32bmipn32"
3481
+ ;;
3482
+ *64-bit*)
3483
+ LD="${LD-ld} -melf64bmip"
3484
+ ;;
3485
+ esac
3486
+ else
3487
+ case `/usr/bin/file conftest.$ac_objext` in
3488
+ *32-bit*)
3489
+ LD="${LD-ld} -32"
3490
+ ;;
3491
+ *N32*)
3492
+ LD="${LD-ld} -n32"
3493
+ ;;
3494
+ *64-bit*)
3495
+ LD="${LD-ld} -64"
3496
+ ;;
3497
+ esac
3498
+ fi
3499
+ fi
3500
+ rm -rf conftest*
3501
+ ;;
3502
+
3503
+ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3504
+ s390*-*linux*|sparc*-*linux*)
3505
+ # Find out which ABI we are using.
3506
+ echo 'int i;' > conftest.$ac_ext
3507
+ if AC_TRY_EVAL(ac_compile); then
3508
+ case `/usr/bin/file conftest.o` in
3509
+ *32-bit*)
3510
+ case $host in
3511
+ x86_64-*kfreebsd*-gnu)
3512
+ LD="${LD-ld} -m elf_i386_fbsd"
3513
+ ;;
3514
+ x86_64-*linux*)
3515
+ LD="${LD-ld} -m elf_i386"
3516
+ ;;
3517
+ ppc64-*linux*|powerpc64-*linux*)
3518
+ LD="${LD-ld} -m elf32ppclinux"
3519
+ ;;
3520
+ s390x-*linux*)
3521
+ LD="${LD-ld} -m elf_s390"
3522
+ ;;
3523
+ sparc64-*linux*)
3524
+ LD="${LD-ld} -m elf32_sparc"
3525
+ ;;
3526
+ esac
3527
+ ;;
3528
+ *64-bit*)
3529
+ case $host in
3530
+ x86_64-*kfreebsd*-gnu)
3531
+ LD="${LD-ld} -m elf_x86_64_fbsd"
3532
+ ;;
3533
+ x86_64-*linux*)
3534
+ LD="${LD-ld} -m elf_x86_64"
3535
+ ;;
3536
+ ppc*-*linux*|powerpc*-*linux*)
3537
+ LD="${LD-ld} -m elf64ppc"
3538
+ ;;
3539
+ s390*-*linux*)
3540
+ LD="${LD-ld} -m elf64_s390"
3541
+ ;;
3542
+ sparc*-*linux*)
3543
+ LD="${LD-ld} -m elf64_sparc"
3544
+ ;;
3545
+ esac
3546
+ ;;
3547
+ esac
3548
+ fi
3549
+ rm -rf conftest*
3550
+ ;;
3551
+
3552
+ *-*-sco3.2v5*)
3553
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3554
+ SAVE_CFLAGS="$CFLAGS"
3555
+ CFLAGS="$CFLAGS -belf"
3556
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3557
+ [AC_LANG_SAVE
3558
+ AC_LANG_C
3559
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3560
+ AC_LANG_RESTORE])
3561
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3562
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3563
+ CFLAGS="$SAVE_CFLAGS"
3564
+ fi
3565
+ ;;
3566
+ sparc*-*solaris*)
3567
+ # Find out which ABI we are using.
3568
+ echo 'int i;' > conftest.$ac_ext
3569
+ if AC_TRY_EVAL(ac_compile); then
3570
+ case `/usr/bin/file conftest.o` in
3571
+ *64-bit*)
3572
+ case $lt_cv_prog_gnu_ld in
3573
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
3574
+ *)
3575
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3576
+ LD="${LD-ld} -64"
3577
+ fi
3578
+ ;;
3579
+ esac
3580
+ ;;
3581
+ esac
3582
+ fi
3583
+ rm -rf conftest*
3584
+ ;;
3585
+
3586
+ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3587
+ [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3588
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3589
+ AC_CHECK_TOOL(AS, as, false)
3590
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
3591
+ ;;
3592
+ ])
3593
+ esac
3594
+
3595
+ need_locks="$enable_libtool_lock"
3596
+
3597
+ ])# _LT_AC_LOCK
3598
+
3599
+
3600
+ # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3601
+ # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3602
+ # ----------------------------------------------------------------
3603
+ # Check whether the given compiler option works
3604
+ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
3605
+ [AC_REQUIRE([LT_AC_PROG_SED])
3606
+ AC_CACHE_CHECK([$1], [$2],
3607
+ [$2=no
3608
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3609
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3610
+ lt_compiler_flag="$3"
3611
+ # Insert the option either (1) after the last *FLAGS variable, or
3612
+ # (2) before a word containing "conftest.", or (3) at the end.
3613
+ # Note that $ac_compile itself does not contain backslashes and begins
3614
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
3615
+ # The option is referenced via a variable to avoid confusing sed.
3616
+ lt_compile=`echo "$ac_compile" | $SED \
3617
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3618
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3619
+ -e 's:$: $lt_compiler_flag:'`
3620
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
3621
+ (eval "$lt_compile" 2>conftest.err)
3622
+ ac_status=$?
3623
+ cat conftest.err >&5
3624
+ echo "configure:__oline__: \$? = $ac_status" >&5
3625
+ if (exit $ac_status) && test -s "$ac_outfile"; then
3626
+ # The compiler can only warn and ignore the option if not recognized
3627
+ # So say no if there are warnings other than the usual output.
3628
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3629
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3630
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3631
+ $2=yes
3632
+ fi
3633
+ fi
3634
+ $rm conftest*
3635
+ ])
3636
+
3637
+ if test x"[$]$2" = xyes; then
3638
+ ifelse([$5], , :, [$5])
3639
+ else
3640
+ ifelse([$6], , :, [$6])
3641
+ fi
3642
+ ])# AC_LIBTOOL_COMPILER_OPTION
3643
+
3644
+
3645
+ # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3646
+ # [ACTION-SUCCESS], [ACTION-FAILURE])
3647
+ # ------------------------------------------------------------
3648
+ # Check whether the given compiler option works
3649
+ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
3650
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
3651
+ AC_CACHE_CHECK([$1], [$2],
3652
+ [$2=no
3653
+ save_LDFLAGS="$LDFLAGS"
3654
+ LDFLAGS="$LDFLAGS $3"
3655
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
3656
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3657
+ # The linker can only warn and ignore the option if not recognized
3658
+ # So say no if there are warnings
3659
+ if test -s conftest.err; then
3660
+ # Append any errors to the config.log.
3661
+ cat conftest.err 1>&5
3662
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3663
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3664
+ if diff conftest.exp conftest.er2 >/dev/null; then
3665
+ $2=yes
3666
+ fi
3667
+ else
3668
+ $2=yes
3669
+ fi
3670
+ fi
3671
+ $rm -r conftest*
3672
+ LDFLAGS="$save_LDFLAGS"
3673
+ ])
3674
+
3675
+ if test x"[$]$2" = xyes; then
3676
+ ifelse([$4], , :, [$4])
3677
+ else
3678
+ ifelse([$5], , :, [$5])
3679
+ fi
3680
+ ])# AC_LIBTOOL_LINKER_OPTION
3681
+
3682
+
3683
+ # AC_LIBTOOL_SYS_MAX_CMD_LEN
3684
+ # --------------------------
3685
+ AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
3686
+ [# find the maximum length of command line arguments
3687
+ AC_MSG_CHECKING([the maximum length of command line arguments])
3688
+ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3689
+ i=0
3690
+ teststring="ABCD"
3691
+
3692
+ case $build_os in
3693
+ msdosdjgpp*)
3694
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
3695
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
3696
+ # during glob expansion). Even if it were fixed, the result of this
3697
+ # check would be larger than it should be.
3698
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
3699
+ ;;
3700
+
3701
+ gnu*)
3702
+ # Under GNU Hurd, this test is not required because there is
3703
+ # no limit to the length of command line arguments.
3704
+ # Libtool will interpret -1 as no limit whatsoever
3705
+ lt_cv_sys_max_cmd_len=-1;
3706
+ ;;
3707
+
3708
+ cygwin* | mingw*)
3709
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
3710
+ # about 5 minutes as the teststring grows exponentially.
3711
+ # Worse, since 9x/ME are not pre-emptively multitasking,
3712
+ # you end up with a "frozen" computer, even though with patience
3713
+ # the test eventually succeeds (with a max line length of 256k).
3714
+ # Instead, let's just punt: use the minimum linelength reported by
3715
+ # all of the supported platforms: 8192 (on NT/2K/XP).
3716
+ lt_cv_sys_max_cmd_len=8192;
3717
+ ;;
3718
+
3719
+ amigaos*)
3720
+ # On AmigaOS with pdksh, this test takes hours, literally.
3721
+ # So we just punt and use a minimum line length of 8192.
3722
+ lt_cv_sys_max_cmd_len=8192;
3723
+ ;;
3724
+
3725
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3726
+ # This has been around since 386BSD, at least. Likely further.
3727
+ if test -x /sbin/sysctl; then
3728
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3729
+ elif test -x /usr/sbin/sysctl; then
3730
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3731
+ else
3732
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3733
+ fi
3734
+ # And add a safety zone
3735
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3736
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3737
+ ;;
3738
+
3739
+ interix*)
3740
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
3741
+ lt_cv_sys_max_cmd_len=196608
3742
+ ;;
3743
+
3744
+ osf*)
3745
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3746
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3747
+ # nice to cause kernel panics so lets avoid the loop below.
3748
+ # First set a reasonable default.
3749
+ lt_cv_sys_max_cmd_len=16384
3750
+ #
3751
+ if test -x /sbin/sysconfig; then
3752
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3753
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
3754
+ esac
3755
+ fi
3756
+ ;;
3757
+ sco3.2v5*)
3758
+ lt_cv_sys_max_cmd_len=102400
3759
+ ;;
3760
+ sysv5* | sco5v6* | sysv4.2uw2*)
3761
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3762
+ if test -n "$kargmax"; then
3763
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3764
+ else
3765
+ lt_cv_sys_max_cmd_len=32768
3766
+ fi
3767
+ ;;
3768
+ *)
3769
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3770
+ if test -n "$lt_cv_sys_max_cmd_len"; then
3771
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3772
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3773
+ else
3774
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3775
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
3776
+ = "XX$teststring") >/dev/null 2>&1 &&
3777
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
3778
+ lt_cv_sys_max_cmd_len=$new_result &&
3779
+ test $i != 17 # 1/2 MB should be enough
3780
+ do
3781
+ i=`expr $i + 1`
3782
+ teststring=$teststring$teststring
3783
+ done
3784
+ teststring=
3785
+ # Add a significant safety factor because C++ compilers can tack on massive
3786
+ # amounts of additional arguments before passing them to the linker.
3787
+ # It appears as though 1/2 is a usable value.
3788
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3789
+ fi
3790
+ ;;
3791
+ esac
3792
+ ])
3793
+ if test -n $lt_cv_sys_max_cmd_len ; then
3794
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3795
+ else
3796
+ AC_MSG_RESULT(none)
3797
+ fi
3798
+ ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
3799
+
3800
+
3801
+ # _LT_AC_CHECK_DLFCN
3802
+ # ------------------
3803
+ AC_DEFUN([_LT_AC_CHECK_DLFCN],
3804
+ [AC_CHECK_HEADERS(dlfcn.h)dnl
3805
+ ])# _LT_AC_CHECK_DLFCN
3806
+
3807
+
3808
+ # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3809
+ # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3810
+ # ---------------------------------------------------------------------
3811
+ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
3812
+ [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3813
+ if test "$cross_compiling" = yes; then :
3814
+ [$4]
3815
+ else
3816
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3817
+ lt_status=$lt_dlunknown
3818
+ cat > conftest.$ac_ext <<EOF
3819
+ [#line __oline__ "configure"
3820
+ #include "confdefs.h"
3821
+
3822
+ #if HAVE_DLFCN_H
3823
+ #include <dlfcn.h>
3824
+ #endif
3825
+
3826
+ #include <stdio.h>
3827
+
3828
+ #ifdef RTLD_GLOBAL
3829
+ # define LT_DLGLOBAL RTLD_GLOBAL
3830
+ #else
3831
+ # ifdef DL_GLOBAL
3832
+ # define LT_DLGLOBAL DL_GLOBAL
3833
+ # else
3834
+ # define LT_DLGLOBAL 0
3835
+ # endif
3836
+ #endif
3837
+
3838
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3839
+ find out it does not work in some platform. */
3840
+ #ifndef LT_DLLAZY_OR_NOW
3841
+ # ifdef RTLD_LAZY
3842
+ # define LT_DLLAZY_OR_NOW RTLD_LAZY
3843
+ # else
3844
+ # ifdef DL_LAZY
3845
+ # define LT_DLLAZY_OR_NOW DL_LAZY
3846
+ # else
3847
+ # ifdef RTLD_NOW
3848
+ # define LT_DLLAZY_OR_NOW RTLD_NOW
3849
+ # else
3850
+ # ifdef DL_NOW
3851
+ # define LT_DLLAZY_OR_NOW DL_NOW
3852
+ # else
3853
+ # define LT_DLLAZY_OR_NOW 0
3854
+ # endif
3855
+ # endif
3856
+ # endif
3857
+ # endif
3858
+ #endif
3859
+
3860
+ #ifdef __cplusplus
3861
+ extern "C" void exit (int);
3862
+ #endif
3863
+
3864
+ void fnord() { int i=42;}
3865
+ int main ()
3866
+ {
3867
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3868
+ int status = $lt_dlunknown;
3869
+
3870
+ if (self)
3871
+ {
3872
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3873
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3874
+ /* dlclose (self); */
3875
+ }
3876
+ else
3877
+ puts (dlerror ());
3878
+
3879
+ exit (status);
3880
+ }]
3881
+ EOF
3882
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3883
+ (./conftest; exit; ) >&5 2>/dev/null
3884
+ lt_status=$?
3885
+ case x$lt_status in
3886
+ x$lt_dlno_uscore) $1 ;;
3887
+ x$lt_dlneed_uscore) $2 ;;
3888
+ x$lt_dlunknown|x*) $3 ;;
3889
+ esac
3890
+ else :
3891
+ # compilation failed
3892
+ $3
3893
+ fi
3894
+ fi
3895
+ rm -fr conftest*
3896
+ ])# _LT_AC_TRY_DLOPEN_SELF
3897
+
3898
+
3899
+ # AC_LIBTOOL_DLOPEN_SELF
3900
+ # ----------------------
3901
+ AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
3902
+ [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3903
+ if test "x$enable_dlopen" != xyes; then
3904
+ enable_dlopen=unknown
3905
+ enable_dlopen_self=unknown
3906
+ enable_dlopen_self_static=unknown
3907
+ else
3908
+ lt_cv_dlopen=no
3909
+ lt_cv_dlopen_libs=
3910
+
3911
+ case $host_os in
3912
+ beos*)
3913
+ lt_cv_dlopen="load_add_on"
3914
+ lt_cv_dlopen_libs=
3915
+ lt_cv_dlopen_self=yes
3916
+ ;;
3917
+
3918
+ mingw* | pw32*)
3919
+ lt_cv_dlopen="LoadLibrary"
3920
+ lt_cv_dlopen_libs=
3921
+ ;;
3922
+
3923
+ cygwin*)
3924
+ lt_cv_dlopen="dlopen"
3925
+ lt_cv_dlopen_libs=
3926
+ ;;
3927
+
3928
+ darwin*)
3929
+ # if libdl is installed we need to link against it
3930
+ AC_CHECK_LIB([dl], [dlopen],
3931
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3932
+ lt_cv_dlopen="dyld"
3933
+ lt_cv_dlopen_libs=
3934
+ lt_cv_dlopen_self=yes
3935
+ ])
3936
+ ;;
3937
+
3938
+ *)
3939
+ AC_CHECK_FUNC([shl_load],
3940
+ [lt_cv_dlopen="shl_load"],
3941
+ [AC_CHECK_LIB([dld], [shl_load],
3942
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3943
+ [AC_CHECK_FUNC([dlopen],
3944
+ [lt_cv_dlopen="dlopen"],
3945
+ [AC_CHECK_LIB([dl], [dlopen],
3946
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3947
+ [AC_CHECK_LIB([svld], [dlopen],
3948
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3949
+ [AC_CHECK_LIB([dld], [dld_link],
3950
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3951
+ ])
3952
+ ])
3953
+ ])
3954
+ ])
3955
+ ])
3956
+ ;;
3957
+ esac
3958
+
3959
+ if test "x$lt_cv_dlopen" != xno; then
3960
+ enable_dlopen=yes
3961
+ else
3962
+ enable_dlopen=no
3963
+ fi
3964
+
3965
+ case $lt_cv_dlopen in
3966
+ dlopen)
3967
+ save_CPPFLAGS="$CPPFLAGS"
3968
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3969
+
3970
+ save_LDFLAGS="$LDFLAGS"
3971
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3972
+
3973
+ save_LIBS="$LIBS"
3974
+ LIBS="$lt_cv_dlopen_libs $LIBS"
3975
+
3976
+ AC_CACHE_CHECK([whether a program can dlopen itself],
3977
+ lt_cv_dlopen_self, [dnl
3978
+ _LT_AC_TRY_DLOPEN_SELF(
3979
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3980
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3981
+ ])
3982
+
3983
+ if test "x$lt_cv_dlopen_self" = xyes; then
3984
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3985
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3986
+ lt_cv_dlopen_self_static, [dnl
3987
+ _LT_AC_TRY_DLOPEN_SELF(
3988
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3989
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3990
+ ])
3991
+ fi
3992
+
3993
+ CPPFLAGS="$save_CPPFLAGS"
3994
+ LDFLAGS="$save_LDFLAGS"
3995
+ LIBS="$save_LIBS"
3996
+ ;;
3997
+ esac
3998
+
3999
+ case $lt_cv_dlopen_self in
4000
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4001
+ *) enable_dlopen_self=unknown ;;
4002
+ esac
4003
+
4004
+ case $lt_cv_dlopen_self_static in
4005
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4006
+ *) enable_dlopen_self_static=unknown ;;
4007
+ esac
4008
+ fi
4009
+ ])# AC_LIBTOOL_DLOPEN_SELF
4010
+
4011
+
4012
+ # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
4013
+ # ---------------------------------
4014
+ # Check to see if options -c and -o are simultaneously supported by compiler
4015
+ AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
4016
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
4017
+ AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4018
+ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4019
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4020
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4021
+ $rm -r conftest 2>/dev/null
4022
+ mkdir conftest
4023
+ cd conftest
4024
+ mkdir out
4025
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4026
+
4027
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
4028
+ # Insert the option either (1) after the last *FLAGS variable, or
4029
+ # (2) before a word containing "conftest.", or (3) at the end.
4030
+ # Note that $ac_compile itself does not contain backslashes and begins
4031
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
4032
+ lt_compile=`echo "$ac_compile" | $SED \
4033
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4034
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4035
+ -e 's:$: $lt_compiler_flag:'`
4036
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
4037
+ (eval "$lt_compile" 2>out/conftest.err)
4038
+ ac_status=$?
4039
+ cat out/conftest.err >&5
4040
+ echo "configure:__oline__: \$? = $ac_status" >&5
4041
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
4042
+ then
4043
+ # The compiler can only warn and ignore the option if not recognized
4044
+ # So say no if there are warnings
4045
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
4046
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4047
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4048
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4049
+ fi
4050
+ fi
4051
+ chmod u+w . 2>&5
4052
+ $rm conftest*
4053
+ # SGI C++ compiler will create directory out/ii_files/ for
4054
+ # template instantiation
4055
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
4056
+ $rm out/* && rmdir out
4057
+ cd ..
4058
+ rmdir conftest
4059
+ $rm conftest*
4060
+ ])
4061
+ ])# AC_LIBTOOL_PROG_CC_C_O
4062
+
4063
+
4064
+ # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
4065
+ # -----------------------------------------
4066
+ # Check to see if we can do hard links to lock some files if needed
4067
+ AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
4068
+ [AC_REQUIRE([_LT_AC_LOCK])dnl
4069
+
4070
+ hard_links="nottested"
4071
+ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4072
+ # do not overwrite the value of need_locks provided by the user
4073
+ AC_MSG_CHECKING([if we can lock with hard links])
4074
+ hard_links=yes
4075
+ $rm conftest*
4076
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
4077
+ touch conftest.a
4078
+ ln conftest.a conftest.b 2>&5 || hard_links=no
4079
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
4080
+ AC_MSG_RESULT([$hard_links])
4081
+ if test "$hard_links" = no; then
4082
+ AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
4083
+ need_locks=warn
4084
+ fi
4085
+ else
4086
+ need_locks=no
4087
+ fi
4088
+ ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
4089
+
4090
+
4091
+ # AC_LIBTOOL_OBJDIR
4092
+ # -----------------
4093
+ AC_DEFUN([AC_LIBTOOL_OBJDIR],
4094
+ [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4095
+ [rm -f .libs 2>/dev/null
4096
+ mkdir .libs 2>/dev/null
4097
+ if test -d .libs; then
4098
+ lt_cv_objdir=.libs
4099
+ else
4100
+ # MS-DOS does not allow filenames that begin with a dot.
4101
+ lt_cv_objdir=_libs
4102
+ fi
4103
+ rmdir .libs 2>/dev/null])
4104
+ objdir=$lt_cv_objdir
4105
+ ])# AC_LIBTOOL_OBJDIR
4106
+
4107
+
4108
+ # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
4109
+ # ----------------------------------------------
4110
+ # Check hardcoding attributes.
4111
+ AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
4112
+ [AC_MSG_CHECKING([how to hardcode library paths into programs])
4113
+ _LT_AC_TAGVAR(hardcode_action, $1)=
4114
+ if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
4115
+ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
4116
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4117
+
4118
+ # We can hardcode non-existant directories.
4119
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
4120
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
4121
+ # have to relink, otherwise we might link with an installed library
4122
+ # when we should be linking with a yet-to-be-installed one
4123
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4124
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
4125
+ # Linking always hardcodes the temporary library directory.
4126
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
4127
+ else
4128
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
4129
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
4130
+ fi
4131
+ else
4132
+ # We cannot hardcode anything, or else we can only hardcode existing
4133
+ # directories.
4134
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
4135
+ fi
4136
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
4137
+
4138
+ if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
4139
+ # Fast installation is not supported
4140
+ enable_fast_install=no
4141
+ elif test "$shlibpath_overrides_runpath" = yes ||
4142
+ test "$enable_shared" = no; then
4143
+ # Fast installation is not necessary
4144
+ enable_fast_install=needless
4145
+ fi
4146
+ ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
4147
+
4148
+
4149
+ # AC_LIBTOOL_SYS_LIB_STRIP
4150
+ # ------------------------
4151
+ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
4152
+ [striplib=
4153
+ old_striplib=
4154
+ AC_MSG_CHECKING([whether stripping libraries is possible])
4155
+ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
4156
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4157
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4158
+ AC_MSG_RESULT([yes])
4159
+ else
4160
+ # FIXME - insert some real tests, host_os isn't really good enough
4161
+ case $host_os in
4162
+ darwin*)
4163
+ if test -n "$STRIP" ; then
4164
+ striplib="$STRIP -x"
4165
+ old_striplib="$STRIP -S"
4166
+ AC_MSG_RESULT([yes])
4167
+ else
4168
+ AC_MSG_RESULT([no])
4169
+ fi
4170
+ ;;
4171
+ *)
4172
+ AC_MSG_RESULT([no])
4173
+ ;;
4174
+ esac
4175
+ fi
4176
+ ])# AC_LIBTOOL_SYS_LIB_STRIP
4177
+
4178
+
4179
+ # AC_LIBTOOL_SYS_DYNAMIC_LINKER
4180
+ # -----------------------------
4181
+ # PORTME Fill in your ld.so characteristics
4182
+ AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
4183
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
4184
+ AC_MSG_CHECKING([dynamic linker characteristics])
4185
+ library_names_spec=
4186
+ libname_spec='lib$name'
4187
+ soname_spec=
4188
+ shrext_cmds=".so"
4189
+ postinstall_cmds=
4190
+ postuninstall_cmds=
4191
+ finish_cmds=
4192
+ finish_eval=
4193
+ shlibpath_var=
4194
+ shlibpath_overrides_runpath=unknown
4195
+ version_type=none
4196
+ dynamic_linker="$host_os ld.so"
4197
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
4198
+ ifelse($1,[],[
4199
+ if test "$GCC" = yes; then
4200
+ case $host_os in
4201
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4202
+ *) lt_awk_arg="/^libraries:/" ;;
4203
+ esac
4204
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4205
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
4206
+ # if the path contains ";" then we assume it to be the separator
4207
+ # otherwise default to the standard path separator (i.e. ":") - it is
4208
+ # assumed that no part of a normal pathname contains ";" but that should
4209
+ # okay in the real world where ";" in dirpaths is itself problematic.
4210
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4211
+ else
4212
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4213
+ fi
4214
+ # Ok, now we have the path, separated by spaces, we can step through it
4215
+ # and add multilib dir if necessary.
4216
+ lt_tmp_lt_search_path_spec=
4217
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4218
+ for lt_sys_path in $lt_search_path_spec; do
4219
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4220
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4221
+ else
4222
+ test -d "$lt_sys_path" && \
4223
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4224
+ fi
4225
+ done
4226
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
4227
+ BEGIN {RS=" "; FS="/|\n";} {
4228
+ lt_foo="";
4229
+ lt_count=0;
4230
+ for (lt_i = NF; lt_i > 0; lt_i--) {
4231
+ if ($lt_i != "" && $lt_i != ".") {
4232
+ if ($lt_i == "..") {
4233
+ lt_count++;
4234
+ } else {
4235
+ if (lt_count == 0) {
4236
+ lt_foo="/" $lt_i lt_foo;
4237
+ } else {
4238
+ lt_count--;
4239
+ }
4240
+ }
4241
+ }
4242
+ }
4243
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4244
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4245
+ }'`
4246
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
4247
+ else
4248
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4249
+ fi])
4250
+ need_lib_prefix=unknown
4251
+ hardcode_into_libs=no
4252
+
4253
+ # when you set need_version to no, make sure it does not cause -set_version
4254
+ # flags to be left without arguments
4255
+ need_version=unknown
4256
+
4257
+ case $host_os in
4258
+ aix3*)
4259
+ version_type=linux
4260
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4261
+ shlibpath_var=LIBPATH
4262
+
4263
+ # AIX 3 has no versioning support, so we append a major version to the name.
4264
+ soname_spec='${libname}${release}${shared_ext}$major'
4265
+ ;;
4266
+
4267
+ aix[[4-9]]*)
4268
+ version_type=linux
4269
+ need_lib_prefix=no
4270
+ need_version=no
4271
+ hardcode_into_libs=yes
4272
+ if test "$host_cpu" = ia64; then
4273
+ # AIX 5 supports IA64
4274
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4275
+ shlibpath_var=LD_LIBRARY_PATH
4276
+ else
4277
+ # With GCC up to 2.95.x, collect2 would create an import file
4278
+ # for dependence libraries. The import file would start with
4279
+ # the line `#! .'. This would cause the generated library to
4280
+ # depend on `.', always an invalid library. This was fixed in
4281
+ # development snapshots of GCC prior to 3.0.
4282
+ case $host_os in
4283
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
4284
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4285
+ echo ' yes '
4286
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
4287
+ :
4288
+ else
4289
+ can_build_shared=no
4290
+ fi
4291
+ ;;
4292
+ esac
4293
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4294
+ # soname into executable. Probably we can add versioning support to
4295
+ # collect2, so additional links can be useful in future.
4296
+ if test "$aix_use_runtimelinking" = yes; then
4297
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4298
+ # instead of lib<name>.a to let people know that these are not
4299
+ # typical AIX shared libraries.
4300
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4301
+ else
4302
+ # We preserve .a as extension for shared libraries through AIX4.2
4303
+ # and later when we are not doing run time linking.
4304
+ library_names_spec='${libname}${release}.a $libname.a'
4305
+ soname_spec='${libname}${release}${shared_ext}$major'
4306
+ fi
4307
+ shlibpath_var=LIBPATH
4308
+ fi
4309
+ ;;
4310
+
4311
+ amigaos*)
4312
+ library_names_spec='$libname.ixlibrary $libname.a'
4313
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
4314
+ 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'
4315
+ ;;
4316
+
4317
+ beos*)
4318
+ library_names_spec='${libname}${shared_ext}'
4319
+ dynamic_linker="$host_os ld.so"
4320
+ shlibpath_var=LIBRARY_PATH
4321
+ ;;
4322
+
4323
+ bsdi[[45]]*)
4324
+ version_type=linux
4325
+ need_version=no
4326
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4327
+ soname_spec='${libname}${release}${shared_ext}$major'
4328
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4329
+ shlibpath_var=LD_LIBRARY_PATH
4330
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4331
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4332
+ # the default ld.so.conf also contains /usr/contrib/lib and
4333
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4334
+ # libtool to hard-code these into programs
4335
+ ;;
4336
+
4337
+ cygwin* | mingw* | pw32*)
4338
+ version_type=windows
4339
+ shrext_cmds=".dll"
4340
+ need_version=no
4341
+ need_lib_prefix=no
4342
+
4343
+ case $GCC,$host_os in
4344
+ yes,cygwin* | yes,mingw* | yes,pw32*)
4345
+ library_names_spec='$libname.dll.a'
4346
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
4347
+ postinstall_cmds='base_file=`basename \${file}`~
4348
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
4349
+ dldir=$destdir/`dirname \$dlpath`~
4350
+ test -d \$dldir || mkdir -p \$dldir~
4351
+ $install_prog $dir/$dlname \$dldir/$dlname~
4352
+ chmod a+x \$dldir/$dlname'
4353
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4354
+ dlpath=$dir/\$dldll~
4355
+ $rm \$dlpath'
4356
+ shlibpath_overrides_runpath=yes
4357
+
4358
+ case $host_os in
4359
+ cygwin*)
4360
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4361
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4362
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4363
+ ;;
4364
+ mingw*)
4365
+ # MinGW DLLs use traditional 'lib' prefix
4366
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4367
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4368
+ if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
4369
+ # It is most probably a Windows format PATH printed by
4370
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
4371
+ # path with ; separators, and with drive letters. We can handle the
4372
+ # drive letters (cygwin fileutils understands them), so leave them,
4373
+ # especially as we might pass files found there to a mingw objdump,
4374
+ # which wouldn't understand a cygwinified path. Ahh.
4375
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4376
+ else
4377
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4378
+ fi
4379
+ ;;
4380
+ pw32*)
4381
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
4382
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4383
+ ;;
4384
+ esac
4385
+ ;;
4386
+
4387
+ *)
4388
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4389
+ ;;
4390
+ esac
4391
+ dynamic_linker='Win32 ld.exe'
4392
+ # FIXME: first we should search . and the directory the executable is in
4393
+ shlibpath_var=PATH
4394
+ ;;
4395
+
4396
+ darwin* | rhapsody*)
4397
+ dynamic_linker="$host_os dyld"
4398
+ version_type=darwin
4399
+ need_lib_prefix=no
4400
+ need_version=no
4401
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4402
+ soname_spec='${libname}${release}${major}$shared_ext'
4403
+ shlibpath_overrides_runpath=yes
4404
+ shlibpath_var=DYLD_LIBRARY_PATH
4405
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4406
+ ifelse([$1], [],[
4407
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4408
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4409
+ ;;
4410
+
4411
+ dgux*)
4412
+ version_type=linux
4413
+ need_lib_prefix=no
4414
+ need_version=no
4415
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4416
+ soname_spec='${libname}${release}${shared_ext}$major'
4417
+ shlibpath_var=LD_LIBRARY_PATH
4418
+ ;;
4419
+
4420
+ freebsd1*)
4421
+ dynamic_linker=no
4422
+ ;;
4423
+
4424
+ freebsd* | dragonfly*)
4425
+ # DragonFly does not have aout. When/if they implement a new
4426
+ # versioning mechanism, adjust this.
4427
+ if test -x /usr/bin/objformat; then
4428
+ objformat=`/usr/bin/objformat`
4429
+ else
4430
+ case $host_os in
4431
+ freebsd[[123]]*) objformat=aout ;;
4432
+ *) objformat=elf ;;
4433
+ esac
4434
+ fi
4435
+ version_type=freebsd-$objformat
4436
+ case $version_type in
4437
+ freebsd-elf*)
4438
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4439
+ need_version=no
4440
+ need_lib_prefix=no
4441
+ ;;
4442
+ freebsd-*)
4443
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4444
+ need_version=yes
4445
+ ;;
4446
+ esac
4447
+ shlibpath_var=LD_LIBRARY_PATH
4448
+ case $host_os in
4449
+ freebsd2*)
4450
+ shlibpath_overrides_runpath=yes
4451
+ ;;
4452
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4453
+ shlibpath_overrides_runpath=yes
4454
+ hardcode_into_libs=yes
4455
+ ;;
4456
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4457
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4458
+ shlibpath_overrides_runpath=no
4459
+ hardcode_into_libs=yes
4460
+ ;;
4461
+ *) # from 4.6 on, and DragonFly
4462
+ shlibpath_overrides_runpath=yes
4463
+ hardcode_into_libs=yes
4464
+ ;;
4465
+ esac
4466
+ ;;
4467
+
4468
+ gnu*)
4469
+ version_type=linux
4470
+ need_lib_prefix=no
4471
+ need_version=no
4472
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4473
+ soname_spec='${libname}${release}${shared_ext}$major'
4474
+ shlibpath_var=LD_LIBRARY_PATH
4475
+ hardcode_into_libs=yes
4476
+ ;;
4477
+
4478
+ hpux9* | hpux10* | hpux11*)
4479
+ # Give a soname corresponding to the major version so that dld.sl refuses to
4480
+ # link against other versions.
4481
+ version_type=sunos
4482
+ need_lib_prefix=no
4483
+ need_version=no
4484
+ case $host_cpu in
4485
+ ia64*)
4486
+ shrext_cmds='.so'
4487
+ hardcode_into_libs=yes
4488
+ dynamic_linker="$host_os dld.so"
4489
+ shlibpath_var=LD_LIBRARY_PATH
4490
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4491
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4492
+ soname_spec='${libname}${release}${shared_ext}$major'
4493
+ if test "X$HPUX_IA64_MODE" = X32; then
4494
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4495
+ else
4496
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4497
+ fi
4498
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4499
+ ;;
4500
+ hppa*64*)
4501
+ shrext_cmds='.sl'
4502
+ hardcode_into_libs=yes
4503
+ dynamic_linker="$host_os dld.sl"
4504
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4505
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4506
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4507
+ soname_spec='${libname}${release}${shared_ext}$major'
4508
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4509
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4510
+ ;;
4511
+ *)
4512
+ shrext_cmds='.sl'
4513
+ dynamic_linker="$host_os dld.sl"
4514
+ shlibpath_var=SHLIB_PATH
4515
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4516
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4517
+ soname_spec='${libname}${release}${shared_ext}$major'
4518
+ ;;
4519
+ esac
4520
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
4521
+ postinstall_cmds='chmod 555 $lib'
4522
+ ;;
4523
+
4524
+ interix[[3-9]]*)
4525
+ version_type=linux
4526
+ need_lib_prefix=no
4527
+ need_version=no
4528
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4529
+ soname_spec='${libname}${release}${shared_ext}$major'
4530
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4531
+ shlibpath_var=LD_LIBRARY_PATH
4532
+ shlibpath_overrides_runpath=no
4533
+ hardcode_into_libs=yes
4534
+ ;;
4535
+
4536
+ irix5* | irix6* | nonstopux*)
4537
+ case $host_os in
4538
+ nonstopux*) version_type=nonstopux ;;
4539
+ *)
4540
+ if test "$lt_cv_prog_gnu_ld" = yes; then
4541
+ version_type=linux
4542
+ else
4543
+ version_type=irix
4544
+ fi ;;
4545
+ esac
4546
+ need_lib_prefix=no
4547
+ need_version=no
4548
+ soname_spec='${libname}${release}${shared_ext}$major'
4549
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4550
+ case $host_os in
4551
+ irix5* | nonstopux*)
4552
+ libsuff= shlibsuff=
4553
+ ;;
4554
+ *)
4555
+ case $LD in # libtool.m4 will add one of these switches to LD
4556
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4557
+ libsuff= shlibsuff= libmagic=32-bit;;
4558
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4559
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
4560
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4561
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
4562
+ *) libsuff= shlibsuff= libmagic=never-match;;
4563
+ esac
4564
+ ;;
4565
+ esac
4566
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4567
+ shlibpath_overrides_runpath=no
4568
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4569
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4570
+ hardcode_into_libs=yes
4571
+ ;;
4572
+
4573
+ # No shared lib support for Linux oldld, aout, or coff.
4574
+ linux*oldld* | linux*aout* | linux*coff*)
4575
+ dynamic_linker=no
4576
+ ;;
4577
+
4578
+ # This must be Linux ELF.
4579
+ linux* | k*bsd*-gnu)
4580
+ version_type=linux
4581
+ need_lib_prefix=no
4582
+ need_version=no
4583
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4584
+ soname_spec='${libname}${release}${shared_ext}$major'
4585
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4586
+ shlibpath_var=LD_LIBRARY_PATH
4587
+ shlibpath_overrides_runpath=no
4588
+ # This implies no fast_install, which is unacceptable.
4589
+ # Some rework will be needed to allow for fast_install
4590
+ # before this can be enabled.
4591
+ hardcode_into_libs=yes
4592
+
4593
+ # Append ld.so.conf contents to the search path
4594
+ if test -f /etc/ld.so.conf; then
4595
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
4596
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4597
+ fi
4598
+
4599
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
4600
+ # powerpc, because MkLinux only supported shared libraries with the
4601
+ # GNU dynamic linker. Since this was broken with cross compilers,
4602
+ # most powerpc-linux boxes support dynamic linking these days and
4603
+ # people can always --disable-shared, the test was removed, and we
4604
+ # assume the GNU/Linux dynamic linker is in use.
4605
+ dynamic_linker='GNU/Linux ld.so'
4606
+ ;;
4607
+
4608
+ netbsd*)
4609
+ version_type=sunos
4610
+ need_lib_prefix=no
4611
+ need_version=no
4612
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4613
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4614
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4615
+ dynamic_linker='NetBSD (a.out) ld.so'
4616
+ else
4617
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4618
+ soname_spec='${libname}${release}${shared_ext}$major'
4619
+ dynamic_linker='NetBSD ld.elf_so'
4620
+ fi
4621
+ shlibpath_var=LD_LIBRARY_PATH
4622
+ shlibpath_overrides_runpath=yes
4623
+ hardcode_into_libs=yes
4624
+ ;;
4625
+
4626
+ newsos6)
4627
+ version_type=linux
4628
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4629
+ shlibpath_var=LD_LIBRARY_PATH
4630
+ shlibpath_overrides_runpath=yes
4631
+ ;;
4632
+
4633
+ nto-qnx*)
4634
+ version_type=linux
4635
+ need_lib_prefix=no
4636
+ need_version=no
4637
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4638
+ soname_spec='${libname}${release}${shared_ext}$major'
4639
+ shlibpath_var=LD_LIBRARY_PATH
4640
+ shlibpath_overrides_runpath=yes
4641
+ ;;
4642
+
4643
+ openbsd*)
4644
+ version_type=sunos
4645
+ sys_lib_dlsearch_path_spec="/usr/lib"
4646
+ need_lib_prefix=no
4647
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4648
+ case $host_os in
4649
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4650
+ *) need_version=no ;;
4651
+ esac
4652
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4653
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4654
+ shlibpath_var=LD_LIBRARY_PATH
4655
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4656
+ case $host_os in
4657
+ openbsd2.[[89]] | openbsd2.[[89]].*)
4658
+ shlibpath_overrides_runpath=no
4659
+ ;;
4660
+ *)
4661
+ shlibpath_overrides_runpath=yes
4662
+ ;;
4663
+ esac
4664
+ else
4665
+ shlibpath_overrides_runpath=yes
4666
+ fi
4667
+ ;;
4668
+
4669
+ os2*)
4670
+ libname_spec='$name'
4671
+ shrext_cmds=".dll"
4672
+ need_lib_prefix=no
4673
+ library_names_spec='$libname${shared_ext} $libname.a'
4674
+ dynamic_linker='OS/2 ld.exe'
4675
+ shlibpath_var=LIBPATH
4676
+ ;;
4677
+
4678
+ osf3* | osf4* | osf5*)
4679
+ version_type=osf
4680
+ need_lib_prefix=no
4681
+ need_version=no
4682
+ soname_spec='${libname}${release}${shared_ext}$major'
4683
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4684
+ shlibpath_var=LD_LIBRARY_PATH
4685
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4686
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4687
+ ;;
4688
+
4689
+ rdos*)
4690
+ dynamic_linker=no
4691
+ ;;
4692
+
4693
+ solaris*)
4694
+ version_type=linux
4695
+ need_lib_prefix=no
4696
+ need_version=no
4697
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4698
+ soname_spec='${libname}${release}${shared_ext}$major'
4699
+ shlibpath_var=LD_LIBRARY_PATH
4700
+ shlibpath_overrides_runpath=yes
4701
+ hardcode_into_libs=yes
4702
+ # ldd complains unless libraries are executable
4703
+ postinstall_cmds='chmod +x $lib'
4704
+ ;;
4705
+
4706
+ sunos4*)
4707
+ version_type=sunos
4708
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4709
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4710
+ shlibpath_var=LD_LIBRARY_PATH
4711
+ shlibpath_overrides_runpath=yes
4712
+ if test "$with_gnu_ld" = yes; then
4713
+ need_lib_prefix=no
4714
+ fi
4715
+ need_version=yes
4716
+ ;;
4717
+
4718
+ sysv4 | sysv4.3*)
4719
+ version_type=linux
4720
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4721
+ soname_spec='${libname}${release}${shared_ext}$major'
4722
+ shlibpath_var=LD_LIBRARY_PATH
4723
+ case $host_vendor in
4724
+ sni)
4725
+ shlibpath_overrides_runpath=no
4726
+ need_lib_prefix=no
4727
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
4728
+ runpath_var=LD_RUN_PATH
4729
+ ;;
4730
+ siemens)
4731
+ need_lib_prefix=no
4732
+ ;;
4733
+ motorola)
4734
+ need_lib_prefix=no
4735
+ need_version=no
4736
+ shlibpath_overrides_runpath=no
4737
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4738
+ ;;
4739
+ esac
4740
+ ;;
4741
+
4742
+ sysv4*MP*)
4743
+ if test -d /usr/nec ;then
4744
+ version_type=linux
4745
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4746
+ soname_spec='$libname${shared_ext}.$major'
4747
+ shlibpath_var=LD_LIBRARY_PATH
4748
+ fi
4749
+ ;;
4750
+
4751
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4752
+ version_type=freebsd-elf
4753
+ need_lib_prefix=no
4754
+ need_version=no
4755
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4756
+ soname_spec='${libname}${release}${shared_ext}$major'
4757
+ shlibpath_var=LD_LIBRARY_PATH
4758
+ hardcode_into_libs=yes
4759
+ if test "$with_gnu_ld" = yes; then
4760
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4761
+ shlibpath_overrides_runpath=no
4762
+ else
4763
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4764
+ shlibpath_overrides_runpath=yes
4765
+ case $host_os in
4766
+ sco3.2v5*)
4767
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4768
+ ;;
4769
+ esac
4770
+ fi
4771
+ sys_lib_dlsearch_path_spec='/usr/lib'
4772
+ ;;
4773
+
4774
+ uts4*)
4775
+ version_type=linux
4776
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4777
+ soname_spec='${libname}${release}${shared_ext}$major'
4778
+ shlibpath_var=LD_LIBRARY_PATH
4779
+ ;;
4780
+
4781
+ *)
4782
+ dynamic_linker=no
4783
+ ;;
4784
+ esac
4785
+ AC_MSG_RESULT([$dynamic_linker])
4786
+ test "$dynamic_linker" = no && can_build_shared=no
4787
+
4788
+ AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
4789
+ [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
4790
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4791
+ AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
4792
+ [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
4793
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4794
+
4795
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4796
+ if test "$GCC" = yes; then
4797
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4798
+ fi
4799
+ ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
4800
+
4801
+
4802
+ # _LT_AC_TAGCONFIG
4803
+ # ----------------
4804
+ AC_DEFUN([_LT_AC_TAGCONFIG],
4805
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
4806
+ AC_ARG_WITH([tags],
4807
+ [ --with-tags[=TAGS] include additional configurations [automatic]
4808
+ ],
4809
+ [tagnames="$withval"])
4810
+
4811
+ if test -f "$ltmain" && test -n "$tagnames"; then
4812
+ if test ! -f "${ofile}"; then
4813
+ AC_MSG_WARN([output file \`$ofile' does not exist])
4814
+ fi
4815
+
4816
+ if test -z "$LTCC"; then
4817
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
4818
+ if test -z "$LTCC"; then
4819
+ AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
4820
+ else
4821
+ AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
4822
+ fi
4823
+ fi
4824
+ if test -z "$LTCFLAGS"; then
4825
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
4826
+ fi
4827
+
4828
+ # Extract list of available tagged configurations in $ofile.
4829
+ # Note that this assumes the entire list is on one line.
4830
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
4831
+
4832
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4833
+ for tagname in $tagnames; do
4834
+ IFS="$lt_save_ifs"
4835
+ # Check whether tagname contains only valid characters
4836
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
4837
+ "") ;;
4838
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
4839
+ ;;
4840
+ esac
4841
+
4842
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
4843
+ then
4844
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
4845
+ fi
4846
+
4847
+ # Update the list of available tags.
4848
+ if test -n "$tagname"; then
4849
+ echo appending configuration tag \"$tagname\" to $ofile
4850
+
4851
+ case $tagname in
4852
+ CXX)
4853
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4854
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4855
+ (test "X$CXX" != "Xg++"))) ; then
4856
+ AC_LIBTOOL_LANG_CXX_CONFIG
4857
+ else
4858
+ tagname=""
4859
+ fi
4860
+ ;;
4861
+
4862
+ *)
4863
+ AC_MSG_ERROR([Unsupported tag name: $tagname])
4864
+ ;;
4865
+ esac
4866
+
4867
+ # Append the new tag name to the list of available tags.
4868
+ if test -n "$tagname" ; then
4869
+ available_tags="$available_tags $tagname"
4870
+ fi
4871
+ fi
4872
+ done
4873
+ IFS="$lt_save_ifs"
4874
+
4875
+ # Now substitute the updated list of available tags.
4876
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
4877
+ mv "${ofile}T" "$ofile"
4878
+ chmod +x "$ofile"
4879
+ else
4880
+ rm -f "${ofile}T"
4881
+ AC_MSG_ERROR([unable to update list of available tagged configurations.])
4882
+ fi
4883
+ fi
4884
+ ])# _LT_AC_TAGCONFIG
4885
+
4886
+
4887
+ # AC_LIBTOOL_DLOPEN
4888
+ # -----------------
4889
+ # enable checks for dlopen support
4890
+ AC_DEFUN([AC_LIBTOOL_DLOPEN],
4891
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
4892
+ ])# AC_LIBTOOL_DLOPEN
4893
+
4894
+
4895
+ # AC_LIBTOOL_WIN32_DLL
4896
+ # --------------------
4897
+ # declare package support for building win32 DLLs
4898
+ AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
4899
+ [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
4900
+ ])# AC_LIBTOOL_WIN32_DLL
4901
+
4902
+
4903
+ # AC_ENABLE_SHARED([DEFAULT])
4904
+ # ---------------------------
4905
+ # implement the --enable-shared flag
4906
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4907
+ AC_DEFUN([AC_ENABLE_SHARED],
4908
+ [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4909
+ AC_ARG_ENABLE([shared],
4910
+ changequote(<<, >>)dnl
4911
+ << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4912
+ changequote([, ])dnl
4913
+ [p=${PACKAGE-default}
4914
+ case $enableval in
4915
+ yes) enable_shared=yes ;;
4916
+ no) enable_shared=no ;;
4917
+ *)
4918
+ enable_shared=no
4919
+ # Look at the argument we got. We use all the common list separators.
4920
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4921
+ for pkg in $enableval; do
4922
+ IFS="$lt_save_ifs"
4923
+ if test "X$pkg" = "X$p"; then
4924
+ enable_shared=yes
4925
+ fi
4926
+ done
4927
+ IFS="$lt_save_ifs"
4928
+ ;;
4929
+ esac],
4930
+ [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
4931
+ ])# AC_ENABLE_SHARED
4932
+
4933
+
4934
+ # AC_DISABLE_SHARED
4935
+ # -----------------
4936
+ # set the default shared flag to --disable-shared
4937
+ AC_DEFUN([AC_DISABLE_SHARED],
4938
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4939
+ AC_ENABLE_SHARED(no)
4940
+ ])# AC_DISABLE_SHARED
4941
+
4942
+
4943
+ # AC_ENABLE_STATIC([DEFAULT])
4944
+ # ---------------------------
4945
+ # implement the --enable-static flag
4946
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4947
+ AC_DEFUN([AC_ENABLE_STATIC],
4948
+ [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4949
+ AC_ARG_ENABLE([static],
4950
+ changequote(<<, >>)dnl
4951
+ << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4952
+ changequote([, ])dnl
4953
+ [p=${PACKAGE-default}
4954
+ case $enableval in
4955
+ yes) enable_static=yes ;;
4956
+ no) enable_static=no ;;
4957
+ *)
4958
+ enable_static=no
4959
+ # Look at the argument we got. We use all the common list separators.
4960
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4961
+ for pkg in $enableval; do
4962
+ IFS="$lt_save_ifs"
4963
+ if test "X$pkg" = "X$p"; then
4964
+ enable_static=yes
4965
+ fi
4966
+ done
4967
+ IFS="$lt_save_ifs"
4968
+ ;;
4969
+ esac],
4970
+ [enable_static=]AC_ENABLE_STATIC_DEFAULT)
4971
+ ])# AC_ENABLE_STATIC
4972
+
4973
+
4974
+ # AC_DISABLE_STATIC
4975
+ # -----------------
4976
+ # set the default static flag to --disable-static
4977
+ AC_DEFUN([AC_DISABLE_STATIC],
4978
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4979
+ AC_ENABLE_STATIC(no)
4980
+ ])# AC_DISABLE_STATIC
4981
+
4982
+
4983
+ # AC_ENABLE_FAST_INSTALL([DEFAULT])
4984
+ # ---------------------------------
4985
+ # implement the --enable-fast-install flag
4986
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4987
+ AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4988
+ [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4989
+ AC_ARG_ENABLE([fast-install],
4990
+ changequote(<<, >>)dnl
4991
+ << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4992
+ changequote([, ])dnl
4993
+ [p=${PACKAGE-default}
4994
+ case $enableval in
4995
+ yes) enable_fast_install=yes ;;
4996
+ no) enable_fast_install=no ;;
4997
+ *)
4998
+ enable_fast_install=no
4999
+ # Look at the argument we got. We use all the common list separators.
5000
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5001
+ for pkg in $enableval; do
5002
+ IFS="$lt_save_ifs"
5003
+ if test "X$pkg" = "X$p"; then
5004
+ enable_fast_install=yes
5005
+ fi
5006
+ done
5007
+ IFS="$lt_save_ifs"
5008
+ ;;
5009
+ esac],
5010
+ [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
5011
+ ])# AC_ENABLE_FAST_INSTALL
5012
+
5013
+
5014
+ # AC_DISABLE_FAST_INSTALL
5015
+ # -----------------------
5016
+ # set the default to --disable-fast-install
5017
+ AC_DEFUN([AC_DISABLE_FAST_INSTALL],
5018
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5019
+ AC_ENABLE_FAST_INSTALL(no)
5020
+ ])# AC_DISABLE_FAST_INSTALL
5021
+
5022
+
5023
+ # AC_LIBTOOL_PICMODE([MODE])
5024
+ # --------------------------
5025
+ # implement the --with-pic flag
5026
+ # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
5027
+ AC_DEFUN([AC_LIBTOOL_PICMODE],
5028
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5029
+ pic_mode=ifelse($#,1,$1,default)
5030
+ ])# AC_LIBTOOL_PICMODE
5031
+
5032
+
5033
+ # AC_PROG_EGREP
5034
+ # -------------
5035
+ ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
5036
+ [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
5037
+ [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5038
+ then ac_cv_prog_egrep='grep -E'
5039
+ else ac_cv_prog_egrep='egrep'
5040
+ fi])
5041
+ EGREP=$ac_cv_prog_egrep
5042
+ AC_SUBST([EGREP])
5043
+ ])])
5044
+
5045
+
5046
+ # AC_PATH_TOOL_PREFIX
5047
+ # -------------------
5048
+ # find a file program which can recognize shared library
5049
+ AC_DEFUN([AC_PATH_TOOL_PREFIX],
5050
+ [AC_REQUIRE([AC_PROG_EGREP])dnl
5051
+ AC_MSG_CHECKING([for $1])
5052
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5053
+ [case $MAGIC_CMD in
5054
+ [[\\/*] | ?:[\\/]*])
5055
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5056
+ ;;
5057
+ *)
5058
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
5059
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5060
+ dnl $ac_dummy forces splitting on constant user-supplied paths.
5061
+ dnl POSIX.2 word splitting is done only on the output of word expansions,
5062
+ dnl not every word. This closes a longstanding sh security hole.
5063
+ ac_dummy="ifelse([$2], , $PATH, [$2])"
5064
+ for ac_dir in $ac_dummy; do
5065
+ IFS="$lt_save_ifs"
5066
+ test -z "$ac_dir" && ac_dir=.
5067
+ if test -f $ac_dir/$1; then
5068
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5069
+ if test -n "$file_magic_test_file"; then
5070
+ case $deplibs_check_method in
5071
+ "file_magic "*)
5072
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5073
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5074
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5075
+ $EGREP "$file_magic_regex" > /dev/null; then
5076
+ :
5077
+ else
5078
+ cat <<EOF 1>&2
5079
+
5080
+ *** Warning: the command libtool uses to detect shared libraries,
5081
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
5082
+ *** The result is that libtool may fail to recognize shared libraries
5083
+ *** as such. This will affect the creation of libtool libraries that
5084
+ *** depend on shared libraries, but programs linked with such libtool
5085
+ *** libraries will work regardless of this problem. Nevertheless, you
5086
+ *** may want to report the problem to your system manager and/or to
5087
+ *** bug-libtool@gnu.org
5088
+
5089
+ EOF
5090
+ fi ;;
5091
+ esac
5092
+ fi
5093
+ break
5094
+ fi
5095
+ done
5096
+ IFS="$lt_save_ifs"
5097
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
5098
+ ;;
5099
+ esac])
5100
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5101
+ if test -n "$MAGIC_CMD"; then
5102
+ AC_MSG_RESULT($MAGIC_CMD)
5103
+ else
5104
+ AC_MSG_RESULT(no)
5105
+ fi
5106
+ ])# AC_PATH_TOOL_PREFIX
5107
+
5108
+
5109
+ # AC_PATH_MAGIC
5110
+ # -------------
5111
+ # find a file program which can recognize a shared library
5112
+ AC_DEFUN([AC_PATH_MAGIC],
5113
+ [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5114
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
5115
+ if test -n "$ac_tool_prefix"; then
5116
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5117
+ else
5118
+ MAGIC_CMD=:
5119
+ fi
5120
+ fi
5121
+ ])# AC_PATH_MAGIC
5122
+
5123
+
5124
+ # AC_PROG_LD
5125
+ # ----------
5126
+ # find the pathname to the GNU or non-GNU linker
5127
+ AC_DEFUN([AC_PROG_LD],
5128
+ [AC_ARG_WITH([gnu-ld],
5129
+ [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5130
+ [test "$withval" = no || with_gnu_ld=yes],
5131
+ [with_gnu_ld=no])
5132
+ AC_REQUIRE([LT_AC_PROG_SED])dnl
5133
+ AC_REQUIRE([AC_PROG_CC])dnl
5134
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
5135
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5136
+ ac_prog=ld
5137
+ if test "$GCC" = yes; then
5138
+ # Check if gcc -print-prog-name=ld gives a path.
5139
+ AC_MSG_CHECKING([for ld used by $CC])
5140
+ case $host in
5141
+ *-*-mingw*)
5142
+ # gcc leaves a trailing carriage return which upsets mingw
5143
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5144
+ *)
5145
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5146
+ esac
5147
+ case $ac_prog in
5148
+ # Accept absolute paths.
5149
+ [[\\/]]* | ?:[[\\/]]*)
5150
+ re_direlt='/[[^/]][[^/]]*/\.\./'
5151
+ # Canonicalize the pathname of ld
5152
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5153
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5154
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5155
+ done
5156
+ test -z "$LD" && LD="$ac_prog"
5157
+ ;;
5158
+ "")
5159
+ # If it fails, then pretend we aren't using GCC.
5160
+ ac_prog=ld
5161
+ ;;
5162
+ *)
5163
+ # If it is relative, then search for the first ld in PATH.
5164
+ with_gnu_ld=unknown
5165
+ ;;
5166
+ esac
5167
+ elif test "$with_gnu_ld" = yes; then
5168
+ AC_MSG_CHECKING([for GNU ld])
5169
+ else
5170
+ AC_MSG_CHECKING([for non-GNU ld])
5171
+ fi
5172
+ AC_CACHE_VAL(lt_cv_path_LD,
5173
+ [if test -z "$LD"; then
5174
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5175
+ for ac_dir in $PATH; do
5176
+ IFS="$lt_save_ifs"
5177
+ test -z "$ac_dir" && ac_dir=.
5178
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5179
+ lt_cv_path_LD="$ac_dir/$ac_prog"
5180
+ # Check to see if the program is GNU ld. I'd rather use --version,
5181
+ # but apparently some variants of GNU ld only accept -v.
5182
+ # Break only if it was the GNU/non-GNU ld that we prefer.
5183
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5184
+ *GNU* | *'with BFD'*)
5185
+ test "$with_gnu_ld" != no && break
5186
+ ;;
5187
+ *)
5188
+ test "$with_gnu_ld" != yes && break
5189
+ ;;
5190
+ esac
5191
+ fi
5192
+ done
5193
+ IFS="$lt_save_ifs"
5194
+ else
5195
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
5196
+ fi])
5197
+ LD="$lt_cv_path_LD"
5198
+ if test -n "$LD"; then
5199
+ AC_MSG_RESULT($LD)
5200
+ else
5201
+ AC_MSG_RESULT(no)
5202
+ fi
5203
+ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5204
+ AC_PROG_LD_GNU
5205
+ ])# AC_PROG_LD
5206
+
5207
+
5208
+ # AC_PROG_LD_GNU
5209
+ # --------------
5210
+ AC_DEFUN([AC_PROG_LD_GNU],
5211
+ [AC_REQUIRE([AC_PROG_EGREP])dnl
5212
+ AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5213
+ [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5214
+ case `$LD -v 2>&1 </dev/null` in
5215
+ *GNU* | *'with BFD'*)
5216
+ lt_cv_prog_gnu_ld=yes
5217
+ ;;
5218
+ *)
5219
+ lt_cv_prog_gnu_ld=no
5220
+ ;;
5221
+ esac])
5222
+ with_gnu_ld=$lt_cv_prog_gnu_ld
5223
+ ])# AC_PROG_LD_GNU
5224
+
5225
+
5226
+ # AC_PROG_LD_RELOAD_FLAG
5227
+ # ----------------------
5228
+ # find reload flag for linker
5229
+ # -- PORTME Some linkers may need a different reload flag.
5230
+ AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
5231
+ [AC_CACHE_CHECK([for $LD option to reload object files],
5232
+ lt_cv_ld_reload_flag,
5233
+ [lt_cv_ld_reload_flag='-r'])
5234
+ reload_flag=$lt_cv_ld_reload_flag
5235
+ case $reload_flag in
5236
+ "" | " "*) ;;
5237
+ *) reload_flag=" $reload_flag" ;;
5238
+ esac
5239
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
5240
+ case $host_os in
5241
+ darwin*)
5242
+ if test "$GCC" = yes; then
5243
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5244
+ else
5245
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
5246
+ fi
5247
+ ;;
5248
+ esac
5249
+ ])# AC_PROG_LD_RELOAD_FLAG
5250
+
5251
+
5252
+ # AC_DEPLIBS_CHECK_METHOD
5253
+ # -----------------------
5254
+ # how to check for library dependencies
5255
+ # -- PORTME fill in with the dynamic library characteristics
5256
+ AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
5257
+ [AC_CACHE_CHECK([how to recognize dependent libraries],
5258
+ lt_cv_deplibs_check_method,
5259
+ [lt_cv_file_magic_cmd='$MAGIC_CMD'
5260
+ lt_cv_file_magic_test_file=
5261
+ lt_cv_deplibs_check_method='unknown'
5262
+ # Need to set the preceding variable on all platforms that support
5263
+ # interlibrary dependencies.
5264
+ # 'none' -- dependencies not supported.
5265
+ # `unknown' -- same as none, but documents that we really don't know.
5266
+ # 'pass_all' -- all dependencies passed with no checks.
5267
+ # 'test_compile' -- check by making test program.
5268
+ # 'file_magic [[regex]]' -- check by looking for files in library path
5269
+ # which responds to the $file_magic_cmd with a given extended regex.
5270
+ # If you have `file' or equivalent on your system and you're not sure
5271
+ # whether `pass_all' will *always* work, you probably want this one.
5272
+
5273
+ case $host_os in
5274
+ aix[[4-9]]*)
5275
+ lt_cv_deplibs_check_method=pass_all
5276
+ ;;
5277
+
5278
+ beos*)
5279
+ lt_cv_deplibs_check_method=pass_all
5280
+ ;;
5281
+
5282
+ bsdi[[45]]*)
5283
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5284
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
5285
+ lt_cv_file_magic_test_file=/shlib/libc.so
5286
+ ;;
5287
+
5288
+ cygwin*)
5289
+ # func_win32_libid is a shell function defined in ltmain.sh
5290
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5291
+ lt_cv_file_magic_cmd='func_win32_libid'
5292
+ ;;
5293
+
5294
+ mingw* | pw32*)
5295
+ # Base MSYS/MinGW do not provide the 'file' command needed by
5296
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
5297
+ # unless we find 'file', for example because we are cross-compiling.
5298
+ if ( file / ) >/dev/null 2>&1; then
5299
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5300
+ lt_cv_file_magic_cmd='func_win32_libid'
5301
+ else
5302
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5303
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
5304
+ fi
5305
+ ;;
5306
+
5307
+ darwin* | rhapsody*)
5308
+ lt_cv_deplibs_check_method=pass_all
5309
+ ;;
5310
+
5311
+ freebsd* | dragonfly*)
5312
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5313
+ case $host_cpu in
5314
+ i*86 )
5315
+ # Not sure whether the presence of OpenBSD here was a mistake.
5316
+ # Let's accept both of them until this is cleared up.
5317
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5318
+ lt_cv_file_magic_cmd=/usr/bin/file
5319
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5320
+ ;;
5321
+ esac
5322
+ else
5323
+ lt_cv_deplibs_check_method=pass_all
5324
+ fi
5325
+ ;;
5326
+
5327
+ gnu*)
5328
+ lt_cv_deplibs_check_method=pass_all
5329
+ ;;
5330
+
5331
+ hpux10.20* | hpux11*)
5332
+ lt_cv_file_magic_cmd=/usr/bin/file
5333
+ case $host_cpu in
5334
+ ia64*)
5335
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5336
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5337
+ ;;
5338
+ hppa*64*)
5339
+ [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]']
5340
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5341
+ ;;
5342
+ *)
5343
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5344
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
5345
+ ;;
5346
+ esac
5347
+ ;;
5348
+
5349
+ interix[[3-9]]*)
5350
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5351
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5352
+ ;;
5353
+
5354
+ irix5* | irix6* | nonstopux*)
5355
+ case $LD in
5356
+ *-32|*"-32 ") libmagic=32-bit;;
5357
+ *-n32|*"-n32 ") libmagic=N32;;
5358
+ *-64|*"-64 ") libmagic=64-bit;;
5359
+ *) libmagic=never-match;;
5360
+ esac
5361
+ lt_cv_deplibs_check_method=pass_all
5362
+ ;;
5363
+
5364
+ # This must be Linux ELF.
5365
+ linux* | k*bsd*-gnu)
5366
+ lt_cv_deplibs_check_method=pass_all
5367
+ ;;
5368
+
5369
+ netbsd*)
5370
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5371
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5372
+ else
5373
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5374
+ fi
5375
+ ;;
5376
+
5377
+ newos6*)
5378
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5379
+ lt_cv_file_magic_cmd=/usr/bin/file
5380
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
5381
+ ;;
5382
+
5383
+ nto-qnx*)
5384
+ lt_cv_deplibs_check_method=unknown
5385
+ ;;
5386
+
5387
+ openbsd*)
5388
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5389
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5390
+ else
5391
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5392
+ fi
5393
+ ;;
5394
+
5395
+ osf3* | osf4* | osf5*)
5396
+ lt_cv_deplibs_check_method=pass_all
5397
+ ;;
5398
+
5399
+ rdos*)
5400
+ lt_cv_deplibs_check_method=pass_all
5401
+ ;;
5402
+
5403
+ solaris*)
5404
+ lt_cv_deplibs_check_method=pass_all
5405
+ ;;
5406
+
5407
+ sysv4 | sysv4.3*)
5408
+ case $host_vendor in
5409
+ motorola)
5410
+ 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]]'
5411
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5412
+ ;;
5413
+ ncr)
5414
+ lt_cv_deplibs_check_method=pass_all
5415
+ ;;
5416
+ sequent)
5417
+ lt_cv_file_magic_cmd='/bin/file'
5418
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5419
+ ;;
5420
+ sni)
5421
+ lt_cv_file_magic_cmd='/bin/file'
5422
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5423
+ lt_cv_file_magic_test_file=/lib/libc.so
5424
+ ;;
5425
+ siemens)
5426
+ lt_cv_deplibs_check_method=pass_all
5427
+ ;;
5428
+ pc)
5429
+ lt_cv_deplibs_check_method=pass_all
5430
+ ;;
5431
+ esac
5432
+ ;;
5433
+
5434
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5435
+ lt_cv_deplibs_check_method=pass_all
5436
+ ;;
5437
+ esac
5438
+ ])
5439
+ file_magic_cmd=$lt_cv_file_magic_cmd
5440
+ deplibs_check_method=$lt_cv_deplibs_check_method
5441
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
5442
+ ])# AC_DEPLIBS_CHECK_METHOD
5443
+
5444
+
5445
+ # AC_PROG_NM
5446
+ # ----------
5447
+ # find the pathname to a BSD-compatible name lister
5448
+ AC_DEFUN([AC_PROG_NM],
5449
+ [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
5450
+ [if test -n "$NM"; then
5451
+ # Let the user override the test.
5452
+ lt_cv_path_NM="$NM"
5453
+ else
5454
+ lt_nm_to_check="${ac_tool_prefix}nm"
5455
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5456
+ lt_nm_to_check="$lt_nm_to_check nm"
5457
+ fi
5458
+ for lt_tmp_nm in $lt_nm_to_check; do
5459
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5460
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5461
+ IFS="$lt_save_ifs"
5462
+ test -z "$ac_dir" && ac_dir=.
5463
+ tmp_nm="$ac_dir/$lt_tmp_nm"
5464
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5465
+ # Check to see if the nm accepts a BSD-compat flag.
5466
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5467
+ # nm: unknown option "B" ignored
5468
+ # Tru64's nm complains that /dev/null is an invalid object file
5469
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5470
+ */dev/null* | *'Invalid file or object type'*)
5471
+ lt_cv_path_NM="$tmp_nm -B"
5472
+ break
5473
+ ;;
5474
+ *)
5475
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5476
+ */dev/null*)
5477
+ lt_cv_path_NM="$tmp_nm -p"
5478
+ break
5479
+ ;;
5480
+ *)
5481
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5482
+ continue # so that we can try to find one that supports BSD flags
5483
+ ;;
5484
+ esac
5485
+ ;;
5486
+ esac
5487
+ fi
5488
+ done
5489
+ IFS="$lt_save_ifs"
5490
+ done
5491
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5492
+ fi])
5493
+ NM="$lt_cv_path_NM"
5494
+ ])# AC_PROG_NM
5495
+
5496
+
5497
+ # AC_CHECK_LIBM
5498
+ # -------------
5499
+ # check for math library
5500
+ AC_DEFUN([AC_CHECK_LIBM],
5501
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5502
+ LIBM=
5503
+ case $host in
5504
+ *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5505
+ # These system don't have libm, or don't need it
5506
+ ;;
5507
+ *-ncr-sysv4.3*)
5508
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5509
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5510
+ ;;
5511
+ *)
5512
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
5513
+ ;;
5514
+ esac
5515
+ ])# AC_CHECK_LIBM
5516
+
5517
+
5518
+ # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
5519
+ # -----------------------------------
5520
+ # sets LIBLTDL to the link flags for the libltdl convenience library and
5521
+ # LTDLINCL to the include flags for the libltdl header and adds
5522
+ # --enable-ltdl-convenience to the configure arguments. Note that
5523
+ # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5524
+ # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
5525
+ # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
5526
+ # (note the single quotes!). If your package is not flat and you're not
5527
+ # using automake, define top_builddir and top_srcdir appropriately in
5528
+ # the Makefiles.
5529
+ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5530
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5531
+ case $enable_ltdl_convenience in
5532
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5533
+ "") enable_ltdl_convenience=yes
5534
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5535
+ esac
5536
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5537
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5538
+ # For backwards non-gettext consistent compatibility...
5539
+ INCLTDL="$LTDLINCL"
5540
+ ])# AC_LIBLTDL_CONVENIENCE
5541
+
5542
+
5543
+ # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
5544
+ # -----------------------------------
5545
+ # sets LIBLTDL to the link flags for the libltdl installable library and
5546
+ # LTDLINCL to the include flags for the libltdl header and adds
5547
+ # --enable-ltdl-install to the configure arguments. Note that
5548
+ # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5549
+ # and an installed libltdl is not found, it is assumed to be `libltdl'.
5550
+ # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
5551
+ # '${top_srcdir}/' (note the single quotes!). If your package is not
5552
+ # flat and you're not using automake, define top_builddir and top_srcdir
5553
+ # appropriately in the Makefiles.
5554
+ # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5555
+ AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5556
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5557
+ AC_CHECK_LIB(ltdl, lt_dlinit,
5558
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5559
+ [if test x"$enable_ltdl_install" = xno; then
5560
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
5561
+ else
5562
+ enable_ltdl_install=yes
5563
+ fi
5564
+ ])
5565
+ if test x"$enable_ltdl_install" = x"yes"; then
5566
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
5567
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5568
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5569
+ else
5570
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5571
+ LIBLTDL="-lltdl"
5572
+ LTDLINCL=
5573
+ fi
5574
+ # For backwards non-gettext consistent compatibility...
5575
+ INCLTDL="$LTDLINCL"
5576
+ ])# AC_LIBLTDL_INSTALLABLE
5577
+
5578
+
5579
+ # AC_LIBTOOL_CXX
5580
+ # --------------
5581
+ # enable support for C++ libraries
5582
+ AC_DEFUN([AC_LIBTOOL_CXX],
5583
+ [AC_REQUIRE([_LT_AC_LANG_CXX])
5584
+ ])# AC_LIBTOOL_CXX
5585
+
5586
+
5587
+ # _LT_AC_LANG_CXX
5588
+ # ---------------
5589
+ AC_DEFUN([_LT_AC_LANG_CXX],
5590
+ [AC_REQUIRE([AC_PROG_CXX])
5591
+ AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5592
+ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
5593
+ ])# _LT_AC_LANG_CXX
5594
+
5595
+ # _LT_AC_PROG_CXXCPP
5596
+ # ------------------
5597
+ AC_DEFUN([_LT_AC_PROG_CXXCPP],
5598
+ [
5599
+ AC_REQUIRE([AC_PROG_CXX])
5600
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5601
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5602
+ (test "X$CXX" != "Xg++"))) ; then
5603
+ AC_PROG_CXXCPP
5604
+ fi
5605
+ ])# _LT_AC_PROG_CXXCPP
5606
+
5607
+ # AC_LIBTOOL_LANG_C_CONFIG
5608
+ # ------------------------
5609
+ # Ensure that the configuration vars for the C compiler are
5610
+ # suitably defined. Those variables are subsequently used by
5611
+ # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5612
+ AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
5613
+ AC_DEFUN([_LT_AC_LANG_C_CONFIG],
5614
+ [lt_save_CC="$CC"
5615
+ AC_LANG_SAVE
5616
+ AC_LANG_C
5617
+
5618
+ # Source file extension for C test sources.
5619
+ ac_ext=c
5620
+
5621
+ # Object file extension for compiled C test sources.
5622
+ objext=o
5623
+ _LT_AC_TAGVAR(objext, $1)=$objext
5624
+
5625
+ # Code to be used in simple compile tests
5626
+ lt_simple_compile_test_code="int some_variable = 0;"
5627
+
5628
+ # Code to be used in simple link tests
5629
+ lt_simple_link_test_code='int main(){return(0);}'
5630
+
5631
+ _LT_AC_SYS_COMPILER
5632
+
5633
+ # save warnings/boilerplate of simple test code
5634
+ _LT_COMPILER_BOILERPLATE
5635
+ _LT_LINKER_BOILERPLATE
5636
+
5637
+ ## CAVEAT EMPTOR:
5638
+ ## There is no encapsulation within the following macros, do not change
5639
+ ## the running order or otherwise move them around unless you know exactly
5640
+ ## what you are doing...
5641
+ AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5642
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
5643
+ AC_LIBTOOL_PROG_CC_C_O($1)
5644
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5645
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
5646
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5647
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5648
+ AC_LIBTOOL_SYS_LIB_STRIP
5649
+ AC_LIBTOOL_DLOPEN_SELF
5650
+
5651
+ # Report which library types will actually be built
5652
+ AC_MSG_CHECKING([if libtool supports shared libraries])
5653
+ AC_MSG_RESULT([$can_build_shared])
5654
+
5655
+ AC_MSG_CHECKING([whether to build shared libraries])
5656
+ test "$can_build_shared" = "no" && enable_shared=no
5657
+
5658
+ # On AIX, shared libraries and static libraries use the same namespace, and
5659
+ # are all built from PIC.
5660
+ case $host_os in
5661
+ aix3*)
5662
+ test "$enable_shared" = yes && enable_static=no
5663
+ if test -n "$RANLIB"; then
5664
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
5665
+ postinstall_cmds='$RANLIB $lib'
5666
+ fi
5667
+ ;;
5668
+
5669
+ aix[[4-9]]*)
5670
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5671
+ test "$enable_shared" = yes && enable_static=no
5672
+ fi
5673
+ ;;
5674
+ esac
5675
+ AC_MSG_RESULT([$enable_shared])
5676
+
5677
+ AC_MSG_CHECKING([whether to build static libraries])
5678
+ # Make sure either enable_shared or enable_static is yes.
5679
+ test "$enable_shared" = yes || enable_static=yes
5680
+ AC_MSG_RESULT([$enable_static])
5681
+
5682
+ AC_LIBTOOL_CONFIG($1)
5683
+
5684
+ AC_LANG_RESTORE
5685
+ CC="$lt_save_CC"
5686
+ ])# AC_LIBTOOL_LANG_C_CONFIG
5687
+
5688
+
5689
+ # AC_LIBTOOL_LANG_CXX_CONFIG
5690
+ # --------------------------
5691
+ # Ensure that the configuration vars for the C compiler are
5692
+ # suitably defined. Those variables are subsequently used by
5693
+ # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5694
+ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
5695
+ AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
5696
+ [AC_LANG_SAVE
5697
+ AC_LANG_CPLUSPLUS
5698
+ AC_REQUIRE([AC_PROG_CXX])
5699
+ AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5700
+
5701
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5702
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5703
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
5704
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5705
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5706
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
5707
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5708
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5709
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5710
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5711
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5712
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5713
+ _LT_AC_TAGVAR(module_cmds, $1)=
5714
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5715
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5716
+ _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5717
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=
5718
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5719
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5720
+
5721
+ # Dependencies to place before and after the object being linked:
5722
+ _LT_AC_TAGVAR(predep_objects, $1)=
5723
+ _LT_AC_TAGVAR(postdep_objects, $1)=
5724
+ _LT_AC_TAGVAR(predeps, $1)=
5725
+ _LT_AC_TAGVAR(postdeps, $1)=
5726
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5727
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
5728
+
5729
+ # Source file extension for C++ test sources.
5730
+ ac_ext=cpp
5731
+
5732
+ # Object file extension for compiled C++ test sources.
5733
+ objext=o
5734
+ _LT_AC_TAGVAR(objext, $1)=$objext
5735
+
5736
+ # Code to be used in simple compile tests
5737
+ lt_simple_compile_test_code="int some_variable = 0;"
5738
+
5739
+ # Code to be used in simple link tests
5740
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5741
+
5742
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5743
+ _LT_AC_SYS_COMPILER
5744
+
5745
+ # save warnings/boilerplate of simple test code
5746
+ _LT_COMPILER_BOILERPLATE
5747
+ _LT_LINKER_BOILERPLATE
5748
+
5749
+ # Allow CC to be a program name with arguments.
5750
+ lt_save_CC=$CC
5751
+ lt_save_LD=$LD
5752
+ lt_save_GCC=$GCC
5753
+ GCC=$GXX
5754
+ lt_save_with_gnu_ld=$with_gnu_ld
5755
+ lt_save_path_LD=$lt_cv_path_LD
5756
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5757
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5758
+ else
5759
+ unset lt_cv_prog_gnu_ld
5760
+ fi
5761
+ if test -n "${lt_cv_path_LDCXX+set}"; then
5762
+ lt_cv_path_LD=$lt_cv_path_LDCXX
5763
+ else
5764
+ unset lt_cv_path_LD
5765
+ fi
5766
+ test -z "${LDCXX+set}" || LD=$LDCXX
5767
+ CC=${CXX-"c++"}
5768
+ compiler=$CC
5769
+ _LT_AC_TAGVAR(compiler, $1)=$CC
5770
+ _LT_CC_BASENAME([$compiler])
5771
+
5772
+ # We don't want -fno-exception wen compiling C++ code, so set the
5773
+ # no_builtin_flag separately
5774
+ if test "$GXX" = yes; then
5775
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5776
+ else
5777
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5778
+ fi
5779
+
5780
+ if test "$GXX" = yes; then
5781
+ # Set up default GNU C++ configuration
5782
+
5783
+ AC_PROG_LD
5784
+
5785
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
5786
+ # archiving commands below assume that GNU ld is being used.
5787
+ if test "$with_gnu_ld" = yes; then
5788
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5789
+ _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'
5790
+
5791
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5792
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5793
+
5794
+ # If archive_cmds runs LD, not CC, wlarc should be empty
5795
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5796
+ # investigate it a little bit more. (MM)
5797
+ wlarc='${wl}'
5798
+
5799
+ # ancient GNU ld didn't support --whole-archive et. al.
5800
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
5801
+ grep 'no-whole-archive' > /dev/null; then
5802
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5803
+ else
5804
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5805
+ fi
5806
+ else
5807
+ with_gnu_ld=no
5808
+ wlarc=
5809
+
5810
+ # A generic and very simple default shared library creation
5811
+ # command for GNU C++ for the case where it uses the native
5812
+ # linker, instead of GNU ld. If possible, this setting should
5813
+ # overridden to take advantage of the native linker features on
5814
+ # the platform it is being used on.
5815
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5816
+ fi
5817
+
5818
+ # Commands to make compiler produce verbose output that lists
5819
+ # what "hidden" libraries, object files and flags are used when
5820
+ # linking a shared library.
5821
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5822
+
5823
+ else
5824
+ GXX=no
5825
+ with_gnu_ld=no
5826
+ wlarc=
5827
+ fi
5828
+
5829
+ # PORTME: fill in a description of your system's C++ link characteristics
5830
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5831
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5832
+ case $host_os in
5833
+ aix3*)
5834
+ # FIXME: insert proper C++ library support
5835
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
5836
+ ;;
5837
+ aix[[4-9]]*)
5838
+ if test "$host_cpu" = ia64; then
5839
+ # On IA64, the linker does run time linking by default, so we don't
5840
+ # have to do anything special.
5841
+ aix_use_runtimelinking=no
5842
+ exp_sym_flag='-Bexport'
5843
+ no_entry_flag=""
5844
+ else
5845
+ aix_use_runtimelinking=no
5846
+
5847
+ # Test if we are trying to use run time linking or normal
5848
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5849
+ # need to do runtime linking.
5850
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5851
+ for ld_flag in $LDFLAGS; do
5852
+ case $ld_flag in
5853
+ *-brtl*)
5854
+ aix_use_runtimelinking=yes
5855
+ break
5856
+ ;;
5857
+ esac
5858
+ done
5859
+ ;;
5860
+ esac
5861
+
5862
+ exp_sym_flag='-bexport'
5863
+ no_entry_flag='-bnoentry'
5864
+ fi
5865
+
5866
+ # When large executables or shared objects are built, AIX ld can
5867
+ # have problems creating the table of contents. If linking a library
5868
+ # or program results in "error TOC overflow" add -mminimal-toc to
5869
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5870
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5871
+
5872
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
5873
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5874
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5875
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5876
+
5877
+ if test "$GXX" = yes; then
5878
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
5879
+ # We only want to do this on AIX 4.2 and lower, the check
5880
+ # below for broken collect2 doesn't work under 4.3+
5881
+ collect2name=`${CC} -print-prog-name=collect2`
5882
+ if test -f "$collect2name" && \
5883
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
5884
+ then
5885
+ # We have reworked collect2
5886
+ :
5887
+ else
5888
+ # We have old collect2
5889
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5890
+ # It fails to find uninstalled libraries when the uninstalled
5891
+ # path is not listed in the libpath. Setting hardcode_minus_L
5892
+ # to unsupported forces relinking
5893
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5894
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5895
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5896
+ fi
5897
+ ;;
5898
+ esac
5899
+ shared_flag='-shared'
5900
+ if test "$aix_use_runtimelinking" = yes; then
5901
+ shared_flag="$shared_flag "'${wl}-G'
5902
+ fi
5903
+ else
5904
+ # not using gcc
5905
+ if test "$host_cpu" = ia64; then
5906
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5907
+ # chokes on -Wl,-G. The following line is correct:
5908
+ shared_flag='-G'
5909
+ else
5910
+ if test "$aix_use_runtimelinking" = yes; then
5911
+ shared_flag='${wl}-G'
5912
+ else
5913
+ shared_flag='${wl}-bM:SRE'
5914
+ fi
5915
+ fi
5916
+ fi
5917
+
5918
+ # It seems that -bexpall does not export symbols beginning with
5919
+ # underscore (_), so it is better to generate a list of symbols to export.
5920
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5921
+ if test "$aix_use_runtimelinking" = yes; then
5922
+ # Warning - without using the other runtime loading flags (-brtl),
5923
+ # -berok will link without error, but may produce a broken library.
5924
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5925
+ # Determine the default libpath from the value encoded in an empty executable.
5926
+ _LT_AC_SYS_LIBPATH_AIX
5927
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5928
+
5929
+ _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"
5930
+ else
5931
+ if test "$host_cpu" = ia64; then
5932
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5933
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5934
+ _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"
5935
+ else
5936
+ # Determine the default libpath from the value encoded in an empty executable.
5937
+ _LT_AC_SYS_LIBPATH_AIX
5938
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5939
+ # Warning - without using the other run time loading flags,
5940
+ # -berok will link without error, but may produce a broken library.
5941
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5942
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5943
+ # Exported symbols can be pulled into shared objects from archives
5944
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5945
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5946
+ # This is similar to how AIX traditionally builds its shared libraries.
5947
+ _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'
5948
+ fi
5949
+ fi
5950
+ ;;
5951
+
5952
+ beos*)
5953
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5954
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5955
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5956
+ # support --undefined. This deserves some investigation. FIXME
5957
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5958
+ else
5959
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
5960
+ fi
5961
+ ;;
5962
+
5963
+ chorus*)
5964
+ case $cc_basename in
5965
+ *)
5966
+ # FIXME: insert proper C++ library support
5967
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
5968
+ ;;
5969
+ esac
5970
+ ;;
5971
+
5972
+ cygwin* | mingw* | pw32*)
5973
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5974
+ # as there is no search path for DLLs.
5975
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5976
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5977
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
5978
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5979
+
5980
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5981
+ _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'
5982
+ # If the export-symbols file already is a .def file (1st line
5983
+ # is EXPORTS), use it as is; otherwise, prepend...
5984
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5985
+ cp $export_symbols $output_objdir/$soname.def;
5986
+ else
5987
+ echo EXPORTS > $output_objdir/$soname.def;
5988
+ cat $export_symbols >> $output_objdir/$soname.def;
5989
+ fi~
5990
+ $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'
5991
+ else
5992
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
5993
+ fi
5994
+ ;;
5995
+ darwin* | rhapsody*)
5996
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5997
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
5998
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5999
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6000
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6001
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6002
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
6003
+ if test "$GXX" = yes ; then
6004
+ output_verbose_link_cmd='echo'
6005
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6006
+ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6007
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6008
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6009
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
6010
+ _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${_lt_dsymutil}"
6011
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
6012
+ fi
6013
+ else
6014
+ case $cc_basename in
6015
+ xlc*)
6016
+ output_verbose_link_cmd='echo'
6017
+ _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` $xlcverstring'
6018
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6019
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6020
+ _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6021
+ _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}'
6022
+ ;;
6023
+ *)
6024
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6025
+ ;;
6026
+ esac
6027
+ fi
6028
+ ;;
6029
+
6030
+ dgux*)
6031
+ case $cc_basename in
6032
+ ec++*)
6033
+ # FIXME: insert proper C++ library support
6034
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6035
+ ;;
6036
+ ghcx*)
6037
+ # Green Hills C++ Compiler
6038
+ # FIXME: insert proper C++ library support
6039
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6040
+ ;;
6041
+ *)
6042
+ # FIXME: insert proper C++ library support
6043
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6044
+ ;;
6045
+ esac
6046
+ ;;
6047
+ freebsd[[12]]*)
6048
+ # C++ shared libraries reported to be fairly broken before switch to ELF
6049
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6050
+ ;;
6051
+ freebsd-elf*)
6052
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6053
+ ;;
6054
+ freebsd* | dragonfly*)
6055
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6056
+ # conventions
6057
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6058
+ ;;
6059
+ gnu*)
6060
+ ;;
6061
+ hpux9*)
6062
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6063
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6064
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6065
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6066
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6067
+ # but as the default
6068
+ # location of the library.
6069
+
6070
+ case $cc_basename in
6071
+ CC*)
6072
+ # FIXME: insert proper C++ library support
6073
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6074
+ ;;
6075
+ aCC*)
6076
+ _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'
6077
+ # Commands to make compiler produce verbose output that lists
6078
+ # what "hidden" libraries, object files and flags are used when
6079
+ # linking a shared library.
6080
+ #
6081
+ # There doesn't appear to be a way to prevent this compiler from
6082
+ # explicitly linking system object files so we need to strip them
6083
+ # from the output so that they don't get included in the library
6084
+ # dependencies.
6085
+ 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'
6086
+ ;;
6087
+ *)
6088
+ if test "$GXX" = yes; then
6089
+ _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'
6090
+ else
6091
+ # FIXME: insert proper C++ library support
6092
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6093
+ fi
6094
+ ;;
6095
+ esac
6096
+ ;;
6097
+ hpux10*|hpux11*)
6098
+ if test $with_gnu_ld = no; then
6099
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6100
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6101
+
6102
+ case $host_cpu in
6103
+ hppa*64*|ia64*) ;;
6104
+ *)
6105
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6106
+ ;;
6107
+ esac
6108
+ fi
6109
+ case $host_cpu in
6110
+ hppa*64*|ia64*)
6111
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
6112
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6113
+ ;;
6114
+ *)
6115
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6116
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6117
+ # but as the default
6118
+ # location of the library.
6119
+ ;;
6120
+ esac
6121
+
6122
+ case $cc_basename in
6123
+ CC*)
6124
+ # FIXME: insert proper C++ library support
6125
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6126
+ ;;
6127
+ aCC*)
6128
+ case $host_cpu in
6129
+ hppa*64*)
6130
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6131
+ ;;
6132
+ ia64*)
6133
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6134
+ ;;
6135
+ *)
6136
+ _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'
6137
+ ;;
6138
+ esac
6139
+ # Commands to make compiler produce verbose output that lists
6140
+ # what "hidden" libraries, object files and flags are used when
6141
+ # linking a shared library.
6142
+ #
6143
+ # There doesn't appear to be a way to prevent this compiler from
6144
+ # explicitly linking system object files so we need to strip them
6145
+ # from the output so that they don't get included in the library
6146
+ # dependencies.
6147
+ 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'
6148
+ ;;
6149
+ *)
6150
+ if test "$GXX" = yes; then
6151
+ if test $with_gnu_ld = no; then
6152
+ case $host_cpu in
6153
+ hppa*64*)
6154
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6155
+ ;;
6156
+ ia64*)
6157
+ _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'
6158
+ ;;
6159
+ *)
6160
+ _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'
6161
+ ;;
6162
+ esac
6163
+ fi
6164
+ else
6165
+ # FIXME: insert proper C++ library support
6166
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6167
+ fi
6168
+ ;;
6169
+ esac
6170
+ ;;
6171
+ interix[[3-9]]*)
6172
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
6173
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6174
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6175
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6176
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6177
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
6178
+ # default) and relocated if they conflict, which is a slow very memory
6179
+ # consuming and fragmenting process. To avoid this, we pick a random,
6180
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6181
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6182
+ _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'
6183
+ _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'
6184
+ ;;
6185
+ irix5* | irix6*)
6186
+ case $cc_basename in
6187
+ CC*)
6188
+ # SGI C++
6189
+ _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'
6190
+
6191
+ # Archives containing C++ object files must be created using
6192
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6193
+ # necessary to make sure instantiated templates are included
6194
+ # in the archive.
6195
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6196
+ ;;
6197
+ *)
6198
+ if test "$GXX" = yes; then
6199
+ if test "$with_gnu_ld" = no; then
6200
+ _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'
6201
+ else
6202
+ _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'
6203
+ fi
6204
+ fi
6205
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6206
+ ;;
6207
+ esac
6208
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6209
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6210
+ ;;
6211
+ linux* | k*bsd*-gnu)
6212
+ case $cc_basename in
6213
+ KCC*)
6214
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
6215
+
6216
+ # KCC will only create a shared library if the output file
6217
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
6218
+ # to its proper name (with version) after linking.
6219
+ _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'
6220
+ _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'
6221
+ # Commands to make compiler produce verbose output that lists
6222
+ # what "hidden" libraries, object files and flags are used when
6223
+ # linking a shared library.
6224
+ #
6225
+ # There doesn't appear to be a way to prevent this compiler from
6226
+ # explicitly linking system object files so we need to strip them
6227
+ # from the output so that they don't get included in the library
6228
+ # dependencies.
6229
+ 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'
6230
+
6231
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
6232
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6233
+
6234
+ # Archives containing C++ object files must be created using
6235
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6236
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6237
+ ;;
6238
+ icpc*)
6239
+ # Intel C++
6240
+ with_gnu_ld=yes
6241
+ # version 8.0 and above of icpc choke on multiply defined symbols
6242
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
6243
+ # earlier do not add the objects themselves.
6244
+ case `$CC -V 2>&1` in
6245
+ *"Version 7."*)
6246
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6247
+ _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'
6248
+ ;;
6249
+ *) # Version 8.0 or newer
6250
+ tmp_idyn=
6251
+ case $host_cpu in
6252
+ ia64*) tmp_idyn=' -i_dynamic';;
6253
+ esac
6254
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6255
+ _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'
6256
+ ;;
6257
+ esac
6258
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6259
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6260
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6261
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6262
+ ;;
6263
+ pgCC* | pgcpp*)
6264
+ # Portland Group C++ compiler
6265
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6266
+ _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'
6267
+
6268
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6269
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6270
+ _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'
6271
+ ;;
6272
+ cxx*)
6273
+ # Compaq C++
6274
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6275
+ _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'
6276
+
6277
+ runpath_var=LD_RUN_PATH
6278
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6279
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6280
+
6281
+ # Commands to make compiler produce verbose output that lists
6282
+ # what "hidden" libraries, object files and flags are used when
6283
+ # linking a shared library.
6284
+ #
6285
+ # There doesn't appear to be a way to prevent this compiler from
6286
+ # explicitly linking system object files so we need to strip them
6287
+ # from the output so that they don't get included in the library
6288
+ # dependencies.
6289
+ 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'
6290
+ ;;
6291
+ *)
6292
+ case `$CC -V 2>&1 | sed 5q` in
6293
+ *Sun\ C*)
6294
+ # Sun C++ 5.9
6295
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6296
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6297
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6298
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6299
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6300
+
6301
+ # Not sure whether something based on
6302
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6303
+ # would be better.
6304
+ output_verbose_link_cmd='echo'
6305
+
6306
+ # Archives containing C++ object files must be created using
6307
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
6308
+ # necessary to make sure instantiated templates are included
6309
+ # in the archive.
6310
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6311
+ ;;
6312
+ esac
6313
+ ;;
6314
+ esac
6315
+ ;;
6316
+ lynxos*)
6317
+ # FIXME: insert proper C++ library support
6318
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6319
+ ;;
6320
+ m88k*)
6321
+ # FIXME: insert proper C++ library support
6322
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6323
+ ;;
6324
+ mvs*)
6325
+ case $cc_basename in
6326
+ cxx*)
6327
+ # FIXME: insert proper C++ library support
6328
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6329
+ ;;
6330
+ *)
6331
+ # FIXME: insert proper C++ library support
6332
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6333
+ ;;
6334
+ esac
6335
+ ;;
6336
+ netbsd*)
6337
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6338
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6339
+ wlarc=
6340
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6341
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6342
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6343
+ fi
6344
+ # Workaround some broken pre-1.5 toolchains
6345
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6346
+ ;;
6347
+ openbsd2*)
6348
+ # C++ shared libraries are fairly broken
6349
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6350
+ ;;
6351
+ openbsd*)
6352
+ if test -f /usr/libexec/ld.so; then
6353
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6354
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6355
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6356
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6357
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6358
+ _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'
6359
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6360
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6361
+ fi
6362
+ output_verbose_link_cmd='echo'
6363
+ else
6364
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6365
+ fi
6366
+ ;;
6367
+ osf3*)
6368
+ case $cc_basename in
6369
+ KCC*)
6370
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
6371
+
6372
+ # KCC will only create a shared library if the output file
6373
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
6374
+ # to its proper name (with version) after linking.
6375
+ _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'
6376
+
6377
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6378
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6379
+
6380
+ # Archives containing C++ object files must be created using
6381
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6382
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6383
+
6384
+ ;;
6385
+ RCC*)
6386
+ # Rational C++ 2.4.1
6387
+ # FIXME: insert proper C++ library support
6388
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6389
+ ;;
6390
+ cxx*)
6391
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6392
+ _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'
6393
+
6394
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6395
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6396
+
6397
+ # Commands to make compiler produce verbose output that lists
6398
+ # what "hidden" libraries, object files and flags are used when
6399
+ # linking a shared library.
6400
+ #
6401
+ # There doesn't appear to be a way to prevent this compiler from
6402
+ # explicitly linking system object files so we need to strip them
6403
+ # from the output so that they don't get included in the library
6404
+ # dependencies.
6405
+ 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'
6406
+ ;;
6407
+ *)
6408
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6409
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6410
+ _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'
6411
+
6412
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6413
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6414
+
6415
+ # Commands to make compiler produce verbose output that lists
6416
+ # what "hidden" libraries, object files and flags are used when
6417
+ # linking a shared library.
6418
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6419
+
6420
+ else
6421
+ # FIXME: insert proper C++ library support
6422
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6423
+ fi
6424
+ ;;
6425
+ esac
6426
+ ;;
6427
+ osf4* | osf5*)
6428
+ case $cc_basename in
6429
+ KCC*)
6430
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
6431
+
6432
+ # KCC will only create a shared library if the output file
6433
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
6434
+ # to its proper name (with version) after linking.
6435
+ _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'
6436
+
6437
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6438
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6439
+
6440
+ # Archives containing C++ object files must be created using
6441
+ # the KAI C++ compiler.
6442
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
6443
+ ;;
6444
+ RCC*)
6445
+ # Rational C++ 2.4.1
6446
+ # FIXME: insert proper C++ library support
6447
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6448
+ ;;
6449
+ cxx*)
6450
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6451
+ _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'
6452
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6453
+ echo "-hidden">> $lib.exp~
6454
+ $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~
6455
+ $rm $lib.exp'
6456
+
6457
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6458
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6459
+
6460
+ # Commands to make compiler produce verbose output that lists
6461
+ # what "hidden" libraries, object files and flags are used when
6462
+ # linking a shared library.
6463
+ #
6464
+ # There doesn't appear to be a way to prevent this compiler from
6465
+ # explicitly linking system object files so we need to strip them
6466
+ # from the output so that they don't get included in the library
6467
+ # dependencies.
6468
+ 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'
6469
+ ;;
6470
+ *)
6471
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6472
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6473
+ _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'
6474
+
6475
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6476
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6477
+
6478
+ # Commands to make compiler produce verbose output that lists
6479
+ # what "hidden" libraries, object files and flags are used when
6480
+ # linking a shared library.
6481
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6482
+
6483
+ else
6484
+ # FIXME: insert proper C++ library support
6485
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6486
+ fi
6487
+ ;;
6488
+ esac
6489
+ ;;
6490
+ psos*)
6491
+ # FIXME: insert proper C++ library support
6492
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6493
+ ;;
6494
+ sunos4*)
6495
+ case $cc_basename in
6496
+ CC*)
6497
+ # Sun C++ 4.x
6498
+ # FIXME: insert proper C++ library support
6499
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6500
+ ;;
6501
+ lcc*)
6502
+ # Lucid
6503
+ # FIXME: insert proper C++ library support
6504
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6505
+ ;;
6506
+ *)
6507
+ # FIXME: insert proper C++ library support
6508
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6509
+ ;;
6510
+ esac
6511
+ ;;
6512
+ solaris*)
6513
+ case $cc_basename in
6514
+ CC*)
6515
+ # Sun C++ 4.2, 5.x and Centerline C++
6516
+ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
6517
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6518
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6519
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6520
+ $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'
6521
+
6522
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6523
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6524
+ case $host_os in
6525
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6526
+ *)
6527
+ # The compiler driver will combine and reorder linker options,
6528
+ # but understands `-z linker_flag'.
6529
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
6530
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6531
+ ;;
6532
+ esac
6533
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6534
+
6535
+ output_verbose_link_cmd='echo'
6536
+
6537
+ # Archives containing C++ object files must be created using
6538
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
6539
+ # necessary to make sure instantiated templates are included
6540
+ # in the archive.
6541
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6542
+ ;;
6543
+ gcx*)
6544
+ # Green Hills C++ Compiler
6545
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6546
+
6547
+ # The C++ compiler must be used to create the archive.
6548
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6549
+ ;;
6550
+ *)
6551
+ # GNU C++ compiler with Solaris linker
6552
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6553
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6554
+ if $CC --version | grep -v '^2\.7' > /dev/null; then
6555
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6556
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6557
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6558
+
6559
+ # Commands to make compiler produce verbose output that lists
6560
+ # what "hidden" libraries, object files and flags are used when
6561
+ # linking a shared library.
6562
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6563
+ else
6564
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
6565
+ # platform.
6566
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6567
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6568
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6569
+
6570
+ # Commands to make compiler produce verbose output that lists
6571
+ # what "hidden" libraries, object files and flags are used when
6572
+ # linking a shared library.
6573
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6574
+ fi
6575
+
6576
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6577
+ case $host_os in
6578
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6579
+ *)
6580
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6581
+ ;;
6582
+ esac
6583
+ fi
6584
+ ;;
6585
+ esac
6586
+ ;;
6587
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6588
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6589
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6590
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6591
+ runpath_var='LD_RUN_PATH'
6592
+
6593
+ case $cc_basename in
6594
+ CC*)
6595
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6596
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6597
+ ;;
6598
+ *)
6599
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6600
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6601
+ ;;
6602
+ esac
6603
+ ;;
6604
+ sysv5* | sco3.2v5* | sco5v6*)
6605
+ # Note: We can NOT use -z defs as we might desire, because we do not
6606
+ # link with -lc, and that would cause any symbols used from libc to
6607
+ # always be unresolved, which means just about no library would
6608
+ # ever link correctly. If we're not using GNU ld we use -z text
6609
+ # though, which does catch some bad symbols but isn't as heavy-handed
6610
+ # as -z defs.
6611
+ # For security reasons, it is highly recommended that you always
6612
+ # use absolute paths for naming shared libraries, and exclude the
6613
+ # DT_RUNPATH tag from executables and libraries. But doing so
6614
+ # requires that you compile everything twice, which is a pain.
6615
+ # So that behaviour is only enabled if SCOABSPATH is set to a
6616
+ # non-empty value in the environment. Most likely only useful for
6617
+ # creating official distributions of packages.
6618
+ # This is a hack until libtool officially supports absolute path
6619
+ # names for shared libraries.
6620
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6621
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6622
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6623
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6624
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6625
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6626
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6627
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6628
+ runpath_var='LD_RUN_PATH'
6629
+
6630
+ case $cc_basename in
6631
+ CC*)
6632
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6633
+ _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'
6634
+ ;;
6635
+ *)
6636
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6637
+ _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'
6638
+ ;;
6639
+ esac
6640
+ ;;
6641
+ tandem*)
6642
+ case $cc_basename in
6643
+ NCC*)
6644
+ # NonStop-UX NCC 3.20
6645
+ # FIXME: insert proper C++ library support
6646
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6647
+ ;;
6648
+ *)
6649
+ # FIXME: insert proper C++ library support
6650
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6651
+ ;;
6652
+ esac
6653
+ ;;
6654
+ vxworks*)
6655
+ # FIXME: insert proper C++ library support
6656
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6657
+ ;;
6658
+ *)
6659
+ # FIXME: insert proper C++ library support
6660
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
6661
+ ;;
6662
+ esac
6663
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6664
+ test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6665
+
6666
+ _LT_AC_TAGVAR(GCC, $1)="$GXX"
6667
+ _LT_AC_TAGVAR(LD, $1)="$LD"
6668
+
6669
+ ## CAVEAT EMPTOR:
6670
+ ## There is no encapsulation within the following macros, do not change
6671
+ ## the running order or otherwise move them around unless you know exactly
6672
+ ## what you are doing...
6673
+ AC_LIBTOOL_POSTDEP_PREDEP($1)
6674
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
6675
+ AC_LIBTOOL_PROG_CC_C_O($1)
6676
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6677
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
6678
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6679
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6680
+
6681
+ AC_LIBTOOL_CONFIG($1)
6682
+
6683
+ AC_LANG_RESTORE
6684
+ CC=$lt_save_CC
6685
+ LDCXX=$LD
6686
+ LD=$lt_save_LD
6687
+ GCC=$lt_save_GCC
6688
+ with_gnu_ldcxx=$with_gnu_ld
6689
+ with_gnu_ld=$lt_save_with_gnu_ld
6690
+ lt_cv_path_LDCXX=$lt_cv_path_LD
6691
+ lt_cv_path_LD=$lt_save_path_LD
6692
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6693
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6694
+ ])# AC_LIBTOOL_LANG_CXX_CONFIG
6695
+
6696
+ # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6697
+ # ------------------------------------
6698
+ # Figure out "hidden" library dependencies from verbose
6699
+ # compiler output when linking a shared library.
6700
+ # Parse the compiler output and extract the necessary
6701
+ # objects, libraries and library flags.
6702
+ AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
6703
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
6704
+ dnl we can't use the lt_simple_compile_test_code here,
6705
+ dnl because it contains code intended for an executable,
6706
+ dnl not a library. It's possible we should let each
6707
+ dnl tag define a new lt_????_link_test_code variable,
6708
+ dnl but it's only used here...
6709
+ ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6710
+ int a;
6711
+ void foo (void) { a = 0; }
6712
+ EOF
6713
+ ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6714
+ class Foo
6715
+ {
6716
+ public:
6717
+ Foo (void) { a = 0; }
6718
+ private:
6719
+ int a;
6720
+ };
6721
+ EOF
6722
+ ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6723
+ subroutine foo
6724
+ implicit none
6725
+ integer*4 a
6726
+ a=0
6727
+ return
6728
+ end
6729
+ EOF
6730
+ ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6731
+ public class foo {
6732
+ private int a;
6733
+ public void bar (void) {
6734
+ a = 0;
6735
+ }
6736
+ };
6737
+ EOF
6738
+ ])
6739
+ dnl Parse the compiler output and extract the necessary
6740
+ dnl objects, libraries and library flags.
6741
+ if AC_TRY_EVAL(ac_compile); then
6742
+ # Parse the compiler output and extract the necessary
6743
+ # objects, libraries and library flags.
6744
+
6745
+ # Sentinel used to keep track of whether or not we are before
6746
+ # the conftest object file.
6747
+ pre_test_object_deps_done=no
6748
+
6749
+ # The `*' in the case matches for architectures that use `case' in
6750
+ # $output_verbose_cmd can trigger glob expansion during the loop
6751
+ # eval without this substitution.
6752
+ output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6753
+
6754
+ for p in `eval $output_verbose_link_cmd`; do
6755
+ case $p in
6756
+
6757
+ -L* | -R* | -l*)
6758
+ # Some compilers place space between "-{L,R}" and the path.
6759
+ # Remove the space.
6760
+ if test $p = "-L" \
6761
+ || test $p = "-R"; then
6762
+ prev=$p
6763
+ continue
6764
+ else
6765
+ prev=
6766
+ fi
6767
+
6768
+ if test "$pre_test_object_deps_done" = no; then
6769
+ case $p in
6770
+ -L* | -R*)
6771
+ # Internal compiler library paths should come after those
6772
+ # provided the user. The postdeps already come after the
6773
+ # user supplied libs so there is no need to process them.
6774
+ if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6775
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6776
+ else
6777
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6778
+ fi
6779
+ ;;
6780
+ # The "-l" case would never come before the object being
6781
+ # linked, so don't bother handling this case.
6782
+ esac
6783
+ else
6784
+ if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6785
+ _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6786
+ else
6787
+ _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6788
+ fi
6789
+ fi
6790
+ ;;
6791
+
6792
+ *.$objext)
6793
+ # This assumes that the test object file only shows up
6794
+ # once in the compiler output.
6795
+ if test "$p" = "conftest.$objext"; then
6796
+ pre_test_object_deps_done=yes
6797
+ continue
6798
+ fi
6799
+
6800
+ if test "$pre_test_object_deps_done" = no; then
6801
+ if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6802
+ _LT_AC_TAGVAR(predep_objects, $1)="$p"
6803
+ else
6804
+ _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6805
+ fi
6806
+ else
6807
+ if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6808
+ _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6809
+ else
6810
+ _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6811
+ fi
6812
+ fi
6813
+ ;;
6814
+
6815
+ *) ;; # Ignore the rest.
6816
+
6817
+ esac
6818
+ done
6819
+
6820
+ # Clean up.
6821
+ rm -f a.out a.exe
6822
+ else
6823
+ echo "libtool.m4: error: problem compiling $1 test program"
6824
+ fi
6825
+
6826
+ $rm -f confest.$objext
6827
+
6828
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
6829
+ if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6830
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6831
+ fi
6832
+
6833
+ # PORTME: override above test on systems where it is broken
6834
+ ifelse([$1],[CXX],
6835
+ [case $host_os in
6836
+ interix[[3-9]]*)
6837
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
6838
+ # hack all around it, let's just trust "g++" to DTRT.
6839
+ _LT_AC_TAGVAR(predep_objects,$1)=
6840
+ _LT_AC_TAGVAR(postdep_objects,$1)=
6841
+ _LT_AC_TAGVAR(postdeps,$1)=
6842
+ ;;
6843
+
6844
+ linux*)
6845
+ case `$CC -V 2>&1 | sed 5q` in
6846
+ *Sun\ C*)
6847
+ # Sun C++ 5.9
6848
+ #
6849
+ # The more standards-conforming stlport4 library is
6850
+ # incompatible with the Cstd library. Avoid specifying
6851
+ # it if it's in CXXFLAGS. Ignore libCrun as
6852
+ # -library=stlport4 depends on it.
6853
+ case " $CXX $CXXFLAGS " in
6854
+ *" -library=stlport4 "*)
6855
+ solaris_use_stlport4=yes
6856
+ ;;
6857
+ esac
6858
+ if test "$solaris_use_stlport4" != yes; then
6859
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6860
+ fi
6861
+ ;;
6862
+ esac
6863
+ ;;
6864
+
6865
+ solaris*)
6866
+ case $cc_basename in
6867
+ CC*)
6868
+ # The more standards-conforming stlport4 library is
6869
+ # incompatible with the Cstd library. Avoid specifying
6870
+ # it if it's in CXXFLAGS. Ignore libCrun as
6871
+ # -library=stlport4 depends on it.
6872
+ case " $CXX $CXXFLAGS " in
6873
+ *" -library=stlport4 "*)
6874
+ solaris_use_stlport4=yes
6875
+ ;;
6876
+ esac
6877
+
6878
+ # Adding this requires a known-good setup of shared libraries for
6879
+ # Sun compiler versions before 5.6, else PIC objects from an old
6880
+ # archive will be linked into the output, leading to subtle bugs.
6881
+ if test "$solaris_use_stlport4" != yes; then
6882
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6883
+ fi
6884
+ ;;
6885
+ esac
6886
+ ;;
6887
+ esac
6888
+ ])
6889
+ case " $_LT_AC_TAGVAR(postdeps, $1) " in
6890
+ *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6891
+ esac
6892
+ ])# AC_LIBTOOL_POSTDEP_PREDEP
6893
+
6894
+ # AC_LIBTOOL_CONFIG([TAGNAME])
6895
+ # ----------------------------
6896
+ # If TAGNAME is not passed, then create an initial libtool script
6897
+ # with a default configuration from the untagged config vars. Otherwise
6898
+ # add code to config.status for appending the configuration named by
6899
+ # TAGNAME from the matching tagged config vars.
6900
+ AC_DEFUN([AC_LIBTOOL_CONFIG],
6901
+ [# The else clause should only fire when bootstrapping the
6902
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
6903
+ # with your package, and you will get complaints that there are
6904
+ # no rules to generate ltmain.sh.
6905
+ if test -f "$ltmain"; then
6906
+ # See if we are running on zsh, and set the options which allow our commands through
6907
+ # without removal of \ escapes.
6908
+ if test -n "${ZSH_VERSION+set}" ; then
6909
+ setopt NO_GLOB_SUBST
6910
+ fi
6911
+ # Now quote all the things that may contain metacharacters while being
6912
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
6913
+ # variables and quote the copies for generation of the libtool script.
6914
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
6915
+ SED SHELL STRIP \
6916
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
6917
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
6918
+ deplibs_check_method reload_flag reload_cmds need_locks \
6919
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
6920
+ lt_cv_sys_global_symbol_to_c_name_address \
6921
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6922
+ old_postinstall_cmds old_postuninstall_cmds \
6923
+ _LT_AC_TAGVAR(compiler, $1) \
6924
+ _LT_AC_TAGVAR(CC, $1) \
6925
+ _LT_AC_TAGVAR(LD, $1) \
6926
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
6927
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
6928
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
6929
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
6930
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
6931
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
6932
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
6933
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
6934
+ _LT_AC_TAGVAR(old_archive_cmds, $1) \
6935
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
6936
+ _LT_AC_TAGVAR(predep_objects, $1) \
6937
+ _LT_AC_TAGVAR(postdep_objects, $1) \
6938
+ _LT_AC_TAGVAR(predeps, $1) \
6939
+ _LT_AC_TAGVAR(postdeps, $1) \
6940
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
6941
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
6942
+ _LT_AC_TAGVAR(archive_cmds, $1) \
6943
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
6944
+ _LT_AC_TAGVAR(postinstall_cmds, $1) \
6945
+ _LT_AC_TAGVAR(postuninstall_cmds, $1) \
6946
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
6947
+ _LT_AC_TAGVAR(allow_undefined_flag, $1) \
6948
+ _LT_AC_TAGVAR(no_undefined_flag, $1) \
6949
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) \
6950
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
6951
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
6952
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
6953
+ _LT_AC_TAGVAR(hardcode_automatic, $1) \
6954
+ _LT_AC_TAGVAR(module_cmds, $1) \
6955
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) \
6956
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
6957
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
6958
+ _LT_AC_TAGVAR(exclude_expsyms, $1) \
6959
+ _LT_AC_TAGVAR(include_expsyms, $1); do
6960
+
6961
+ case $var in
6962
+ _LT_AC_TAGVAR(old_archive_cmds, $1) | \
6963
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
6964
+ _LT_AC_TAGVAR(archive_cmds, $1) | \
6965
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
6966
+ _LT_AC_TAGVAR(module_cmds, $1) | \
6967
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
6968
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
6969
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
6970
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
6971
+ postinstall_cmds | postuninstall_cmds | \
6972
+ old_postinstall_cmds | old_postuninstall_cmds | \
6973
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6974
+ # Double-quote double-evaled strings.
6975
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6976
+ ;;
6977
+ *)
6978
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6979
+ ;;
6980
+ esac
6981
+ done
6982
+
6983
+ case $lt_echo in
6984
+ *'\[$]0 --fallback-echo"')
6985
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
6986
+ ;;
6987
+ esac
6988
+
6989
+ ifelse([$1], [],
6990
+ [cfgfile="${ofile}T"
6991
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
6992
+ $rm -f "$cfgfile"
6993
+ AC_MSG_RESULT([
6994
+ creating $ofile])],
6995
+ [cfgfile="$ofile"])
6996
+
6997
+ cat <<__EOF__ >> "$cfgfile"
6998
+ ifelse([$1], [],
6999
+ [#! $SHELL
7000
+
7001
+ # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7002
+ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7003
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7004
+ #
7005
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
7006
+ # Free Software Foundation, Inc.
7007
+ #
7008
+ # This file is part of GNU Libtool:
7009
+ # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7010
+ #
7011
+ # This program is free software; you can redistribute it and/or modify
7012
+ # it under the terms of the GNU General Public License as published by
7013
+ # the Free Software Foundation; either version 2 of the License, or
7014
+ # (at your option) any later version.
7015
+ #
7016
+ # This program is distributed in the hope that it will be useful, but
7017
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
7018
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7019
+ # General Public License for more details.
7020
+ #
7021
+ # You should have received a copy of the GNU General Public License
7022
+ # along with this program; if not, write to the Free Software
7023
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
7024
+ #
7025
+ # As a special exception to the GNU General Public License, if you
7026
+ # distribute this file as part of a program that contains a
7027
+ # configuration script generated by Autoconf, you may include it under
7028
+ # the same distribution terms that you use for the rest of that program.
7029
+
7030
+ # A sed program that does not truncate output.
7031
+ SED=$lt_SED
7032
+
7033
+ # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7034
+ Xsed="$SED -e 1s/^X//"
7035
+
7036
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
7037
+ # if CDPATH is set.
7038
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7039
+
7040
+ # The names of the tagged configurations supported by this script.
7041
+ available_tags=
7042
+
7043
+ # ### BEGIN LIBTOOL CONFIG],
7044
+ [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
7045
+
7046
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7047
+
7048
+ # Shell to use when invoking shell scripts.
7049
+ SHELL=$lt_SHELL
7050
+
7051
+ # Whether or not to build shared libraries.
7052
+ build_libtool_libs=$enable_shared
7053
+
7054
+ # Whether or not to build static libraries.
7055
+ build_old_libs=$enable_static
7056
+
7057
+ # Whether or not to add -lc for building shared libraries.
7058
+ build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
7059
+
7060
+ # Whether or not to disallow shared libs when runtime libs are static
7061
+ allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
7062
+
7063
+ # Whether or not to optimize for fast installation.
7064
+ fast_install=$enable_fast_install
7065
+
7066
+ # The host system.
7067
+ host_alias=$host_alias
7068
+ host=$host
7069
+ host_os=$host_os
7070
+
7071
+ # The build system.
7072
+ build_alias=$build_alias
7073
+ build=$build
7074
+ build_os=$build_os
7075
+
7076
+ # An echo program that does not interpret backslashes.
7077
+ echo=$lt_echo
7078
+
7079
+ # The archiver.
7080
+ AR=$lt_AR
7081
+ AR_FLAGS=$lt_AR_FLAGS
7082
+
7083
+ # A C compiler.
7084
+ LTCC=$lt_LTCC
7085
+
7086
+ # LTCC compiler flags.
7087
+ LTCFLAGS=$lt_LTCFLAGS
7088
+
7089
+ # A language-specific compiler.
7090
+ CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
7091
+
7092
+ # Is the compiler the GNU C compiler?
7093
+ with_gcc=$_LT_AC_TAGVAR(GCC, $1)
7094
+
7095
+ # An ERE matcher.
7096
+ EGREP=$lt_EGREP
7097
+
7098
+ # The linker used to build libraries.
7099
+ LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
7100
+
7101
+ # Whether we need hard or soft links.
7102
+ LN_S=$lt_LN_S
7103
+
7104
+ # A BSD-compatible nm program.
7105
+ NM=$lt_NM
7106
+
7107
+ # A symbol stripping program
7108
+ STRIP=$lt_STRIP
7109
+
7110
+ # Used to examine libraries when file_magic_cmd begins "file"
7111
+ MAGIC_CMD=$MAGIC_CMD
7112
+
7113
+ # Used on cygwin: DLL creation program.
7114
+ DLLTOOL="$DLLTOOL"
7115
+
7116
+ # Used on cygwin: object dumper.
7117
+ OBJDUMP="$OBJDUMP"
7118
+
7119
+ # Used on cygwin: assembler.
7120
+ AS="$AS"
7121
+
7122
+ # The name of the directory that contains temporary libtool files.
7123
+ objdir=$objdir
7124
+
7125
+ # How to create reloadable object files.
7126
+ reload_flag=$lt_reload_flag
7127
+ reload_cmds=$lt_reload_cmds
7128
+
7129
+ # How to pass a linker flag through the compiler.
7130
+ wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7131
+
7132
+ # Object file suffix (normally "o").
7133
+ objext="$ac_objext"
7134
+
7135
+ # Old archive suffix (normally "a").
7136
+ libext="$libext"
7137
+
7138
+ # Shared library suffix (normally ".so").
7139
+ shrext_cmds='$shrext_cmds'
7140
+
7141
+ # Executable file suffix (normally "").
7142
+ exeext="$exeext"
7143
+
7144
+ # Additional compiler flags for building library objects.
7145
+ pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7146
+ pic_mode=$pic_mode
7147
+
7148
+ # What is the maximum length of a command?
7149
+ max_cmd_len=$lt_cv_sys_max_cmd_len
7150
+
7151
+ # Does compiler simultaneously support -c and -o options?
7152
+ compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
7153
+
7154
+ # Must we lock files when doing compilation?
7155
+ need_locks=$lt_need_locks
7156
+
7157
+ # Do we need the lib prefix for modules?
7158
+ need_lib_prefix=$need_lib_prefix
7159
+
7160
+ # Do we need a version for libraries?
7161
+ need_version=$need_version
7162
+
7163
+ # Whether dlopen is supported.
7164
+ dlopen_support=$enable_dlopen
7165
+
7166
+ # Whether dlopen of programs is supported.
7167
+ dlopen_self=$enable_dlopen_self
7168
+
7169
+ # Whether dlopen of statically linked programs is supported.
7170
+ dlopen_self_static=$enable_dlopen_self_static
7171
+
7172
+ # Compiler flag to prevent dynamic linking.
7173
+ link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
7174
+
7175
+ # Compiler flag to turn off builtin functions.
7176
+ no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
7177
+
7178
+ # Compiler flag to allow reflexive dlopens.
7179
+ export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
7180
+
7181
+ # Compiler flag to generate shared objects directly from archives.
7182
+ whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
7183
+
7184
+ # Compiler flag to generate thread-safe objects.
7185
+ thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
7186
+
7187
+ # Library versioning type.
7188
+ version_type=$version_type
7189
+
7190
+ # Format of library name prefix.
7191
+ libname_spec=$lt_libname_spec
7192
+
7193
+ # List of archive names. First name is the real one, the rest are links.
7194
+ # The last name is the one that the linker finds with -lNAME.
7195
+ library_names_spec=$lt_library_names_spec
7196
+
7197
+ # The coded name of the library, if different from the real name.
7198
+ soname_spec=$lt_soname_spec
7199
+
7200
+ # Commands used to build and install an old-style archive.
7201
+ RANLIB=$lt_RANLIB
7202
+ old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
7203
+ old_postinstall_cmds=$lt_old_postinstall_cmds
7204
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
7205
+
7206
+ # Create an old-style archive from a shared archive.
7207
+ old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
7208
+
7209
+ # Create a temporary old-style archive to link instead of a shared archive.
7210
+ old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
7211
+
7212
+ # Commands used to build and install a shared archive.
7213
+ archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
7214
+ archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
7215
+ postinstall_cmds=$lt_postinstall_cmds
7216
+ postuninstall_cmds=$lt_postuninstall_cmds
7217
+
7218
+ # Commands used to build a loadable module (assumed same as above if empty)
7219
+ module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
7220
+ module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
7221
+
7222
+ # Commands to strip libraries.
7223
+ old_striplib=$lt_old_striplib
7224
+ striplib=$lt_striplib
7225
+
7226
+ # Dependencies to place before the objects being linked to create a
7227
+ # shared library.
7228
+ predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
7229
+
7230
+ # Dependencies to place after the objects being linked to create a
7231
+ # shared library.
7232
+ postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
7233
+
7234
+ # Dependencies to place before the objects being linked to create a
7235
+ # shared library.
7236
+ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
7237
+
7238
+ # Dependencies to place after the objects being linked to create a
7239
+ # shared library.
7240
+ postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
7241
+
7242
+ # The directories searched by this compiler when creating a shared
7243
+ # library
7244
+ compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
7245
+
7246
+ # The library search path used internally by the compiler when linking
7247
+ # a shared library.
7248
+ compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
7249
+
7250
+ # Method to check whether dependent libraries are shared objects.
7251
+ deplibs_check_method=$lt_deplibs_check_method
7252
+
7253
+ # Command to use when deplibs_check_method == file_magic.
7254
+ file_magic_cmd=$lt_file_magic_cmd
7255
+
7256
+ # Flag that allows shared libraries with undefined symbols to be built.
7257
+ allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
7258
+
7259
+ # Flag that forces no undefined symbols.
7260
+ no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
7261
+
7262
+ # Commands used to finish a libtool library installation in a directory.
7263
+ finish_cmds=$lt_finish_cmds
7264
+
7265
+ # Same as above, but a single script fragment to be evaled but not shown.
7266
+ finish_eval=$lt_finish_eval
7267
+
7268
+ # Take the output of nm and produce a listing of raw symbols and C names.
7269
+ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
7270
+
7271
+ # Transform the output of nm in a proper C declaration
7272
+ global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
7273
+
7274
+ # Transform the output of nm in a C name address pair
7275
+ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
7276
+
7277
+ # This is the shared library runtime path variable.
7278
+ runpath_var=$runpath_var
7279
+
7280
+ # This is the shared library path variable.
7281
+ shlibpath_var=$shlibpath_var
7282
+
7283
+ # Is shlibpath searched before the hard-coded library search path?
7284
+ shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7285
+
7286
+ # How to hardcode a shared library path into an executable.
7287
+ hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
7288
+
7289
+ # Whether we should hardcode library paths into libraries.
7290
+ hardcode_into_libs=$hardcode_into_libs
7291
+
7292
+ # Flag to hardcode \$libdir into a binary during linking.
7293
+ # This must work even if \$libdir does not exist.
7294
+ hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
7295
+
7296
+ # If ld is used when linking, flag to hardcode \$libdir into
7297
+ # a binary during linking. This must work even if \$libdir does
7298
+ # not exist.
7299
+ hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
7300
+
7301
+ # Whether we need a single -rpath flag with a separated argument.
7302
+ hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
7303
+
7304
+ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
7305
+ # resulting binary.
7306
+ hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
7307
+
7308
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7309
+ # resulting binary.
7310
+ hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
7311
+
7312
+ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7313
+ # the resulting binary.
7314
+ hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
7315
+
7316
+ # Set to yes if building a shared library automatically hardcodes DIR into the library
7317
+ # and all subsequent libraries and executables linked against it.
7318
+ hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
7319
+
7320
+ # Variables whose values should be saved in libtool wrapper scripts and
7321
+ # restored at relink time.
7322
+ variables_saved_for_relink="$variables_saved_for_relink"
7323
+
7324
+ # Whether libtool must link a program against all its dependency libraries.
7325
+ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
7326
+
7327
+ # Compile-time system search path for libraries
7328
+ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7329
+
7330
+ # Run-time system search path for libraries
7331
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7332
+
7333
+ # Fix the shell variable \$srcfile for the compiler.
7334
+ fix_srcfile_path=$lt_fix_srcfile_path
7335
+
7336
+ # Set to yes if exported symbols are required.
7337
+ always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
7338
+
7339
+ # The commands to list exported symbols.
7340
+ export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
7341
+
7342
+ # The commands to extract the exported symbol list from a shared archive.
7343
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
7344
+
7345
+ # Symbols that should not be listed in the preloaded symbols.
7346
+ exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
7347
+
7348
+ # Symbols that must always be exported.
7349
+ include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
7350
+
7351
+ ifelse([$1],[],
7352
+ [# ### END LIBTOOL CONFIG],
7353
+ [# ### END LIBTOOL TAG CONFIG: $tagname])
7354
+
7355
+ __EOF__
7356
+
7357
+ ifelse([$1],[], [
7358
+ case $host_os in
7359
+ aix3*)
7360
+ cat <<\EOF >> "$cfgfile"
7361
+
7362
+ # AIX sometimes has problems with the GCC collect2 program. For some
7363
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
7364
+ # vanish in a puff of smoke.
7365
+ if test "X${COLLECT_NAMES+set}" != Xset; then
7366
+ COLLECT_NAMES=
7367
+ export COLLECT_NAMES
7368
+ fi
7369
+ EOF
7370
+ ;;
7371
+ esac
7372
+
7373
+ # We use sed instead of cat because bash on DJGPP gets confused if
7374
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
7375
+ # text mode, it properly converts lines to CR/LF. This bash problem
7376
+ # is reportedly fixed, but why not run on old versions too?
7377
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
7378
+
7379
+ mv -f "$cfgfile" "$ofile" || \
7380
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7381
+ chmod +x "$ofile"
7382
+ ])
7383
+ else
7384
+ # If there is no Makefile yet, we rely on a make rule to execute
7385
+ # `config.status --recheck' to rerun these tests and create the
7386
+ # libtool script then.
7387
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
7388
+ if test -f "$ltmain_in"; then
7389
+ test -f Makefile && make "$ltmain"
7390
+ fi
7391
+ fi
7392
+ ])# AC_LIBTOOL_CONFIG
7393
+
7394
+
7395
+ # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
7396
+ # -------------------------------------------
7397
+ AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
7398
+ [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
7399
+
7400
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7401
+
7402
+ if test "$GCC" = yes; then
7403
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7404
+
7405
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7406
+ lt_cv_prog_compiler_rtti_exceptions,
7407
+ [-fno-rtti -fno-exceptions], [],
7408
+ [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7409
+ fi
7410
+ ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
7411
+
7412
+
7413
+ # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7414
+ # ---------------------------------
7415
+ AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
7416
+ [AC_REQUIRE([AC_CANONICAL_HOST])
7417
+ AC_REQUIRE([LT_AC_PROG_SED])
7418
+ AC_REQUIRE([AC_PROG_NM])
7419
+ AC_REQUIRE([AC_OBJEXT])
7420
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
7421
+ AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7422
+ AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7423
+ [
7424
+ # These are sane defaults that work on at least a few old systems.
7425
+ # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7426
+
7427
+ # Character class describing NM global symbol codes.
7428
+ symcode='[[BCDEGRST]]'
7429
+
7430
+ # Regexp to match symbols that can be accessed directly from C.
7431
+ sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7432
+
7433
+ # Transform an extracted symbol line into a proper C declaration
7434
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7435
+
7436
+ # Transform an extracted symbol line into symbol name and symbol address
7437
+ 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'"
7438
+
7439
+ # Define system-specific variables.
7440
+ case $host_os in
7441
+ aix*)
7442
+ symcode='[[BCDT]]'
7443
+ ;;
7444
+ cygwin* | mingw* | pw32*)
7445
+ symcode='[[ABCDGISTW]]'
7446
+ ;;
7447
+ hpux*) # Its linker distinguishes data from code symbols
7448
+ if test "$host_cpu" = ia64; then
7449
+ symcode='[[ABCDEGRST]]'
7450
+ fi
7451
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7452
+ 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'"
7453
+ ;;
7454
+ linux* | k*bsd*-gnu)
7455
+ if test "$host_cpu" = ia64; then
7456
+ symcode='[[ABCDGIRSTW]]'
7457
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7458
+ 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'"
7459
+ fi
7460
+ ;;
7461
+ irix* | nonstopux*)
7462
+ symcode='[[BCDEGRST]]'
7463
+ ;;
7464
+ osf*)
7465
+ symcode='[[BCDEGQRST]]'
7466
+ ;;
7467
+ solaris*)
7468
+ symcode='[[BDRT]]'
7469
+ ;;
7470
+ sco3.2v5*)
7471
+ symcode='[[DT]]'
7472
+ ;;
7473
+ sysv4.2uw2*)
7474
+ symcode='[[DT]]'
7475
+ ;;
7476
+ sysv5* | sco5v6* | unixware* | OpenUNIX*)
7477
+ symcode='[[ABDT]]'
7478
+ ;;
7479
+ sysv4)
7480
+ symcode='[[DFNSTU]]'
7481
+ ;;
7482
+ esac
7483
+
7484
+ # Handle CRLF in mingw tool chain
7485
+ opt_cr=
7486
+ case $build_os in
7487
+ mingw*)
7488
+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7489
+ ;;
7490
+ esac
7491
+
7492
+ # If we're using GNU nm, then use its standard symbol codes.
7493
+ case `$NM -V 2>&1` in
7494
+ *GNU* | *'with BFD'*)
7495
+ symcode='[[ABCDGIRSTW]]' ;;
7496
+ esac
7497
+
7498
+ # Try without a prefix undercore, then with it.
7499
+ for ac_symprfx in "" "_"; do
7500
+
7501
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7502
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
7503
+
7504
+ # Write the raw and C identifiers.
7505
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7506
+
7507
+ # Check to see that the pipe works correctly.
7508
+ pipe_works=no
7509
+
7510
+ rm -f conftest*
7511
+ cat > conftest.$ac_ext <<EOF
7512
+ #ifdef __cplusplus
7513
+ extern "C" {
7514
+ #endif
7515
+ char nm_test_var;
7516
+ void nm_test_func(){}
7517
+ #ifdef __cplusplus
7518
+ }
7519
+ #endif
7520
+ int main(){nm_test_var='a';nm_test_func();return(0);}
7521
+ EOF
7522
+
7523
+ if AC_TRY_EVAL(ac_compile); then
7524
+ # Now try to grab the symbols.
7525
+ nlist=conftest.nm
7526
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
7527
+ # Try sorting and uniquifying the output.
7528
+ if sort "$nlist" | uniq > "$nlist"T; then
7529
+ mv -f "$nlist"T "$nlist"
7530
+ else
7531
+ rm -f "$nlist"T
7532
+ fi
7533
+
7534
+ # Make sure that we snagged all the symbols we need.
7535
+ if grep ' nm_test_var$' "$nlist" >/dev/null; then
7536
+ if grep ' nm_test_func$' "$nlist" >/dev/null; then
7537
+ cat <<EOF > conftest.$ac_ext
7538
+ #ifdef __cplusplus
7539
+ extern "C" {
7540
+ #endif
7541
+
7542
+ EOF
7543
+ # Now generate the symbol file.
7544
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7545
+
7546
+ cat <<EOF >> conftest.$ac_ext
7547
+ #if defined (__STDC__) && __STDC__
7548
+ # define lt_ptr_t void *
7549
+ #else
7550
+ # define lt_ptr_t char *
7551
+ # define const
7552
+ #endif
7553
+
7554
+ /* The mapping between symbol names and symbols. */
7555
+ const struct {
7556
+ const char *name;
7557
+ lt_ptr_t address;
7558
+ }
7559
+ lt_preloaded_symbols[[]] =
7560
+ {
7561
+ EOF
7562
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7563
+ cat <<\EOF >> conftest.$ac_ext
7564
+ {0, (lt_ptr_t) 0}
7565
+ };
7566
+
7567
+ #ifdef __cplusplus
7568
+ }
7569
+ #endif
7570
+ EOF
7571
+ # Now try linking the two files.
7572
+ mv conftest.$ac_objext conftstm.$ac_objext
7573
+ lt_save_LIBS="$LIBS"
7574
+ lt_save_CFLAGS="$CFLAGS"
7575
+ LIBS="conftstm.$ac_objext"
7576
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7577
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
7578
+ pipe_works=yes
7579
+ fi
7580
+ LIBS="$lt_save_LIBS"
7581
+ CFLAGS="$lt_save_CFLAGS"
7582
+ else
7583
+ echo "cannot find nm_test_func in $nlist" >&5
7584
+ fi
7585
+ else
7586
+ echo "cannot find nm_test_var in $nlist" >&5
7587
+ fi
7588
+ else
7589
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7590
+ fi
7591
+ else
7592
+ echo "$progname: failed program was:" >&5
7593
+ cat conftest.$ac_ext >&5
7594
+ fi
7595
+ rm -rf conftest* conftst*
7596
+
7597
+ # Do not use the global_symbol_pipe unless it works.
7598
+ if test "$pipe_works" = yes; then
7599
+ break
7600
+ else
7601
+ lt_cv_sys_global_symbol_pipe=
7602
+ fi
7603
+ done
7604
+ ])
7605
+ if test -z "$lt_cv_sys_global_symbol_pipe"; then
7606
+ lt_cv_sys_global_symbol_to_cdecl=
7607
+ fi
7608
+ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7609
+ AC_MSG_RESULT(failed)
7610
+ else
7611
+ AC_MSG_RESULT(ok)
7612
+ fi
7613
+ ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7614
+
7615
+
7616
+ # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
7617
+ # ---------------------------------------
7618
+ AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
7619
+ [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
7620
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7621
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
7622
+
7623
+ AC_MSG_CHECKING([for $compiler option to produce PIC])
7624
+ ifelse([$1],[CXX],[
7625
+ # C++ specific cases for pic, static, wl, etc.
7626
+ if test "$GXX" = yes; then
7627
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7628
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7629
+
7630
+ case $host_os in
7631
+ aix*)
7632
+ # All AIX code is PIC.
7633
+ if test "$host_cpu" = ia64; then
7634
+ # AIX 5 now supports IA64 processor
7635
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7636
+ fi
7637
+ ;;
7638
+ amigaos*)
7639
+ # FIXME: we need at least 68020 code to build shared libraries, but
7640
+ # adding the `-m68020' flag to GCC prevents building anything better,
7641
+ # like `-m68040'.
7642
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7643
+ ;;
7644
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7645
+ # PIC is the default for these OSes.
7646
+ ;;
7647
+ mingw* | cygwin* | os2* | pw32*)
7648
+ # This hack is so that the source file can tell whether it is being
7649
+ # built for inclusion in a dll (and should export symbols for example).
7650
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
7651
+ # (--disable-auto-import) libraries
7652
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7653
+ ;;
7654
+ darwin* | rhapsody*)
7655
+ # PIC is the default on this platform
7656
+ # Common symbols not allowed in MH_DYLIB files
7657
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7658
+ ;;
7659
+ *djgpp*)
7660
+ # DJGPP does not support shared libraries at all
7661
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7662
+ ;;
7663
+ interix[[3-9]]*)
7664
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7665
+ # Instead, we relocate shared libraries at runtime.
7666
+ ;;
7667
+ sysv4*MP*)
7668
+ if test -d /usr/nec; then
7669
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7670
+ fi
7671
+ ;;
7672
+ hpux*)
7673
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7674
+ # not for PA HP-UX.
7675
+ case $host_cpu in
7676
+ hppa*64*|ia64*)
7677
+ ;;
7678
+ *)
7679
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7680
+ ;;
7681
+ esac
7682
+ ;;
7683
+ *)
7684
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7685
+ ;;
7686
+ esac
7687
+ else
7688
+ case $host_os in
7689
+ aix[[4-9]]*)
7690
+ # All AIX code is PIC.
7691
+ if test "$host_cpu" = ia64; then
7692
+ # AIX 5 now supports IA64 processor
7693
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7694
+ else
7695
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7696
+ fi
7697
+ ;;
7698
+ chorus*)
7699
+ case $cc_basename in
7700
+ cxch68*)
7701
+ # Green Hills C++ Compiler
7702
+ # _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"
7703
+ ;;
7704
+ esac
7705
+ ;;
7706
+ darwin*)
7707
+ # PIC is the default on this platform
7708
+ # Common symbols not allowed in MH_DYLIB files
7709
+ case $cc_basename in
7710
+ xlc*)
7711
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
7712
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7713
+ ;;
7714
+ esac
7715
+ ;;
7716
+ dgux*)
7717
+ case $cc_basename in
7718
+ ec++*)
7719
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7720
+ ;;
7721
+ ghcx*)
7722
+ # Green Hills C++ Compiler
7723
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7724
+ ;;
7725
+ *)
7726
+ ;;
7727
+ esac
7728
+ ;;
7729
+ freebsd* | dragonfly*)
7730
+ # FreeBSD uses GNU C++
7731
+ ;;
7732
+ hpux9* | hpux10* | hpux11*)
7733
+ case $cc_basename in
7734
+ CC*)
7735
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7736
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7737
+ if test "$host_cpu" != ia64; then
7738
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7739
+ fi
7740
+ ;;
7741
+ aCC*)
7742
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7743
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7744
+ case $host_cpu in
7745
+ hppa*64*|ia64*)
7746
+ # +Z the default
7747
+ ;;
7748
+ *)
7749
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7750
+ ;;
7751
+ esac
7752
+ ;;
7753
+ *)
7754
+ ;;
7755
+ esac
7756
+ ;;
7757
+ interix*)
7758
+ # This is c89, which is MS Visual C++ (no shared libs)
7759
+ # Anyone wants to do a port?
7760
+ ;;
7761
+ irix5* | irix6* | nonstopux*)
7762
+ case $cc_basename in
7763
+ CC*)
7764
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7765
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7766
+ # CC pic flag -KPIC is the default.
7767
+ ;;
7768
+ *)
7769
+ ;;
7770
+ esac
7771
+ ;;
7772
+ linux* | k*bsd*-gnu)
7773
+ case $cc_basename in
7774
+ KCC*)
7775
+ # KAI C++ Compiler
7776
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7777
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7778
+ ;;
7779
+ ecpc*)
7780
+ # old Intel C++ for x86_64 which still supported -KPIC.
7781
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7782
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7783
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7784
+ ;;
7785
+ icpc*)
7786
+ # Intel C++, used to be incompatible with GCC.
7787
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7788
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7789
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7790
+ ;;
7791
+ pgCC* | pgcpp*)
7792
+ # Portland Group C++ compiler.
7793
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7794
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7795
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7796
+ ;;
7797
+ cxx*)
7798
+ # Compaq C++
7799
+ # Make sure the PIC flag is empty. It appears that all Alpha
7800
+ # Linux and Compaq Tru64 Unix objects are PIC.
7801
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7802
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7803
+ ;;
7804
+ *)
7805
+ case `$CC -V 2>&1 | sed 5q` in
7806
+ *Sun\ C*)
7807
+ # Sun C++ 5.9
7808
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7809
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7810
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7811
+ ;;
7812
+ esac
7813
+ ;;
7814
+ esac
7815
+ ;;
7816
+ lynxos*)
7817
+ ;;
7818
+ m88k*)
7819
+ ;;
7820
+ mvs*)
7821
+ case $cc_basename in
7822
+ cxx*)
7823
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7824
+ ;;
7825
+ *)
7826
+ ;;
7827
+ esac
7828
+ ;;
7829
+ netbsd*)
7830
+ ;;
7831
+ osf3* | osf4* | osf5*)
7832
+ case $cc_basename in
7833
+ KCC*)
7834
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7835
+ ;;
7836
+ RCC*)
7837
+ # Rational C++ 2.4.1
7838
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7839
+ ;;
7840
+ cxx*)
7841
+ # Digital/Compaq C++
7842
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7843
+ # Make sure the PIC flag is empty. It appears that all Alpha
7844
+ # Linux and Compaq Tru64 Unix objects are PIC.
7845
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7846
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7847
+ ;;
7848
+ *)
7849
+ ;;
7850
+ esac
7851
+ ;;
7852
+ psos*)
7853
+ ;;
7854
+ solaris*)
7855
+ case $cc_basename in
7856
+ CC*)
7857
+ # Sun C++ 4.2, 5.x and Centerline C++
7858
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7859
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7860
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7861
+ ;;
7862
+ gcx*)
7863
+ # Green Hills C++ Compiler
7864
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7865
+ ;;
7866
+ *)
7867
+ ;;
7868
+ esac
7869
+ ;;
7870
+ sunos4*)
7871
+ case $cc_basename in
7872
+ CC*)
7873
+ # Sun C++ 4.x
7874
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7875
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7876
+ ;;
7877
+ lcc*)
7878
+ # Lucid
7879
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7880
+ ;;
7881
+ *)
7882
+ ;;
7883
+ esac
7884
+ ;;
7885
+ tandem*)
7886
+ case $cc_basename in
7887
+ NCC*)
7888
+ # NonStop-UX NCC 3.20
7889
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7890
+ ;;
7891
+ *)
7892
+ ;;
7893
+ esac
7894
+ ;;
7895
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7896
+ case $cc_basename in
7897
+ CC*)
7898
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7899
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7900
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7901
+ ;;
7902
+ esac
7903
+ ;;
7904
+ vxworks*)
7905
+ ;;
7906
+ *)
7907
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7908
+ ;;
7909
+ esac
7910
+ fi
7911
+ ],
7912
+ [
7913
+ if test "$GCC" = yes; then
7914
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7915
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7916
+
7917
+ case $host_os in
7918
+ aix*)
7919
+ # All AIX code is PIC.
7920
+ if test "$host_cpu" = ia64; then
7921
+ # AIX 5 now supports IA64 processor
7922
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7923
+ fi
7924
+ ;;
7925
+
7926
+ amigaos*)
7927
+ # FIXME: we need at least 68020 code to build shared libraries, but
7928
+ # adding the `-m68020' flag to GCC prevents building anything better,
7929
+ # like `-m68040'.
7930
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7931
+ ;;
7932
+
7933
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7934
+ # PIC is the default for these OSes.
7935
+ ;;
7936
+
7937
+ mingw* | cygwin* | pw32* | os2*)
7938
+ # This hack is so that the source file can tell whether it is being
7939
+ # built for inclusion in a dll (and should export symbols for example).
7940
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
7941
+ # (--disable-auto-import) libraries
7942
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7943
+ ;;
7944
+
7945
+ darwin* | rhapsody*)
7946
+ # PIC is the default on this platform
7947
+ # Common symbols not allowed in MH_DYLIB files
7948
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7949
+ ;;
7950
+
7951
+ interix[[3-9]]*)
7952
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7953
+ # Instead, we relocate shared libraries at runtime.
7954
+ ;;
7955
+
7956
+ msdosdjgpp*)
7957
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
7958
+ # on systems that don't support them.
7959
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7960
+ enable_shared=no
7961
+ ;;
7962
+
7963
+ sysv4*MP*)
7964
+ if test -d /usr/nec; then
7965
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7966
+ fi
7967
+ ;;
7968
+
7969
+ hpux*)
7970
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7971
+ # not for PA HP-UX.
7972
+ case $host_cpu in
7973
+ hppa*64*|ia64*)
7974
+ # +Z the default
7975
+ ;;
7976
+ *)
7977
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7978
+ ;;
7979
+ esac
7980
+ ;;
7981
+
7982
+ *)
7983
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7984
+ ;;
7985
+ esac
7986
+ else
7987
+ # PORTME Check for flag to pass linker flags through the system compiler.
7988
+ case $host_os in
7989
+ aix*)
7990
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7991
+ if test "$host_cpu" = ia64; then
7992
+ # AIX 5 now supports IA64 processor
7993
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7994
+ else
7995
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7996
+ fi
7997
+ ;;
7998
+ darwin*)
7999
+ # PIC is the default on this platform
8000
+ # Common symbols not allowed in MH_DYLIB files
8001
+ case $cc_basename in
8002
+ xlc*)
8003
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
8004
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8005
+ ;;
8006
+ esac
8007
+ ;;
8008
+
8009
+ mingw* | cygwin* | pw32* | os2*)
8010
+ # This hack is so that the source file can tell whether it is being
8011
+ # built for inclusion in a dll (and should export symbols for example).
8012
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
8013
+ ;;
8014
+
8015
+ hpux9* | hpux10* | hpux11*)
8016
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8017
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8018
+ # not for PA HP-UX.
8019
+ case $host_cpu in
8020
+ hppa*64*|ia64*)
8021
+ # +Z the default
8022
+ ;;
8023
+ *)
8024
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8025
+ ;;
8026
+ esac
8027
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
8028
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
8029
+ ;;
8030
+
8031
+ irix5* | irix6* | nonstopux*)
8032
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8033
+ # PIC (with -KPIC) is the default.
8034
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8035
+ ;;
8036
+
8037
+ newsos6)
8038
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8039
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8040
+ ;;
8041
+
8042
+ linux* | k*bsd*-gnu)
8043
+ case $cc_basename in
8044
+ # old Intel for x86_64 which still supported -KPIC.
8045
+ ecc*)
8046
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8047
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8048
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8049
+ ;;
8050
+ # icc used to be incompatible with GCC.
8051
+ # ICC 10 doesn't accept -KPIC any more.
8052
+ icc*)
8053
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8054
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8055
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8056
+ ;;
8057
+ pgcc* | pgf77* | pgf90* | pgf95*)
8058
+ # Portland Group compilers (*not* the Pentium gcc compiler,
8059
+ # which looks to be a dead project)
8060
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8061
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8062
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8063
+ ;;
8064
+ ccc*)
8065
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8066
+ # All Alpha code is PIC.
8067
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8068
+ ;;
8069
+ *)
8070
+ case `$CC -V 2>&1 | sed 5q` in
8071
+ *Sun\ C*)
8072
+ # Sun C 5.9
8073
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8074
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8075
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8076
+ ;;
8077
+ *Sun\ F*)
8078
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
8079
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8080
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8081
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
8082
+ ;;
8083
+ esac
8084
+ ;;
8085
+ esac
8086
+ ;;
8087
+
8088
+ osf3* | osf4* | osf5*)
8089
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8090
+ # All OSF/1 code is PIC.
8091
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8092
+ ;;
8093
+
8094
+ rdos*)
8095
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8096
+ ;;
8097
+
8098
+ solaris*)
8099
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8100
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8101
+ case $cc_basename in
8102
+ f77* | f90* | f95*)
8103
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8104
+ *)
8105
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8106
+ esac
8107
+ ;;
8108
+
8109
+ sunos4*)
8110
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8111
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8112
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8113
+ ;;
8114
+
8115
+ sysv4 | sysv4.2uw2* | sysv4.3*)
8116
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8117
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8118
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8119
+ ;;
8120
+
8121
+ sysv4*MP*)
8122
+ if test -d /usr/nec ;then
8123
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8124
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8125
+ fi
8126
+ ;;
8127
+
8128
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8129
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8130
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8131
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8132
+ ;;
8133
+
8134
+ unicos*)
8135
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8136
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8137
+ ;;
8138
+
8139
+ uts4*)
8140
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8141
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8142
+ ;;
8143
+
8144
+ *)
8145
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8146
+ ;;
8147
+ esac
8148
+ fi
8149
+ ])
8150
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
8151
+
8152
+ #
8153
+ # Check to make sure the PIC flag actually works.
8154
+ #
8155
+ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
8156
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
8157
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
8158
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
8159
+ [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
8160
+ "" | " "*) ;;
8161
+ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8162
+ esac],
8163
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8164
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8165
+ fi
8166
+ case $host_os in
8167
+ # For platforms which do not support PIC, -DPIC is meaningless:
8168
+ *djgpp*)
8169
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8170
+ ;;
8171
+ *)
8172
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
8173
+ ;;
8174
+ esac
8175
+
8176
+ #
8177
+ # Check to make sure the static flag actually works.
8178
+ #
8179
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
8180
+ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8181
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8182
+ $lt_tmp_static_flag,
8183
+ [],
8184
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8185
+ ])
8186
+
8187
+
8188
+ # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
8189
+ # ------------------------------------
8190
+ # See if the linker supports building shared libraries.
8191
+ AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
8192
+ [AC_REQUIRE([LT_AC_PROG_SED])dnl
8193
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8194
+ ifelse([$1],[CXX],[
8195
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8196
+ case $host_os in
8197
+ aix[[4-9]]*)
8198
+ # If we're using GNU nm, then we don't want the "-C" option.
8199
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
8200
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8201
+ _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'
8202
+ else
8203
+ _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'
8204
+ fi
8205
+ ;;
8206
+ pw32*)
8207
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
8208
+ ;;
8209
+ cygwin* | mingw*)
8210
+ _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'
8211
+ ;;
8212
+ *)
8213
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8214
+ ;;
8215
+ esac
8216
+ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8217
+ ],[
8218
+ runpath_var=
8219
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8220
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8221
+ _LT_AC_TAGVAR(archive_cmds, $1)=
8222
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8223
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
8224
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8225
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8226
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8227
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
8228
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8229
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8230
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8231
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
8232
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8233
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8234
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8235
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
8236
+ _LT_AC_TAGVAR(module_cmds, $1)=
8237
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
8238
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
8239
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8240
+ # include_expsyms should be a list of space-separated symbols to be *always*
8241
+ # included in the symbol list
8242
+ _LT_AC_TAGVAR(include_expsyms, $1)=
8243
+ # exclude_expsyms can be an extended regexp of symbols to exclude
8244
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
8245
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8246
+ # as well as any symbol that contains `d'.
8247
+ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8248
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8249
+ # platforms (ab)use it in PIC code, but their linkers get confused if
8250
+ # the symbol is explicitly referenced. Since portable code cannot
8251
+ # rely on this symbol name, it's probably fine to never include it in
8252
+ # preloaded symbol tables.
8253
+ # Exclude shared library initialization/finalization symbols.
8254
+ dnl Note also adjust exclude_expsyms for C++ above.
8255
+ extract_expsyms_cmds=
8256
+ # Just being paranoid about ensuring that cc_basename is set.
8257
+ _LT_CC_BASENAME([$compiler])
8258
+ case $host_os in
8259
+ cygwin* | mingw* | pw32*)
8260
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
8261
+ # When not using gcc, we currently assume that we are using
8262
+ # Microsoft Visual C++.
8263
+ if test "$GCC" != yes; then
8264
+ with_gnu_ld=no
8265
+ fi
8266
+ ;;
8267
+ interix*)
8268
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
8269
+ with_gnu_ld=yes
8270
+ ;;
8271
+ openbsd*)
8272
+ with_gnu_ld=no
8273
+ ;;
8274
+ esac
8275
+
8276
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8277
+ if test "$with_gnu_ld" = yes; then
8278
+ # If archive_cmds runs LD, not CC, wlarc should be empty
8279
+ wlarc='${wl}'
8280
+
8281
+ # Set some defaults for GNU ld with shared library support. These
8282
+ # are reset later if shared libraries are not supported. Putting them
8283
+ # here allows them to be overridden if necessary.
8284
+ runpath_var=LD_RUN_PATH
8285
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8286
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8287
+ # ancient GNU ld didn't support --whole-archive et. al.
8288
+ if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8289
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8290
+ else
8291
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8292
+ fi
8293
+ supports_anon_versioning=no
8294
+ case `$LD -v 2>/dev/null` in
8295
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8296
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8297
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8298
+ *\ 2.11.*) ;; # other 2.11 versions
8299
+ *) supports_anon_versioning=yes ;;
8300
+ esac
8301
+
8302
+ # See if GNU ld supports shared libraries.
8303
+ case $host_os in
8304
+ aix[[3-9]]*)
8305
+ # On AIX/PPC, the GNU linker is very broken
8306
+ if test "$host_cpu" != ia64; then
8307
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8308
+ cat <<EOF 1>&2
8309
+
8310
+ *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8311
+ *** to be unable to reliably create shared libraries on AIX.
8312
+ *** Therefore, libtool is disabling shared libraries support. If you
8313
+ *** really care for shared libraries, you may want to modify your PATH
8314
+ *** so that a non-GNU linker is found, and then restart.
8315
+
8316
+ EOF
8317
+ fi
8318
+ ;;
8319
+
8320
+ amigaos*)
8321
+ _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)'
8322
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8323
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8324
+
8325
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8326
+ # that the semantics of dynamic libraries on AmigaOS, at least up
8327
+ # to version 4, is to share data among multiple programs linked
8328
+ # with the same dynamic library. Since this doesn't match the
8329
+ # behavior of shared libraries on other platforms, we can't use
8330
+ # them.
8331
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8332
+ ;;
8333
+
8334
+ beos*)
8335
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8336
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8337
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8338
+ # support --undefined. This deserves some investigation. FIXME
8339
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8340
+ else
8341
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8342
+ fi
8343
+ ;;
8344
+
8345
+ cygwin* | mingw* | pw32*)
8346
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8347
+ # as there is no search path for DLLs.
8348
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8349
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8350
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
8351
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8352
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
8353
+
8354
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8355
+ _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'
8356
+ # If the export-symbols file already is a .def file (1st line
8357
+ # is EXPORTS), use it as is; otherwise, prepend...
8358
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8359
+ cp $export_symbols $output_objdir/$soname.def;
8360
+ else
8361
+ echo EXPORTS > $output_objdir/$soname.def;
8362
+ cat $export_symbols >> $output_objdir/$soname.def;
8363
+ fi~
8364
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8365
+ else
8366
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8367
+ fi
8368
+ ;;
8369
+
8370
+ interix[[3-9]]*)
8371
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
8372
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8373
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8374
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8375
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8376
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
8377
+ # default) and relocated if they conflict, which is a slow very memory
8378
+ # consuming and fragmenting process. To avoid this, we pick a random,
8379
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8380
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8381
+ _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'
8382
+ _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'
8383
+ ;;
8384
+
8385
+ gnu* | linux* | k*bsd*-gnu)
8386
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8387
+ tmp_addflag=
8388
+ case $cc_basename,$host_cpu in
8389
+ pgcc*) # Portland Group C compiler
8390
+ _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'
8391
+ tmp_addflag=' $pic_flag'
8392
+ ;;
8393
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8394
+ _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'
8395
+ tmp_addflag=' $pic_flag -Mnomain' ;;
8396
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8397
+ tmp_addflag=' -i_dynamic' ;;
8398
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8399
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
8400
+ ifc* | ifort*) # Intel Fortran compiler
8401
+ tmp_addflag=' -nofor_main' ;;
8402
+ esac
8403
+ case `$CC -V 2>&1 | sed 5q` in
8404
+ *Sun\ C*) # Sun C 5.9
8405
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8406
+ tmp_sharedflag='-G' ;;
8407
+ *Sun\ F*) # Sun Fortran 8.3
8408
+ tmp_sharedflag='-G' ;;
8409
+ *)
8410
+ tmp_sharedflag='-shared' ;;
8411
+ esac
8412
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8413
+
8414
+ if test $supports_anon_versioning = yes; then
8415
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
8416
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8417
+ $echo "local: *; };" >> $output_objdir/$libname.ver~
8418
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8419
+ fi
8420
+ else
8421
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8422
+ fi
8423
+ ;;
8424
+
8425
+ netbsd*)
8426
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8427
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8428
+ wlarc=
8429
+ else
8430
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8431
+ _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'
8432
+ fi
8433
+ ;;
8434
+
8435
+ solaris*)
8436
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8437
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8438
+ cat <<EOF 1>&2
8439
+
8440
+ *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8441
+ *** create shared libraries on Solaris systems. Therefore, libtool
8442
+ *** is disabling shared libraries support. We urge you to upgrade GNU
8443
+ *** binutils to release 2.9.1 or newer. Another option is to modify
8444
+ *** your PATH or compiler configuration so that the native linker is
8445
+ *** used, and then restart.
8446
+
8447
+ EOF
8448
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8449
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8450
+ _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'
8451
+ else
8452
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8453
+ fi
8454
+ ;;
8455
+
8456
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8457
+ case `$LD -v 2>&1` in
8458
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
8459
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8460
+ cat <<_LT_EOF 1>&2
8461
+
8462
+ *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8463
+ *** reliably create shared libraries on SCO systems. Therefore, libtool
8464
+ *** is disabling shared libraries support. We urge you to upgrade GNU
8465
+ *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8466
+ *** your PATH or compiler configuration so that the native linker is
8467
+ *** used, and then restart.
8468
+
8469
+ _LT_EOF
8470
+ ;;
8471
+ *)
8472
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8473
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
8474
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
8475
+ _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'
8476
+ else
8477
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8478
+ fi
8479
+ ;;
8480
+ esac
8481
+ ;;
8482
+
8483
+ sunos4*)
8484
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8485
+ wlarc=
8486
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8487
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8488
+ ;;
8489
+
8490
+ *)
8491
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8492
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8493
+ _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'
8494
+ else
8495
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8496
+ fi
8497
+ ;;
8498
+ esac
8499
+
8500
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
8501
+ runpath_var=
8502
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8503
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8504
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8505
+ fi
8506
+ else
8507
+ # PORTME fill in a description of your system's linker (not GNU ld)
8508
+ case $host_os in
8509
+ aix3*)
8510
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8511
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8512
+ _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'
8513
+ # Note: this linker hardcodes the directories in LIBPATH if there
8514
+ # are no directories specified by -L.
8515
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8516
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8517
+ # Neither direct hardcoding nor static linking is supported with a
8518
+ # broken collect2.
8519
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8520
+ fi
8521
+ ;;
8522
+
8523
+ aix[[4-9]]*)
8524
+ if test "$host_cpu" = ia64; then
8525
+ # On IA64, the linker does run time linking by default, so we don't
8526
+ # have to do anything special.
8527
+ aix_use_runtimelinking=no
8528
+ exp_sym_flag='-Bexport'
8529
+ no_entry_flag=""
8530
+ else
8531
+ # If we're using GNU nm, then we don't want the "-C" option.
8532
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
8533
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8534
+ _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'
8535
+ else
8536
+ _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'
8537
+ fi
8538
+ aix_use_runtimelinking=no
8539
+
8540
+ # Test if we are trying to use run time linking or normal
8541
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8542
+ # need to do runtime linking.
8543
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8544
+ for ld_flag in $LDFLAGS; do
8545
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8546
+ aix_use_runtimelinking=yes
8547
+ break
8548
+ fi
8549
+ done
8550
+ ;;
8551
+ esac
8552
+
8553
+ exp_sym_flag='-bexport'
8554
+ no_entry_flag='-bnoentry'
8555
+ fi
8556
+
8557
+ # When large executables or shared objects are built, AIX ld can
8558
+ # have problems creating the table of contents. If linking a library
8559
+ # or program results in "error TOC overflow" add -mminimal-toc to
8560
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8561
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8562
+
8563
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
8564
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8565
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8566
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8567
+
8568
+ if test "$GCC" = yes; then
8569
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
8570
+ # We only want to do this on AIX 4.2 and lower, the check
8571
+ # below for broken collect2 doesn't work under 4.3+
8572
+ collect2name=`${CC} -print-prog-name=collect2`
8573
+ if test -f "$collect2name" && \
8574
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
8575
+ then
8576
+ # We have reworked collect2
8577
+ :
8578
+ else
8579
+ # We have old collect2
8580
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8581
+ # It fails to find uninstalled libraries when the uninstalled
8582
+ # path is not listed in the libpath. Setting hardcode_minus_L
8583
+ # to unsupported forces relinking
8584
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8585
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8586
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8587
+ fi
8588
+ ;;
8589
+ esac
8590
+ shared_flag='-shared'
8591
+ if test "$aix_use_runtimelinking" = yes; then
8592
+ shared_flag="$shared_flag "'${wl}-G'
8593
+ fi
8594
+ else
8595
+ # not using gcc
8596
+ if test "$host_cpu" = ia64; then
8597
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8598
+ # chokes on -Wl,-G. The following line is correct:
8599
+ shared_flag='-G'
8600
+ else
8601
+ if test "$aix_use_runtimelinking" = yes; then
8602
+ shared_flag='${wl}-G'
8603
+ else
8604
+ shared_flag='${wl}-bM:SRE'
8605
+ fi
8606
+ fi
8607
+ fi
8608
+
8609
+ # It seems that -bexpall does not export symbols beginning with
8610
+ # underscore (_), so it is better to generate a list of symbols to export.
8611
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8612
+ if test "$aix_use_runtimelinking" = yes; then
8613
+ # Warning - without using the other runtime loading flags (-brtl),
8614
+ # -berok will link without error, but may produce a broken library.
8615
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8616
+ # Determine the default libpath from the value encoded in an empty executable.
8617
+ _LT_AC_SYS_LIBPATH_AIX
8618
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8619
+ _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"
8620
+ else
8621
+ if test "$host_cpu" = ia64; then
8622
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8623
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8624
+ _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"
8625
+ else
8626
+ # Determine the default libpath from the value encoded in an empty executable.
8627
+ _LT_AC_SYS_LIBPATH_AIX
8628
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8629
+ # Warning - without using the other run time loading flags,
8630
+ # -berok will link without error, but may produce a broken library.
8631
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8632
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8633
+ # Exported symbols can be pulled into shared objects from archives
8634
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8635
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8636
+ # This is similar to how AIX traditionally builds its shared libraries.
8637
+ _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'
8638
+ fi
8639
+ fi
8640
+ ;;
8641
+
8642
+ amigaos*)
8643
+ _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)'
8644
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8645
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8646
+ # see comment about different semantics on the GNU ld section
8647
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8648
+ ;;
8649
+
8650
+ bsdi[[45]]*)
8651
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8652
+ ;;
8653
+
8654
+ cygwin* | mingw* | pw32*)
8655
+ # When not using gcc, we currently assume that we are using
8656
+ # Microsoft Visual C++.
8657
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
8658
+ # no search path for DLLs.
8659
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8660
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8661
+ # Tell ltmain to make .lib files, not .a files.
8662
+ libext=lib
8663
+ # Tell ltmain to make .dll files, not .so files.
8664
+ shrext_cmds=".dll"
8665
+ # FIXME: Setting linknames here is a bad hack.
8666
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8667
+ # The linker will automatically build a .lib file if we build a DLL.
8668
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
8669
+ # FIXME: Should let the user specify the lib program.
8670
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
8671
+ _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
8672
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8673
+ ;;
8674
+
8675
+ darwin* | rhapsody*)
8676
+ case $host_os in
8677
+ rhapsody* | darwin1.[[012]])
8678
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8679
+ ;;
8680
+ *) # Darwin 1.3 on
8681
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8682
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8683
+ else
8684
+ case ${MACOSX_DEPLOYMENT_TARGET} in
8685
+ 10.[[012]])
8686
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8687
+ ;;
8688
+ 10.*)
8689
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
8690
+ ;;
8691
+ esac
8692
+ fi
8693
+ ;;
8694
+ esac
8695
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8696
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
8697
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8698
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8699
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
8700
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8701
+ if test "$GCC" = yes ; then
8702
+ output_verbose_link_cmd='echo'
8703
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8704
+ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8705
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
8706
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
8707
+ else
8708
+ case $cc_basename in
8709
+ xlc*)
8710
+ output_verbose_link_cmd='echo'
8711
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
8712
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8713
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8714
+ _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8715
+ _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}'
8716
+ ;;
8717
+ *)
8718
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8719
+ ;;
8720
+ esac
8721
+ fi
8722
+ ;;
8723
+
8724
+ dgux*)
8725
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8726
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8727
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8728
+ ;;
8729
+
8730
+ freebsd1*)
8731
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8732
+ ;;
8733
+
8734
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8735
+ # support. Future versions do this automatically, but an explicit c++rt0.o
8736
+ # does not break anything, and helps significantly (at the cost of a little
8737
+ # extra space).
8738
+ freebsd2.2*)
8739
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8740
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8741
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8742
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8743
+ ;;
8744
+
8745
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8746
+ freebsd2*)
8747
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8748
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8749
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8750
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8751
+ ;;
8752
+
8753
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8754
+ freebsd* | dragonfly*)
8755
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8756
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8757
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8758
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8759
+ ;;
8760
+
8761
+ hpux9*)
8762
+ if test "$GCC" = yes; then
8763
+ _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'
8764
+ else
8765
+ _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'
8766
+ fi
8767
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8768
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8769
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8770
+
8771
+ # hardcode_minus_L: Not really in the search PATH,
8772
+ # but as the default location of the library.
8773
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8774
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8775
+ ;;
8776
+
8777
+ hpux10*)
8778
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8779
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8780
+ else
8781
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8782
+ fi
8783
+ if test "$with_gnu_ld" = no; then
8784
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8785
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8786
+
8787
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8788
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8789
+
8790
+ # hardcode_minus_L: Not really in the search PATH,
8791
+ # but as the default location of the library.
8792
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8793
+ fi
8794
+ ;;
8795
+
8796
+ hpux11*)
8797
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8798
+ case $host_cpu in
8799
+ hppa*64*)
8800
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8801
+ ;;
8802
+ ia64*)
8803
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8804
+ ;;
8805
+ *)
8806
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8807
+ ;;
8808
+ esac
8809
+ else
8810
+ case $host_cpu in
8811
+ hppa*64*)
8812
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8813
+ ;;
8814
+ ia64*)
8815
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8816
+ ;;
8817
+ *)
8818
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8819
+ ;;
8820
+ esac
8821
+ fi
8822
+ if test "$with_gnu_ld" = no; then
8823
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8824
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8825
+
8826
+ case $host_cpu in
8827
+ hppa*64*|ia64*)
8828
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8829
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
8830
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8831
+ ;;
8832
+ *)
8833
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8834
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8835
+
8836
+ # hardcode_minus_L: Not really in the search PATH,
8837
+ # but as the default location of the library.
8838
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8839
+ ;;
8840
+ esac
8841
+ fi
8842
+ ;;
8843
+
8844
+ irix5* | irix6* | nonstopux*)
8845
+ if test "$GCC" = yes; then
8846
+ _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'
8847
+ else
8848
+ _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'
8849
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
8850
+ fi
8851
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8852
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8853
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8854
+ ;;
8855
+
8856
+ netbsd*)
8857
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8858
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8859
+ else
8860
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8861
+ fi
8862
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8863
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8864
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8865
+ ;;
8866
+
8867
+ newsos6)
8868
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8869
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8870
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8871
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8872
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8873
+ ;;
8874
+
8875
+ openbsd*)
8876
+ if test -f /usr/libexec/ld.so; then
8877
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8878
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8879
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8880
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8881
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8882
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8883
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8884
+ else
8885
+ case $host_os in
8886
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8887
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8888
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8889
+ ;;
8890
+ *)
8891
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8892
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8893
+ ;;
8894
+ esac
8895
+ fi
8896
+ else
8897
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
8898
+ fi
8899
+ ;;
8900
+
8901
+ os2*)
8902
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8903
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8904
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8905
+ _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'
8906
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8907
+ ;;
8908
+
8909
+ osf3*)
8910
+ if test "$GCC" = yes; then
8911
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8912
+ _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'
8913
+ else
8914
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8915
+ _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'
8916
+ fi
8917
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8918
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8919
+ ;;
8920
+
8921
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
8922
+ if test "$GCC" = yes; then
8923
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8924
+ _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'
8925
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8926
+ else
8927
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8928
+ _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'
8929
+ _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~
8930
+ $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'
8931
+
8932
+ # Both c and cxx compiler support -rpath directly
8933
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8934
+ fi
8935
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8936
+ ;;
8937
+
8938
+ solaris*)
8939
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8940
+ if test "$GCC" = yes; then
8941
+ wlarc='${wl}'
8942
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8943
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8944
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8945
+ else
8946
+ wlarc=''
8947
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8948
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8949
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8950
+ fi
8951
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8952
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8953
+ case $host_os in
8954
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8955
+ *)
8956
+ # The compiler driver will combine and reorder linker options,
8957
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
8958
+ # but is careful enough not to reorder.
8959
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
8960
+ if test "$GCC" = yes; then
8961
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8962
+ else
8963
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8964
+ fi
8965
+ ;;
8966
+ esac
8967
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8968
+ ;;
8969
+
8970
+ sunos4*)
8971
+ if test "x$host_vendor" = xsequent; then
8972
+ # Use $CC to link under sequent, because it throws in some extra .o
8973
+ # files that make .init and .fini sections work.
8974
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8975
+ else
8976
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8977
+ fi
8978
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8979
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8980
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8981
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8982
+ ;;
8983
+
8984
+ sysv4)
8985
+ case $host_vendor in
8986
+ sni)
8987
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8988
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8989
+ ;;
8990
+ siemens)
8991
+ ## LD is ld it makes a PLAMLIB
8992
+ ## CC just makes a GrossModule.
8993
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8994
+ _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8995
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
8996
+ ;;
8997
+ motorola)
8998
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8999
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9000
+ ;;
9001
+ esac
9002
+ runpath_var='LD_RUN_PATH'
9003
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9004
+ ;;
9005
+
9006
+ sysv4.3*)
9007
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9008
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9009
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9010
+ ;;
9011
+
9012
+ sysv4*MP*)
9013
+ if test -d /usr/nec; then
9014
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9015
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9016
+ runpath_var=LD_RUN_PATH
9017
+ hardcode_runpath_var=yes
9018
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9019
+ fi
9020
+ ;;
9021
+
9022
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9023
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9024
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9025
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9026
+ runpath_var='LD_RUN_PATH'
9027
+
9028
+ if test "$GCC" = yes; then
9029
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9030
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9031
+ else
9032
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9033
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9034
+ fi
9035
+ ;;
9036
+
9037
+ sysv5* | sco3.2v5* | sco5v6*)
9038
+ # Note: We can NOT use -z defs as we might desire, because we do not
9039
+ # link with -lc, and that would cause any symbols used from libc to
9040
+ # always be unresolved, which means just about no library would
9041
+ # ever link correctly. If we're not using GNU ld we use -z text
9042
+ # though, which does catch some bad symbols but isn't as heavy-handed
9043
+ # as -z defs.
9044
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9045
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9046
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9047
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9048
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
9049
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9050
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9051
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9052
+ runpath_var='LD_RUN_PATH'
9053
+
9054
+ if test "$GCC" = yes; then
9055
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9056
+ _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'
9057
+ else
9058
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9059
+ _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'
9060
+ fi
9061
+ ;;
9062
+
9063
+ uts4*)
9064
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9065
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9066
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9067
+ ;;
9068
+
9069
+ *)
9070
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
9071
+ ;;
9072
+ esac
9073
+ fi
9074
+ ])
9075
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9076
+ test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9077
+
9078
+ #
9079
+ # Do we need to explicitly link libc?
9080
+ #
9081
+ case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
9082
+ x|xyes)
9083
+ # Assume -lc should be added
9084
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9085
+
9086
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
9087
+ case $_LT_AC_TAGVAR(archive_cmds, $1) in
9088
+ *'~'*)
9089
+ # FIXME: we may have to deal with multi-command sequences.
9090
+ ;;
9091
+ '$CC '*)
9092
+ # Test whether the compiler implicitly links with -lc since on some
9093
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
9094
+ # to ld, don't add -lc before -lgcc.
9095
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
9096
+ $rm conftest*
9097
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9098
+
9099
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9100
+ soname=conftest
9101
+ lib=conftest
9102
+ libobjs=conftest.$ac_objext
9103
+ deplibs=
9104
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9105
+ pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9106
+ compiler_flags=-v
9107
+ linker_flags=-v
9108
+ verstring=
9109
+ output_objdir=.
9110
+ libname=conftest
9111
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
9112
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9113
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
9114
+ then
9115
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9116
+ else
9117
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9118
+ fi
9119
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9120
+ else
9121
+ cat conftest.err 1>&5
9122
+ fi
9123
+ $rm conftest*
9124
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
9125
+ ;;
9126
+ esac
9127
+ fi
9128
+ ;;
9129
+ esac
9130
+ ])# AC_LIBTOOL_PROG_LD_SHLIBS
9131
+
9132
+
9133
+ # _LT_AC_FILE_LTDLL_C
9134
+ # -------------------
9135
+ # Be careful that the start marker always follows a newline.
9136
+ AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
9137
+ # /* ltdll.c starts here */
9138
+ # #define WIN32_LEAN_AND_MEAN
9139
+ # #include <windows.h>
9140
+ # #undef WIN32_LEAN_AND_MEAN
9141
+ # #include <stdio.h>
9142
+ #
9143
+ # #ifndef __CYGWIN__
9144
+ # # ifdef __CYGWIN32__
9145
+ # # define __CYGWIN__ __CYGWIN32__
9146
+ # # endif
9147
+ # #endif
9148
+ #
9149
+ # #ifdef __cplusplus
9150
+ # extern "C" {
9151
+ # #endif
9152
+ # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
9153
+ # #ifdef __cplusplus
9154
+ # }
9155
+ # #endif
9156
+ #
9157
+ # #ifdef __CYGWIN__
9158
+ # #include <cygwin/cygwin_dll.h>
9159
+ # DECLARE_CYGWIN_DLL( DllMain );
9160
+ # #endif
9161
+ # HINSTANCE __hDllInstance_base;
9162
+ #
9163
+ # BOOL APIENTRY
9164
+ # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
9165
+ # {
9166
+ # __hDllInstance_base = hInst;
9167
+ # return TRUE;
9168
+ # }
9169
+ # /* ltdll.c ends here */
9170
+ ])# _LT_AC_FILE_LTDLL_C
9171
+
9172
+
9173
+ # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
9174
+ # ---------------------------------
9175
+ AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
9176
+
9177
+
9178
+ # old names
9179
+ AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
9180
+ AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9181
+ AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9182
+ AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9183
+ AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9184
+ AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
9185
+ AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
9186
+
9187
+ # This is just to silence aclocal about the macro not being used
9188
+ ifelse([AC_DISABLE_FAST_INSTALL])
9189
+
9190
+ ############################################################
9191
+ # NOTE: This macro has been submitted for inclusion into #
9192
+ # GNU Autoconf as AC_PROG_SED. When it is available in #
9193
+ # a released version of Autoconf we should remove this #
9194
+ # macro and use it instead. #
9195
+ ############################################################
9196
+ # LT_AC_PROG_SED
9197
+ # --------------
9198
+ # Check for a fully-functional sed program, that truncates
9199
+ # as few characters as possible. Prefer GNU sed if found.
9200
+ AC_DEFUN([LT_AC_PROG_SED],
9201
+ [AC_MSG_CHECKING([for a sed that does not truncate output])
9202
+ AC_CACHE_VAL(lt_cv_path_SED,
9203
+ [# Loop through the user's path and test for sed and gsed.
9204
+ # Then use that list of sed's as ones to test for truncation.
9205
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9206
+ for as_dir in $PATH
9207
+ do
9208
+ IFS=$as_save_IFS
9209
+ test -z "$as_dir" && as_dir=.
9210
+ for lt_ac_prog in sed gsed; do
9211
+ for ac_exec_ext in '' $ac_executable_extensions; do
9212
+ if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9213
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9214
+ fi
9215
+ done
9216
+ done
9217
+ done
9218
+ lt_ac_max=0
9219
+ lt_ac_count=0
9220
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9221
+ # along with /bin/sed that truncates output.
9222
+ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9223
+ test ! -f $lt_ac_sed && continue
9224
+ cat /dev/null > conftest.in
9225
+ lt_ac_count=0
9226
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9227
+ # Check for GNU sed and select it if it is found.
9228
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9229
+ lt_cv_path_SED=$lt_ac_sed
9230
+ break
9231
+ fi
9232
+ while true; do
9233
+ cat conftest.in conftest.in >conftest.tmp
9234
+ mv conftest.tmp conftest.in
9235
+ cp conftest.in conftest.nl
9236
+ echo >>conftest.nl
9237
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9238
+ cmp -s conftest.out conftest.nl || break
9239
+ # 10000 chars as input seems more than enough
9240
+ test $lt_ac_count -gt 10 && break
9241
+ lt_ac_count=`expr $lt_ac_count + 1`
9242
+ if test $lt_ac_count -gt $lt_ac_max; then
9243
+ lt_ac_max=$lt_ac_count
9244
+ lt_cv_path_SED=$lt_ac_sed
9245
+ fi
9246
+ done
9247
+ done
9248
+ ])
9249
+ SED=$lt_cv_path_SED
9250
+ AC_MSG_RESULT([$SED])
9251
+ ])
app/code/community/Meta/Cassandra/Model/Adapter/Libs/thrift/ext/thrift_protocol/autom4te.cache/output.0 ADDED
@@ -0,0 +1,14853 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @%:@! /bin/sh
2
+
3
+
4
+
5
+ # Forbidden tokens and exceptions.
6
+
7
+
8
+
9
+ # Actually reserved by M4sh.
10
+
11
+ # Wrap our cleanup prior to m4sugar's cleanup.
12
+
13
+ # All the M4sugar macros start with `m4_', except `dnl' kept as is
14
+ # for sake of simplicity.
15
+
16
+
17
+
18
+ # If __m4_version__ is defined, we assume that we are being run by M4
19
+ # 1.6 or newer, thus recursion is linear, and debugmode(+do)
20
+ # is available for faster checks of dereferencing undefined macros
21
+ # and forcing dumpdef to print to stderr regardless of debugfile.
22
+ # But if it is missing, we assume we are being run by M4 1.4.x, that
23
+ # recursion is quadratic, and that we need foreach-based
24
+ # replacement macros. Also, m4 prior to 1.4.8 loses track of location
25
+ # during m4wrap text; __line__ should never be 0.
26
+ #
27
+ # Use the raw builtin to avoid tripping up include tracing.
28
+ # Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn.
29
+ # -*- Autoconf -*-
30
+ # This file is part of Autoconf.
31
+ # foreach-based replacements for recursive functions.
32
+ # Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes
33
+ # GNU M4 1.6 by requiring more memory and macro expansions.
34
+ #
35
+ # Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
36
+
37
+ # This file is part of Autoconf. This program is free
38
+ # software; you can redistribute it and/or modify it under the
39
+ # terms of the GNU General Public License as published by the
40
+ # Free Software Foundation, either version 3 of the License, or
41
+ # (at your option) any later version.
42
+ #
43
+ # This program is distributed in the hope that it will be useful,
44
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
45
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46
+ # GNU General Public License for more details.
47
+ #
48
+ # Under Section 7 of GPL version 3, you are granted additional
49
+ # permissions described in the Autoconf Configure Script Exception,
50
+ # version 3.0, as published by the Free Software Foundation.
51
+ #
52
+ # You should have received a copy of the GNU General Public License
53
+ # and a copy of the Autoconf Configure Script Exception along with
54
+ # this program; see the files COPYINGv3 and COPYING.EXCEPTION
55
+ # respectively. If not, see <http://www.gnu.org/licenses/>.
56
+
57
+ # Written by Eric Blake.
58
+
59
+ # In M4 1.4.x, every byte of $@ is rescanned. This means that an
60
+ # algorithm on n arguments that recurses with one less argument each
61
+ # iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In
62
+ # M4 1.6, this was fixed so that $@ is only scanned once, then
63
+ # back-references are made to information stored about the scan.
64
+ # Thus, n iterations need only scan n arguments, for O(n) time.
65
+ # Additionally, in M4 1.4.x, recursive algorithms did not clean up
66
+ # memory very well, requiring O(n^2) memory rather than O(n) for n
67
+ # iterations.
68
+ #
69
+ # This file is designed to overcome the quadratic nature of $@
70
+ # recursion by writing a variant of m4_foreach that uses m4_for rather
71
+ # than $@ recursion to operate on the list. This involves more macro
72
+ # expansions, but avoids the need to rescan a quadratic number of
73
+ # arguments, making these replacements very attractive for M4 1.4.x.
74
+ # On the other hand, in any version of M4, expanding additional macros
75
+ # costs additional time; therefore, in M4 1.6, where $@ recursion uses
76
+ # fewer macros, these replacements actually pessimize performance.
77
+ # Additionally, the use of $10 to mean the tenth argument violates
78
+ # POSIX; although all versions of m4 1.4.x support this meaning, a
79
+ # future m4 version may switch to take it as the first argument
80
+ # concatenated with a literal 0, so the implementations in this file
81
+ # are not future-proof. Thus, this file is conditionally included as
82
+ # part of m4_init(), only when it is detected that M4 probably has
83
+ # quadratic behavior (ie. it lacks the macro __m4_version__).
84
+ #
85
+ # Please keep this file in sync with m4sugar.m4.
86
+
87
+ # _m4_foreach(PRE, POST, IGNORED, ARG...)
88
+ # ---------------------------------------
89
+ # Form the common basis of the m4_foreach and m4_map macros. For each
90
+ # ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion
91
+ # easier, and must be supplied rather than implicit.
92
+ #
93
+ # This version minimizes the number of times that $@ is evaluated by
94
+ # using m4_for to generate a boilerplate into _m4_f then passing $@ to
95
+ # that temporary macro. Thus, the recursion is done in m4_for without
96
+ # reparsing any user input, and is not quadratic. For an idea of how
97
+ # this works, note that m4_foreach(i,[1,2],[i]) calls
98
+ # _m4_foreach([m4_define([i],],[)i],[],[1],[2])
99
+ # which defines _m4_f:
100
+ # $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f])
101
+ # then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result:
102
+ # m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]).
103
+
104
+
105
+
106
+
107
+ # m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
108
+ # -----------------------------------------------------------
109
+ # Find the first VAL that SWITCH matches, and expand the corresponding
110
+ # IF-VAL. If there are no matches, expand DEFAULT.
111
+ #
112
+ # Use m4_for to create a temporary macro in terms of a boilerplate
113
+ # m4_if with final cleanup. If $# is even, we have DEFAULT; if it is
114
+ # odd, then rounding the last $# up in the temporary macro is
115
+ # harmless. For example, both m4_case(1,2,3,4,5) and
116
+ # m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being
117
+ # m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6])
118
+
119
+
120
+
121
+
122
+
123
+
124
+ # m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
125
+ # -----------------------------------------------------
126
+ # m4 equivalent of
127
+ #
128
+ # if (SWITCH =~ RE1)
129
+ # VAL1;
130
+ # elif (SWITCH =~ RE2)
131
+ # VAL2;
132
+ # elif ...
133
+ # ...
134
+ # else
135
+ # DEFAULT
136
+ #
137
+ # We build the temporary macro _m4_b:
138
+ # m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])...
139
+ # _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b]))
140
+ # then invoke m4_unquote(_m4_b($@)), for concatenation with later text.
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ # m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
151
+ # -------------------------------------------------------------------
152
+ # Similar to m4_if, except that each TEST is expanded when encountered.
153
+ # If the expansion of TESTn matches the string VALn, the result is IF-VALn.
154
+ # The result is DEFAULT if no tests passed. This macro allows
155
+ # short-circuiting of expensive tests, where it pays to arrange quick
156
+ # filter tests to run first.
157
+ #
158
+ # m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n.
159
+ # We only have to speed up _m4_cond, by building the temporary _m4_c:
160
+ # m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)],
161
+ # [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)],
162
+ # [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)],
163
+ # [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c]))
164
+ # We invoke m4_unquote(_m4_c($@)), for concatenation with later text.
165
+
166
+
167
+
168
+
169
+
170
+
171
+ # m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
172
+ # ----------------------------------------------------
173
+ # m4 equivalent of
174
+ #
175
+ # $_ = STRING;
176
+ # s/RE1/SUBST1/g;
177
+ # s/RE2/SUBST2/g;
178
+ # ...
179
+ #
180
+ # m4_bpatsubsts already validated an odd number of arguments; we only
181
+ # need to speed up _m4_bpatsubsts. To avoid nesting, we build the
182
+ # temporary _m4_p:
183
+ # m4_define([_m4_p], [$1])m4_define([_m4_p],
184
+ # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p],
185
+ # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],...
186
+ # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote(
187
+ # _m4_defn([_m4_p])_m4_popdef([_m4_p]))
188
+
189
+
190
+
191
+
192
+
193
+
194
+ # m4_shiftn(N, ...)
195
+ # -----------------
196
+ # Returns ... shifted N times. Useful for recursive "varargs" constructs.
197
+ #
198
+ # m4_shiftn already validated arguments; we only need to speed up
199
+ # _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as
200
+ # ,[$5],[$6],...,[$m]_m4_popdef([_m4_s])
201
+ # before calling m4_shift(_m4_s($@)).
202
+
203
+
204
+ # m4_do(STRING, ...)
205
+ # ------------------
206
+ # This macro invokes all its arguments (in sequence, of course). It is
207
+ # useful for making your macros more structured and readable by dropping
208
+ # unnecessary dnl's and have the macros indented properly.
209
+ #
210
+ # Here, we use the temporary macro _m4_do, defined as
211
+ # $1[]$2[]...[]$n[]_m4_popdef([_m4_do])
212
+
213
+
214
+ # m4_dquote_elt(ARGS)
215
+ # -------------------
216
+ # Return ARGS as an unquoted list of double-quoted arguments.
217
+ #
218
+ # _m4_foreach to the rescue.
219
+
220
+
221
+ # m4_reverse(ARGS)
222
+ # ----------------
223
+ # Output ARGS in reverse order.
224
+ #
225
+ # Invoke _m4_r($@) with the temporary _m4_r built as
226
+ # [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r])
227
+
228
+
229
+
230
+ # m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
231
+ # -------------------------------------------------------------
232
+ # Perform a pairwise grouping of consecutive ARGs, by expanding
233
+ # EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the
234
+ # final argument is expanded with END-EXPR([ARGn]).
235
+ #
236
+ # Build the temporary macro _m4_map_args_pair, with the $2([$m+1])
237
+ # only output if $# is odd:
238
+ # $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1],
239
+ # [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair])
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ # m4_join(SEP, ARG1, ARG2...)
249
+ # ---------------------------
250
+ # Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG
251
+ # is the empty string. No expansion is performed on SEP or ARGs.
252
+ #
253
+ # Use a self-modifying separator, since we don't know how many
254
+ # arguments might be skipped before a separator is first printed, but
255
+ # be careful if the separator contains $. _m4_foreach to the rescue.
256
+
257
+
258
+
259
+
260
+ # m4_joinall(SEP, ARG1, ARG2...)
261
+ # ------------------------------
262
+ # Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP.
263
+ # No expansion is performed on SEP or ARGs.
264
+ #
265
+ # A bit easier than m4_join. _m4_foreach to the rescue.
266
+
267
+
268
+ # m4_list_cmp(A, B)
269
+ # -----------------
270
+ # Compare the two lists of integer expressions A and B.
271
+ #
272
+ # m4_list_cmp takes care of any side effects; we only override
273
+ # _m4_list_cmp_raw, where we can safely expand lists multiple times.
274
+ # First, insert padding so that both lists are the same length; the
275
+ # trailing +0 is necessary to handle a missing list. Next, create a
276
+ # temporary macro to perform pairwise comparisons until an inequality
277
+ # is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as
278
+ # m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])],
279
+ # m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])],
280
+ # [0]_m4_popdef([_m4_cmp]))
281
+ # then calls _m4_cmp([1+0], [0*2], [1], [2+0])
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ # m4_max(EXPR, ...)
293
+ # m4_min(EXPR, ...)
294
+ # -----------------
295
+ # Return the decimal value of the maximum (or minimum) in a series of
296
+ # integer expressions.
297
+ #
298
+ # _m4_foreach to the rescue; we only need to replace _m4_minmax. Here,
299
+ # we need a temporary macro to track the best answer so far, so that
300
+ # the foreach expression is tractable.
301
+
302
+
303
+ # m4_set_add_all(SET, VALUE...)
304
+ # -----------------------------
305
+ # Add each VALUE into SET. This is O(n) in the number of VALUEs, and
306
+ # can be faster than calling m4_set_add for each VALUE.
307
+ #
308
+ # _m4_foreach to the rescue. If no deletions have occurred, then
309
+ # avoid the speed penalty of m4_set_add.
310
+
311
+
312
+
313
+
314
+
315
+
316
+ # Rewrite the first entry of the diversion stack.
317
+ @%:@ Guess values for system-dependent variables and create Makefiles.
318
+ @%:@ Generated by GNU Autoconf 2.68.
319
+ @%:@
320
+ @%:@
321
+ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
322
+ @%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
323
+ @%:@ Foundation, Inc.
324
+ @%:@
325
+ @%:@
326
+ @%:@ This configure script is free software; the Free Software Foundation
327
+ @%:@ gives unlimited permission to copy, distribute and modify it.
328
+ ## -------------------- ##
329
+ ## M4sh Initialization. ##
330
+ ## -------------------- ##
331
+
332
+ # Be more Bourne compatible
333
+ DUALCASE=1; export DUALCASE # for MKS sh
334
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
335
+ emulate sh
336
+ NULLCMD=:
337
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
338
+ # is contrary to our usage. Disable this feature.
339
+ alias -g '${1+"$@"}'='"$@"'
340
+ setopt NO_GLOB_SUBST
341
+ else
342
+ case `(set -o) 2>/dev/null` in @%:@(
343
+ *posix*) :
344
+ set -o posix ;; @%:@(
345
+ *) :
346
+ ;;
347
+ esac
348
+ fi
349
+
350
+
351
+ as_nl='
352
+ '
353
+ export as_nl
354
+ # Printing a long string crashes Solaris 7 /usr/bin/printf.
355
+ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
356
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
357
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
358
+ # Prefer a ksh shell builtin over an external printf program on Solaris,
359
+ # but without wasting forks for bash or zsh.
360
+ if test -z "$BASH_VERSION$ZSH_VERSION" \
361
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
362
+ as_echo='print -r --'
363
+ as_echo_n='print -rn --'
364
+ elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
365
+ as_echo='printf %s\n'
366
+ as_echo_n='printf %s'
367
+ else
368
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
369
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
370
+ as_echo_n='/usr/ucb/echo -n'
371
+ else
372
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
373
+ as_echo_n_body='eval
374
+ arg=$1;
375
+ case $arg in @%:@(
376
+ *"$as_nl"*)
377
+ expr "X$arg" : "X\\(.*\\)$as_nl";
378
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
379
+ esac;
380
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
381
+ '
382
+ export as_echo_n_body
383
+ as_echo_n='sh -c $as_echo_n_body as_echo'
384
+ fi
385
+ export as_echo_body
386
+ as_echo='sh -c $as_echo_body as_echo'
387
+ fi
388
+
389
+ # The user is always right.
390
+ if test "${PATH_SEPARATOR+set}" != set; then
391
+ PATH_SEPARATOR=:
392
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
393
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
394
+ PATH_SEPARATOR=';'
395
+ }
396
+ fi
397
+
398
+
399
+ # IFS
400
+ # We need space, tab and new line, in precisely that order. Quoting is
401
+ # there to prevent editors from complaining about space-tab.
402
+ # (If _AS_PATH_WALK were called with IFS unset, it would disable word
403
+ # splitting by setting IFS to empty value.)
404
+ IFS=" "" $as_nl"
405
+
406
+ # Find who we are. Look in the path if we contain no directory separator.
407
+ as_myself=
408
+ case $0 in @%:@((
409
+ *[\\/]* ) as_myself=$0 ;;
410
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
411
+ for as_dir in $PATH
412
+ do
413
+ IFS=$as_save_IFS
414
+ test -z "$as_dir" && as_dir=.
415
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
416
+ done
417
+ IFS=$as_save_IFS
418
+
419
+ ;;
420
+ esac
421
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
422
+ # in which case we are not to be found in the path.
423
+ if test "x$as_myself" = x; then
424
+ as_myself=$0
425
+ fi
426
+ if test ! -f "$as_myself"; then
427
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
428
+ exit 1
429
+ fi
430
+
431
+ # Unset variables that we do not need and which cause bugs (e.g. in
432
+ # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
433
+ # suppresses any "Segmentation fault" message there. '((' could
434
+ # trigger a bug in pdksh 5.2.14.
435
+ for as_var in BASH_ENV ENV MAIL MAILPATH
436
+ do eval test x\${$as_var+set} = xset \
437
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
438
+ done
439
+ PS1='$ '
440
+ PS2='> '
441
+ PS4='+ '
442
+
443
+ # NLS nuisances.
444
+ LC_ALL=C
445
+ export LC_ALL
446
+ LANGUAGE=C
447
+ export LANGUAGE
448
+
449
+ # CDPATH.
450
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
451
+
452
+ if test "x$CONFIG_SHELL" = x; then
453
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
454
+ emulate sh
455
+ NULLCMD=:
456
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
457
+ # is contrary to our usage. Disable this feature.
458
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
459
+ setopt NO_GLOB_SUBST
460
+ else
461
+ case \`(set -o) 2>/dev/null\` in @%:@(
462
+ *posix*) :
463
+ set -o posix ;; @%:@(
464
+ *) :
465
+ ;;
466
+ esac
467
+ fi
468
+ "
469
+ as_required="as_fn_return () { (exit \$1); }
470
+ as_fn_success () { as_fn_return 0; }
471
+ as_fn_failure () { as_fn_return 1; }
472
+ as_fn_ret_success () { return 0; }
473
+ as_fn_ret_failure () { return 1; }
474
+
475
+ exitcode=0
476
+ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
477
+ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
478
+ as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
479
+ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
480
+ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
481
+
482
+ else
483
+ exitcode=1; echo positional parameters were not saved.
484
+ fi
485
+ test x\$exitcode = x0 || exit 1"
486
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
487
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
488
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
489
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
490
+ test \$(( 1 + 1 )) = 2 || exit 1"
491
+ if (eval "$as_required") 2>/dev/null; then :
492
+ as_have_required=yes
493
+ else
494
+ as_have_required=no
495
+ fi
496
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
497
+
498
+ else
499
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
500
+ as_found=false
501
+ for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
502
+ do
503
+ IFS=$as_save_IFS
504
+ test -z "$as_dir" && as_dir=.
505
+ as_found=:
506
+ case $as_dir in @%:@(
507
+ /*)
508
+ for as_base in sh bash ksh sh5; do
509
+ # Try only shells that exist, to save several forks.
510
+ as_shell=$as_dir/$as_base
511
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
512
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
513
+ CONFIG_SHELL=$as_shell as_have_required=yes
514
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
515
+ break 2
516
+ fi
517
+ fi
518
+ done;;
519
+ esac
520
+ as_found=false
521
+ done
522
+ $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
523
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
524
+ CONFIG_SHELL=$SHELL as_have_required=yes
525
+ fi; }
526
+ IFS=$as_save_IFS
527
+
528
+
529
+ if test "x$CONFIG_SHELL" != x; then :
530
+ # We cannot yet assume a decent shell, so we have to provide a
531
+ # neutralization value for shells without unset; and this also
532
+ # works around shells that cannot unset nonexistent variables.
533
+ # Preserve -v and -x to the replacement shell.
534
+ BASH_ENV=/dev/null
535
+ ENV=/dev/null
536
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
537
+ export CONFIG_SHELL
538
+ case $- in @%:@ ((((
539
+ *v*x* | *x*v* ) as_opts=-vx ;;
540
+ *v* ) as_opts=-v ;;
541
+ *x* ) as_opts=-x ;;
542
+ * ) as_opts= ;;
543
+ esac
544
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
545
+ fi
546
+
547
+ if test x$as_have_required = xno; then :
548
+ $as_echo "$0: This script requires a shell more modern than all"
549
+ $as_echo "$0: the shells that I found on your system."
550
+ if test x${ZSH_VERSION+set} = xset ; then
551
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
552
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
553
+ else
554
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
555
+ $0: including any error possibly output before this
556
+ $0: message. Then install a modern shell, or manually run
557
+ $0: the script under such a shell if you do have one."
558
+ fi
559
+ exit 1
560
+ fi
561
+ fi
562
+ fi
563
+ SHELL=${CONFIG_SHELL-/bin/sh}
564
+ export SHELL
565
+ # Unset more variables known to interfere with behavior of common tools.
566
+ CLICOLOR_FORCE= GREP_OPTIONS=
567
+ unset CLICOLOR_FORCE GREP_OPTIONS
568
+
569
+ ## --------------------- ##
570
+ ## M4sh Shell Functions. ##
571
+ ## --------------------- ##
572
+ @%:@ as_fn_unset VAR
573
+ @%:@ ---------------
574
+ @%:@ Portably unset VAR.
575
+ as_fn_unset ()
576
+ {
577
+ { eval $1=; unset $1;}
578
+ }
579
+ as_unset=as_fn_unset
580
+
581
+ @%:@ as_fn_set_status STATUS
582
+ @%:@ -----------------------
583
+ @%:@ Set @S|@? to STATUS, without forking.
584
+ as_fn_set_status ()
585
+ {
586
+ return $1
587
+ } @%:@ as_fn_set_status
588
+
589
+ @%:@ as_fn_exit STATUS
590
+ @%:@ -----------------
591
+ @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
592
+ as_fn_exit ()
593
+ {
594
+ set +e
595
+ as_fn_set_status $1
596
+ exit $1
597
+ } @%:@ as_fn_exit
598
+
599
+ @%:@ as_fn_mkdir_p
600
+ @%:@ -------------
601
+ @%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
602
+ as_fn_mkdir_p ()
603
+ {
604
+
605
+ case $as_dir in #(
606
+ -*) as_dir=./$as_dir;;
607
+ esac
608
+ test -d "$as_dir" || eval $as_mkdir_p || {
609
+ as_dirs=
610
+ while :; do
611
+ case $as_dir in #(
612
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
613
+ *) as_qdir=$as_dir;;
614
+ esac
615
+ as_dirs="'$as_qdir' $as_dirs"
616
+ as_dir=`$as_dirname -- "$as_dir" ||
617
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
618
+ X"$as_dir" : 'X\(//\)[^/]' \| \
619
+ X"$as_dir" : 'X\(//\)$' \| \
620
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
621
+ $as_echo X"$as_dir" |
622
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
623
+ s//\1/
624
+ q
625
+ }
626
+ /^X\(\/\/\)[^/].*/{
627
+ s//\1/
628
+ q
629
+ }
630
+ /^X\(\/\/\)$/{
631
+ s//\1/
632
+ q
633
+ }
634
+ /^X\(\/\).*/{
635
+ s//\1/
636
+ q
637
+ }
638
+ s/.*/./; q'`
639
+ test -d "$as_dir" && break
640
+ done
641
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
642
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
643
+
644
+
645
+ } @%:@ as_fn_mkdir_p
646
+ @%:@ as_fn_append VAR VALUE
647
+ @%:@ ----------------------
648
+ @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
649
+ @%:@ advantage of any shell optimizations that allow amortized linear growth over
650
+ @%:@ repeated appends, instead of the typical quadratic growth present in naive
651
+ @%:@ implementations.
652
+ if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
653
+ eval 'as_fn_append ()
654
+ {
655
+ eval $1+=\$2
656
+ }'
657
+ else
658
+ as_fn_append ()
659
+ {
660
+ eval $1=\$$1\$2
661
+ }
662
+ fi # as_fn_append
663
+
664
+ @%:@ as_fn_arith ARG...
665
+ @%:@ ------------------
666
+ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
667
+ @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
668
+ @%:@ must be portable across @S|@(()) and expr.
669
+ if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
670
+ eval 'as_fn_arith ()
671
+ {
672
+ as_val=$(( $* ))
673
+ }'
674
+ else
675
+ as_fn_arith ()
676
+ {
677
+ as_val=`expr "$@" || test $? -eq 1`
678
+ }
679
+ fi # as_fn_arith
680
+
681
+
682
+ @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
683
+ @%:@ ----------------------------------------
684
+ @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
685
+ @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
686
+ @%:@ script with STATUS, using 1 if that was 0.
687
+ as_fn_error ()
688
+ {
689
+ as_status=$1; test $as_status -eq 0 && as_status=1
690
+ if test "$4"; then
691
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
692
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
693
+ fi
694
+ $as_echo "$as_me: error: $2" >&2
695
+ as_fn_exit $as_status
696
+ } @%:@ as_fn_error
697
+
698
+ if expr a : '\(a\)' >/dev/null 2>&1 &&
699
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
700
+ as_expr=expr
701
+ else
702
+ as_expr=false
703
+ fi
704
+
705
+ if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
706
+ as_basename=basename
707
+ else
708
+ as_basename=false
709
+ fi
710
+
711
+ if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
712
+ as_dirname=dirname
713
+ else
714
+ as_dirname=false
715
+ fi
716
+
717
+ as_me=`$as_basename -- "$0" ||
718
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
719
+ X"$0" : 'X\(//\)$' \| \
720
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
721
+ $as_echo X/"$0" |
722
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
723
+ s//\1/
724
+ q
725
+ }
726
+ /^X\/\(\/\/\)$/{
727
+ s//\1/
728
+ q
729
+ }
730
+ /^X\/\(\/\).*/{
731
+ s//\1/
732
+ q
733
+ }
734
+ s/.*/./; q'`
735
+
736
+ # Avoid depending upon Character Ranges.
737
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
738
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
739
+ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
740
+ as_cr_digits='0123456789'
741
+ as_cr_alnum=$as_cr_Letters$as_cr_digits
742
+
743
+
744
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
745
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
746
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
747
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
748
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
749
+ sed -n '
750
+ p
751
+ /[$]LINENO/=
752
+ ' <$as_myself |
753
+ sed '
754
+ s/[$]LINENO.*/&-/
755
+ t lineno
756
+ b
757
+ :lineno
758
+ N
759
+ :loop
760
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
761
+ t loop
762
+ s/-\n.*//
763
+ ' >$as_me.lineno &&
764
+ chmod +x "$as_me.lineno" ||
765
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
766
+
767
+ # Don't try to exec as it changes $[0], causing all sort of problems
768
+ # (the dirname of $[0] is not the place where we might find the
769
+ # original and so on. Autoconf is especially sensitive to this).
770
+ . "./$as_me.lineno"
771
+ # Exit status is that of the last command.
772
+ exit
773
+ }
774
+
775
+ ECHO_C= ECHO_N= ECHO_T=
776
+ case `echo -n x` in @%:@(((((
777
+ -n*)
778
+ case `echo 'xy\c'` in
779
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
780
+ xy) ECHO_C='\c';;
781
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
782
+ ECHO_T=' ';;
783
+ esac;;
784
+ *)
785
+ ECHO_N='-n';;
786
+ esac
787
+
788
+ rm -f conf$$ conf$$.exe conf$$.file
789
+ if test -d conf$$.dir; then
790
+ rm -f conf$$.dir/conf$$.file
791
+ else
792
+ rm -f conf$$.dir
793
+ mkdir conf$$.dir 2>/dev/null
794
+ fi
795
+ if (echo >conf$$.file) 2>/dev/null; then
796
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
797
+ as_ln_s='ln -s'
798
+ # ... but there are two gotchas:
799
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
800
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
801
+ # In both cases, we have to default to `cp -p'.
802
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
803
+ as_ln_s='cp -p'
804
+ elif ln conf$$.file conf$$ 2>/dev/null; then
805
+ as_ln_s=ln
806
+ else
807
+ as_ln_s='cp -p'
808
+ fi
809
+ else
810
+ as_ln_s='cp -p'
811
+ fi
812
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
813
+ rmdir conf$$.dir 2>/dev/null
814
+
815
+ if mkdir -p . 2>/dev/null; then
816
+ as_mkdir_p='mkdir -p "$as_dir"'
817
+ else
818
+ test -d ./-p && rmdir ./-p
819
+ as_mkdir_p=false
820
+ fi
821
+
822
+ if test -x / >/dev/null 2>&1; then
823
+ as_test_x='test -x'
824
+ else
825
+ if ls -dL / >/dev/null 2>&1; then
826
+ as_ls_L_option=L
827
+ else
828
+ as_ls_L_option=
829
+ fi
830
+ as_test_x='
831
+ eval sh -c '\''
832
+ if test -d "$1"; then
833
+ test -d "$1/.";
834
+ else
835
+ case $1 in @%:@(
836
+ -*)set "./$1";;
837
+ esac;
838
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
839
+ ???[sx]*):;;*)false;;esac;fi
840
+ '\'' sh
841
+ '
842
+ fi
843
+ as_executable_p=$as_test_x
844
+
845
+ # Sed expression to map a string onto a valid CPP name.
846
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
847
+
848
+ # Sed expression to map a string onto a valid variable name.
849
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
850
+
851
+
852
+
853
+ # Check that we are running under the correct shell.
854
+ SHELL=${CONFIG_SHELL-/bin/sh}
855
+
856
+ case X$ECHO in
857
+ X*--fallback-echo)
858
+ # Remove one level of quotation (which was required for Make).
859
+ ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
860
+ ;;
861
+ esac
862
+
863
+ echo=${ECHO-echo}
864
+ if test "X$1" = X--no-reexec; then
865
+ # Discard the --no-reexec flag, and continue.
866
+ shift
867
+ elif test "X$1" = X--fallback-echo; then
868
+ # Avoid inline document here, it may be left over
869
+ :
870
+ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
871
+ # Yippee, $echo works!
872
+ :
873
+ else
874
+ # Restart under the correct shell.
875
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
876
+ fi
877
+
878
+ if test "X$1" = X--fallback-echo; then
879
+ # used as fallback echo
880
+ shift
881
+ cat <<EOF
882
+ $*
883
+ EOF
884
+ exit 0
885
+ fi
886
+
887
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
888
+ # if CDPATH is set.
889
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
890
+
891
+ if test -z "$ECHO"; then
892
+ if test "X${echo_test_string+set}" != Xset; then
893
+ # find a string as large as possible, as long as the shell can cope with it
894
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
895
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
896
+ if (echo_test_string=`eval $cmd`) 2>/dev/null &&
897
+ echo_test_string=`eval $cmd` &&
898
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
899
+ then
900
+ break
901
+ fi
902
+ done
903
+ fi
904
+
905
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
906
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
907
+ test "X$echo_testing_string" = "X$echo_test_string"; then
908
+ :
909
+ else
910
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
911
+ # backslashes. This makes it impossible to quote backslashes using
912
+ # echo "$something" | sed 's/\\/\\\\/g'
913
+ #
914
+ # So, first we look for a working echo in the user's PATH.
915
+
916
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
917
+ for dir in $PATH /usr/ucb; do
918
+ IFS="$lt_save_ifs"
919
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
920
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
921
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
922
+ test "X$echo_testing_string" = "X$echo_test_string"; then
923
+ echo="$dir/echo"
924
+ break
925
+ fi
926
+ done
927
+ IFS="$lt_save_ifs"
928
+
929
+ if test "X$echo" = Xecho; then
930
+ # We didn't find a better echo, so look for alternatives.
931
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
932
+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
933
+ test "X$echo_testing_string" = "X$echo_test_string"; then
934
+ # This shell has a builtin print -r that does the trick.
935
+ echo='print -r'
936
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
937
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
938
+ # If we have ksh, try running configure again with it.
939
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
940
+ export ORIGINAL_CONFIG_SHELL
941
+ CONFIG_SHELL=/bin/ksh
942
+ export CONFIG_SHELL
943
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
944
+ else
945
+ # Try using printf.
946
+ echo='printf %s\n'
947
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
948
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
949
+ test "X$echo_testing_string" = "X$echo_test_string"; then
950
+ # Cool, printf works
951
+ :
952
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
953
+ test "X$echo_testing_string" = 'X\t' &&
954
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
955
+ test "X$echo_testing_string" = "X$echo_test_string"; then
956
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
957
+ export CONFIG_SHELL
958
+ SHELL="$CONFIG_SHELL"
959
+ export SHELL
960
+ echo="$CONFIG_SHELL $0 --fallback-echo"
961
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
962
+ test "X$echo_testing_string" = 'X\t' &&
963
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
964
+ test "X$echo_testing_string" = "X$echo_test_string"; then
965
+ echo="$CONFIG_SHELL $0 --fallback-echo"
966
+ else
967
+ # maybe with a smaller string...
968
+ prev=:
969
+
970
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
971
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
972
+ then
973
+ break
974
+ fi
975
+ prev="$cmd"
976
+ done
977
+
978
+ if test "$prev" != 'sed 50q "$0"'; then
979
+ echo_test_string=`eval $prev`
980
+ export echo_test_string
981
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
982
+ else
983
+ # Oops. We lost completely, so just stick with echo.
984
+ echo=echo
985
+ fi
986
+ fi
987
+ fi
988
+ fi
989
+ fi
990
+ fi
991
+
992
+ # Copy echo and quote the copy suitably for passing to libtool from
993
+ # the Makefile, instead of quoting the original, which is used later.
994
+ ECHO=$echo
995
+ if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
996
+ ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
997
+ fi
998
+
999
+
1000
+
1001
+
1002
+ tagnames=${tagnames+${tagnames},}CXX
1003
+
1004
+ test -n "$DJDIR" || exec 7<&0 </dev/null
1005
+ exec 6>&1
1006
+
1007
+ # Name of the host.
1008
+ # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
1009
+ # so uname gets run too.
1010
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
1011
+
1012
+ #
1013
+ # Initializations.
1014
+ #
1015
+ ac_default_prefix=/usr/local
1016
+ ac_clean_files=
1017
+ ac_config_libobj_dir=.
1018
+ LIB@&t@OBJS=
1019
+ cross_compiling=no
1020
+ subdirs=
1021
+ MFLAGS=
1022
+ MAKEFLAGS=
1023
+
1024
+ # Identity of this package.
1025
+ PACKAGE_NAME=
1026
+ PACKAGE_TARNAME=
1027
+ PACKAGE_VERSION=
1028
+ PACKAGE_STRING=
1029
+ PACKAGE_BUGREPORT=
1030
+ PACKAGE_URL=
1031
+
1032
+ ac_unique_file="config.m4"
1033
+ # Factoring default headers for most tests.
1034
+ ac_includes_default="\
1035
+ #include <stdio.h>
1036
+ #ifdef HAVE_SYS_TYPES_H
1037
+ # include <sys/types.h>
1038
+ #endif
1039
+ #ifdef HAVE_SYS_STAT_H
1040
+ # include <sys/stat.h>
1041
+ #endif
1042
+ #ifdef STDC_HEADERS
1043
+ # include <stdlib.h>
1044
+ # include <stddef.h>
1045
+ #else
1046
+ # ifdef HAVE_STDLIB_H
1047
+ # include <stdlib.h>
1048
+ # endif
1049
+ #endif
1050
+ #ifdef HAVE_STRING_H
1051
+ # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
1052
+ # include <memory.h>
1053
+ # endif
1054
+ # include <string.h>
1055
+ #endif
1056
+ #ifdef HAVE_STRINGS_H
1057
+ # include <strings.h>
1058
+ #endif
1059
+ #ifdef HAVE_INTTYPES_H
1060
+ # include <inttypes.h>
1061
+ #endif
1062
+ #ifdef HAVE_STDINT_H
1063
+ # include <stdint.h>
1064
+ #endif
1065
+ #ifdef HAVE_UNISTD_H
1066
+ # include <unistd.h>
1067
+ #endif"
1068
+
1069
+ ac_subst_vars='LTLIBOBJS
1070
+ LIB@&t@OBJS
1071
+ LIBTOOL
1072
+ NMEDIT
1073
+ DSYMUTIL
1074
+ STRIP
1075
+ RANLIB
1076
+ AR
1077
+ ECHO
1078
+ LN_S
1079
+ CXXCPP
1080
+ ac_ct_CXX
1081
+ CXXFLAGS
1082
+ CXX
1083
+ AWK
1084
+ RE2C
1085
+ SHLIB_DL_SUFFIX_NAME
1086
+ SHLIB_SUFFIX_NAME
1087
+ target_os
1088
+ target_vendor
1089
+ target_cpu
1090
+ target
1091
+ host_os
1092
+ host_vendor
1093
+ host_cpu
1094
+ host
1095
+ build_os
1096
+ build_vendor
1097
+ build_cpu
1098
+ build
1099
+ CPP
1100
+ OBJEXT
1101
+ EXEEXT
1102
+ ac_ct_CC
1103
+ CPPFLAGS
1104
+ LDFLAGS
1105
+ CFLAGS
1106
+ CC
1107
+ CONFIGURE_OPTIONS
1108
+ CONFIGURE_COMMAND
1109
+ SED
1110
+ EGREP
1111
+ GREP
1112
+ target_alias
1113
+ host_alias
1114
+ build_alias
1115
+ LIBS
1116
+ ECHO_T
1117
+ ECHO_N
1118
+ ECHO_C
1119
+ DEFS
1120
+ mandir
1121
+ localedir
1122
+ libdir
1123
+ psdir
1124
+ pdfdir
1125
+ dvidir
1126
+ htmldir
1127
+ infodir
1128
+ docdir
1129
+ oldincludedir
1130
+ includedir
1131
+ localstatedir
1132
+ sharedstatedir
1133
+ sysconfdir
1134
+ datadir
1135
+ datarootdir
1136
+ libexecdir
1137
+ sbindir
1138
+ bindir
1139
+ program_transform_name
1140
+ prefix
1141
+ exec_prefix
1142
+ PACKAGE_URL
1143
+ PACKAGE_BUGREPORT
1144
+ PACKAGE_STRING
1145
+ PACKAGE_VERSION
1146
+ PACKAGE_TARNAME
1147
+ PACKAGE_NAME
1148
+ PATH_SEPARATOR
1149
+ SHELL'
1150
+ ac_subst_files=''
1151
+ ac_user_opts='
1152
+ enable_option_checking
1153
+ with_libdir
1154
+ with_php_config
1155
+ enable_thrift_protocol
1156
+ enable_shared
1157
+ enable_static
1158
+ enable_fast_install
1159
+ with_gnu_ld
1160
+ enable_libtool_lock
1161
+ with_pic
1162
+ with_tags
1163
+ '
1164
+ ac_precious_vars='build_alias
1165
+ host_alias
1166
+ target_alias
1167
+ CC
1168
+ CFLAGS
1169
+ LDFLAGS
1170
+ LIBS
1171
+ CPPFLAGS
1172
+ CPP
1173
+ CXX
1174
+ CXXFLAGS
1175
+ CCC
1176
+ CXXCPP'
1177
+
1178
+
1179
+ # Initialize some variables set by options.
1180
+ ac_init_help=
1181
+ ac_init_version=false
1182
+ ac_unrecognized_opts=
1183
+ ac_unrecognized_sep=
1184
+ # The variables have the same names as the options, with
1185
+ # dashes changed to underlines.
1186
+ cache_file=/dev/null
1187
+ exec_prefix=NONE
1188
+ no_create=
1189
+ no_recursion=
1190
+ prefix=NONE
1191
+ program_prefix=NONE
1192
+ program_suffix=NONE
1193
+ program_transform_name=s,x,x,
1194
+ silent=
1195
+ site=
1196
+ srcdir=
1197
+ verbose=
1198
+ x_includes=NONE
1199
+ x_libraries=NONE
1200
+
1201
+ # Installation directory options.
1202
+ # These are left unexpanded so users can "make install exec_prefix=/foo"
1203
+ # and all the variables that are supposed to be based on exec_prefix
1204
+ # by default will actually change.
1205
+ # Use braces instead of parens because sh, perl, etc. also accept them.
1206
+ # (The list follows the same order as the GNU Coding Standards.)
1207
+ bindir='${exec_prefix}/bin'
1208
+ sbindir='${exec_prefix}/sbin'
1209
+ libexecdir='${exec_prefix}/libexec'
1210
+ datarootdir='${prefix}/share'
1211
+ datadir='${datarootdir}'
1212
+ sysconfdir='${prefix}/etc'
1213
+ sharedstatedir='${prefix}/com'
1214
+ localstatedir='${prefix}/var'
1215
+ includedir='${prefix}/include'
1216
+ oldincludedir='/usr/include'
1217
+ docdir='${datarootdir}/doc/${PACKAGE}'
1218
+ infodir='${datarootdir}/info'
1219
+ htmldir='${docdir}'
1220
+ dvidir='${docdir}'
1221
+ pdfdir='${docdir}'
1222
+ psdir='${docdir}'
1223
+ libdir='${exec_prefix}/lib'
1224
+ localedir='${datarootdir}/locale'
1225
+ mandir='${datarootdir}/man'
1226
+
1227
+ ac_prev=
1228
+ ac_dashdash=
1229
+ for ac_option
1230
+ do
1231
+ # If the previous option needs an argument, assign it.
1232
+ if test -n "$ac_prev"; then
1233
+ eval $ac_prev=\$ac_option
1234
+ ac_prev=
1235
+ continue
1236
+ fi
1237
+
1238
+ case $ac_option in
1239
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1240
+ *=) ac_optarg= ;;
1241
+ *) ac_optarg=yes ;;
1242
+ esac
1243
+
1244
+ # Accept the important Cygnus configure options, so we can diagnose typos.
1245
+
1246
+ case $ac_dashdash$ac_option in
1247
+ --)
1248
+ ac_dashdash=yes ;;
1249
+
1250
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
1251
+ ac_prev=bindir ;;
1252
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1253
+ bindir=$ac_optarg ;;
1254
+
1255
+ -build | --build | --buil | --bui | --bu)
1256
+ ac_prev=build_alias ;;
1257
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1258
+ build_alias=$ac_optarg ;;
1259
+
1260
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
1261
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1262
+ ac_prev=cache_file ;;
1263
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1264
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1265
+ cache_file=$ac_optarg ;;
1266
+
1267
+ --config-cache | -C)
1268
+ cache_file=config.cache ;;
1269
+
1270
+ -datadir | --datadir | --datadi | --datad)
1271
+ ac_prev=datadir ;;
1272
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
1273
+ datadir=$ac_optarg ;;
1274
+
1275
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1276
+ | --dataroo | --dataro | --datar)
1277
+ ac_prev=datarootdir ;;
1278
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1279
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1280
+ datarootdir=$ac_optarg ;;
1281
+
1282
+ -disable-* | --disable-*)
1283
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1284
+ # Reject names that are not valid shell variable names.
1285
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1286
+ as_fn_error $? "invalid feature name: $ac_useropt"
1287
+ ac_useropt_orig=$ac_useropt
1288
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1289
+ case $ac_user_opts in
1290
+ *"
1291
+ "enable_$ac_useropt"
1292
+ "*) ;;
1293
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1294
+ ac_unrecognized_sep=', ';;
1295
+ esac
1296
+ eval enable_$ac_useropt=no ;;
1297
+
1298
+ -docdir | --docdir | --docdi | --doc | --do)
1299
+ ac_prev=docdir ;;
1300
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1301
+ docdir=$ac_optarg ;;
1302
+
1303
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1304
+ ac_prev=dvidir ;;
1305
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1306
+ dvidir=$ac_optarg ;;
1307
+
1308
+ -enable-* | --enable-*)
1309
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1310
+ # Reject names that are not valid shell variable names.
1311
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1312
+ as_fn_error $? "invalid feature name: $ac_useropt"
1313
+ ac_useropt_orig=$ac_useropt
1314
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1315
+ case $ac_user_opts in
1316
+ *"
1317
+ "enable_$ac_useropt"
1318
+ "*) ;;
1319
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1320
+ ac_unrecognized_sep=', ';;
1321
+ esac
1322
+ eval enable_$ac_useropt=\$ac_optarg ;;
1323
+
1324
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1325
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1326
+ | --exec | --exe | --ex)
1327
+ ac_prev=exec_prefix ;;
1328
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1329
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1330
+ | --exec=* | --exe=* | --ex=*)
1331
+ exec_prefix=$ac_optarg ;;
1332
+
1333
+ -gas | --gas | --ga | --g)
1334
+ # Obsolete; use --with-gas.
1335
+ with_gas=yes ;;
1336
+
1337
+ -help | --help | --hel | --he | -h)
1338
+ ac_init_help=long ;;
1339
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1340
+ ac_init_help=recursive ;;
1341
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1342
+ ac_init_help=short ;;
1343
+
1344
+ -host | --host | --hos | --ho)
1345
+ ac_prev=host_alias ;;
1346
+ -host=* | --host=* | --hos=* | --ho=*)
1347
+ host_alias=$ac_optarg ;;
1348
+
1349
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1350
+ ac_prev=htmldir ;;
1351
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1352
+ | --ht=*)
1353
+ htmldir=$ac_optarg ;;
1354
+
1355
+ -includedir | --includedir | --includedi | --included | --include \
1356
+ | --includ | --inclu | --incl | --inc)
1357
+ ac_prev=includedir ;;
1358
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1359
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
1360
+ includedir=$ac_optarg ;;
1361
+
1362
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
1363
+ ac_prev=infodir ;;
1364
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1365
+ infodir=$ac_optarg ;;
1366
+
1367
+ -libdir | --libdir | --libdi | --libd)
1368
+ ac_prev=libdir ;;
1369
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
1370
+ libdir=$ac_optarg ;;
1371
+
1372
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1373
+ | --libexe | --libex | --libe)
1374
+ ac_prev=libexecdir ;;
1375
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1376
+ | --libexe=* | --libex=* | --libe=*)
1377
+ libexecdir=$ac_optarg ;;
1378
+
1379
+ -localedir | --localedir | --localedi | --localed | --locale)
1380
+ ac_prev=localedir ;;
1381
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1382
+ localedir=$ac_optarg ;;
1383
+
1384
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
1385
+ | --localstate | --localstat | --localsta | --localst | --locals)
1386
+ ac_prev=localstatedir ;;
1387
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1388
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1389
+ localstatedir=$ac_optarg ;;
1390
+
1391
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1392
+ ac_prev=mandir ;;
1393
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1394
+ mandir=$ac_optarg ;;
1395
+
1396
+ -nfp | --nfp | --nf)
1397
+ # Obsolete; use --without-fp.
1398
+ with_fp=no ;;
1399
+
1400
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1401
+ | --no-cr | --no-c | -n)
1402
+ no_create=yes ;;
1403
+
1404
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1405
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1406
+ no_recursion=yes ;;
1407
+
1408
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1409
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1410
+ | --oldin | --oldi | --old | --ol | --o)
1411
+ ac_prev=oldincludedir ;;
1412
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1413
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1414
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1415
+ oldincludedir=$ac_optarg ;;
1416
+
1417
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1418
+ ac_prev=prefix ;;
1419
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1420
+ prefix=$ac_optarg ;;
1421
+
1422
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
1423
+ | --program-pre | --program-pr | --program-p)
1424
+ ac_prev=program_prefix ;;
1425
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
1426
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1427
+ program_prefix=$ac_optarg ;;
1428
+
1429
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
1430
+ | --program-suf | --program-su | --program-s)
1431
+ ac_prev=program_suffix ;;
1432
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
1433
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1434
+ program_suffix=$ac_optarg ;;
1435
+
1436
+ -program-transform-name | --program-transform-name \
1437
+ | --program-transform-nam | --program-transform-na \
1438
+ | --program-transform-n | --program-transform- \
1439
+ | --program-transform | --program-transfor \
1440
+ | --program-transfo | --program-transf \
1441
+ | --program-trans | --program-tran \
1442
+ | --progr-tra | --program-tr | --program-t)
1443
+ ac_prev=program_transform_name ;;
1444
+ -program-transform-name=* | --program-transform-name=* \
1445
+ | --program-transform-nam=* | --program-transform-na=* \
1446
+ | --program-transform-n=* | --program-transform-=* \
1447
+ | --program-transform=* | --program-transfor=* \
1448
+ | --program-transfo=* | --program-transf=* \
1449
+ | --program-trans=* | --program-tran=* \
1450
+ | --progr-tra=* | --program-tr=* | --program-t=*)
1451
+ program_transform_name=$ac_optarg ;;
1452
+
1453
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1454
+ ac_prev=pdfdir ;;
1455
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1456
+ pdfdir=$ac_optarg ;;
1457
+
1458
+ -psdir | --psdir | --psdi | --psd | --ps)
1459
+ ac_prev=psdir ;;
1460
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1461
+ psdir=$ac_optarg ;;
1462
+
1463
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1464
+ | -silent | --silent | --silen | --sile | --sil)
1465
+ silent=yes ;;
1466
+
1467
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1468
+ ac_prev=sbindir ;;
1469
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1470
+ | --sbi=* | --sb=*)
1471
+ sbindir=$ac_optarg ;;
1472
+
1473
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
1474
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1475
+ | --sharedst | --shareds | --shared | --share | --shar \
1476
+ | --sha | --sh)
1477
+ ac_prev=sharedstatedir ;;
1478
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1479
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1480
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1481
+ | --sha=* | --sh=*)
1482
+ sharedstatedir=$ac_optarg ;;
1483
+
1484
+ -site | --site | --sit)
1485
+ ac_prev=site ;;
1486
+ -site=* | --site=* | --sit=*)
1487
+ site=$ac_optarg ;;
1488
+
1489
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1490
+ ac_prev=srcdir ;;
1491
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1492
+ srcdir=$ac_optarg ;;
1493
+
1494
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1495
+ | --syscon | --sysco | --sysc | --sys | --sy)
1496
+ ac_prev=sysconfdir ;;
1497
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1498
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1499
+ sysconfdir=$ac_optarg ;;
1500
+
1501
+ -target | --target | --targe | --targ | --tar | --ta | --t)
1502
+ ac_prev=target_alias ;;
1503
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1504
+ target_alias=$ac_optarg ;;
1505
+
1506
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
1507
+ verbose=yes ;;
1508
+
1509
+ -version | --version | --versio | --versi | --vers | -V)
1510
+ ac_init_version=: ;;
1511
+
1512
+ -with-* | --with-*)
1513
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1514
+ # Reject names that are not valid shell variable names.
1515
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1516
+ as_fn_error $? "invalid package name: $ac_useropt"
1517
+ ac_useropt_orig=$ac_useropt
1518
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1519
+ case $ac_user_opts in
1520
+ *"
1521
+ "with_$ac_useropt"
1522
+ "*) ;;
1523
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1524
+ ac_unrecognized_sep=', ';;
1525
+ esac
1526
+ eval with_$ac_useropt=\$ac_optarg ;;
1527
+
1528
+ -without-* | --without-*)
1529
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1530
+ # Reject names that are not valid shell variable names.
1531
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1532
+ as_fn_error $? "invalid package name: $ac_useropt"
1533
+ ac_useropt_orig=$ac_useropt
1534
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1535
+ case $ac_user_opts in
1536
+ *"
1537
+ "with_$ac_useropt"
1538
+ "*) ;;
1539
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1540
+ ac_unrecognized_sep=', ';;
1541
+ esac
1542
+ eval with_$ac_useropt=no ;;
1543
+
1544
+ --x)
1545
+ # Obsolete; use --with-x.
1546
+ with_x=yes ;;
1547
+
1548
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1549
+ | --x-incl | --x-inc | --x-in | --x-i)
1550
+ ac_prev=x_includes ;;
1551
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1552
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1553
+ x_includes=$ac_optarg ;;
1554
+
1555
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
1556
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1557
+ ac_prev=x_libraries ;;
1558
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1559
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1560
+ x_libraries=$ac_optarg ;;
1561
+
1562
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
1563
+ Try \`$0 --help' for more information"
1564
+ ;;
1565
+
1566
+ *=*)
1567
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1568
+ # Reject names that are not valid shell variable names.
1569
+ case $ac_envvar in #(
1570
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
1571
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1572
+ esac
1573
+ eval $ac_envvar=\$ac_optarg
1574
+ export $ac_envvar ;;
1575
+
1576
+ *)
1577
+ # FIXME: should be removed in autoconf 3.0.
1578
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1579
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1580
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1581
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1582
+ ;;
1583
+
1584
+ esac
1585
+ done
1586
+
1587
+ if test -n "$ac_prev"; then
1588
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1589
+ as_fn_error $? "missing argument to $ac_option"
1590
+ fi
1591
+
1592
+ if test -n "$ac_unrecognized_opts"; then
1593
+ case $enable_option_checking in
1594
+ no) ;;
1595
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1596
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1597
+ esac
1598
+ fi
1599
+
1600
+ # Check all directory arguments for consistency.
1601
+ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1602
+ datadir sysconfdir sharedstatedir localstatedir includedir \
1603
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1604
+ libdir localedir mandir
1605
+ do
1606
+ eval ac_val=\$$ac_var
1607
+ # Remove trailing slashes.
1608
+ case $ac_val in
1609
+ */ )
1610
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1611
+ eval $ac_var=\$ac_val;;
1612
+ esac
1613
+ # Be sure to have absolute directory names.
1614
+ case $ac_val in
1615
+ [\\/$]* | ?:[\\/]* ) continue;;
1616
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1617
+ esac
1618
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1619
+ done
1620
+
1621
+ # There might be people who depend on the old broken behavior: `$host'
1622
+ # used to hold the argument of --host etc.
1623
+ # FIXME: To remove some day.
1624
+ build=$build_alias
1625
+ host=$host_alias
1626
+ target=$target_alias
1627
+
1628
+ # FIXME: To remove some day.
1629
+ if test "x$host_alias" != x; then
1630
+ if test "x$build_alias" = x; then
1631
+ cross_compiling=maybe
1632
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1633
+ If a cross compiler is detected then cross compile mode will be used" >&2
1634
+ elif test "x$build_alias" != "x$host_alias"; then
1635
+ cross_compiling=yes
1636
+ fi
1637
+ fi
1638
+
1639
+ ac_tool_prefix=
1640
+ test -n "$host_alias" && ac_tool_prefix=$host_alias-
1641
+
1642
+ test "$silent" = yes && exec 6>/dev/null
1643
+
1644
+
1645
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
1646
+ ac_ls_di=`ls -di .` &&
1647
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1648
+ as_fn_error $? "working directory cannot be determined"
1649
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1650
+ as_fn_error $? "pwd does not report name of working directory"
1651
+
1652
+
1653
+ # Find the source files, if location was not specified.
1654
+ if test -z "$srcdir"; then
1655
+ ac_srcdir_defaulted=yes
1656
+ # Try the directory containing this script, then the parent directory.
1657
+ ac_confdir=`$as_dirname -- "$as_myself" ||
1658
+ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1659
+ X"$as_myself" : 'X\(//\)[^/]' \| \
1660
+ X"$as_myself" : 'X\(//\)$' \| \
1661
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1662
+ $as_echo X"$as_myself" |
1663
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1664
+ s//\1/
1665
+ q
1666
+ }
1667
+ /^X\(\/\/\)[^/].*/{
1668
+ s//\1/
1669
+ q
1670
+ }
1671
+ /^X\(\/\/\)$/{
1672
+ s//\1/
1673
+ q
1674
+ }
1675
+ /^X\(\/\).*/{
1676
+ s//\1/
1677
+ q
1678
+ }
1679
+ s/.*/./; q'`
1680
+ srcdir=$ac_confdir
1681
+ if test ! -r "$srcdir/$ac_unique_file"; then
1682
+ srcdir=..
1683
+ fi
1684
+ else
1685
+ ac_srcdir_defaulted=no
1686
+ fi
1687
+ if test ! -r "$srcdir/$ac_unique_file"; then
1688
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1689
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1690
+ fi
1691
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1692
+ ac_abs_confdir=`(
1693
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1694
+ pwd)`
1695
+ # When building in place, set srcdir=.
1696
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
1697
+ srcdir=.
1698
+ fi
1699
+ # Remove unnecessary trailing slashes from srcdir.
1700
+ # Double slashes in file names in object file debugging info
1701
+ # mess up M-x gdb in Emacs.
1702
+ case $srcdir in
1703
+ */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1704
+ esac
1705
+ for ac_var in $ac_precious_vars; do
1706
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
1707
+ eval ac_env_${ac_var}_value=\$${ac_var}
1708
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1709
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
1710
+ done
1711
+
1712
+ #
1713
+ # Report the --help message.
1714
+ #
1715
+ if test "$ac_init_help" = "long"; then
1716
+ # Omit some internal or obsolete options to make the list less imposing.
1717
+ # This message is too long to be a string in the A/UX 3.1 sh.
1718
+ cat <<_ACEOF
1719
+ \`configure' configures this package to adapt to many kinds of systems.
1720
+
1721
+ Usage: $0 [OPTION]... [VAR=VALUE]...
1722
+
1723
+ To assign environment variables (e.g., CC, CFLAGS...), specify them as
1724
+ VAR=VALUE. See below for descriptions of some of the useful variables.
1725
+
1726
+ Defaults for the options are specified in brackets.
1727
+
1728
+ Configuration:
1729
+ -h, --help display this help and exit
1730
+ --help=short display options specific to this package
1731
+ --help=recursive display the short help of all the included packages
1732
+ -V, --version display version information and exit
1733
+ -q, --quiet, --silent do not print \`checking ...' messages
1734
+ --cache-file=FILE cache test results in FILE [disabled]
1735
+ -C, --config-cache alias for \`--cache-file=config.cache'
1736
+ -n, --no-create do not create output files
1737
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
1738
+
1739
+ Installation directories:
1740
+ --prefix=PREFIX install architecture-independent files in PREFIX
1741
+ @<:@@S|@ac_default_prefix@:>@
1742
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1743
+ @<:@PREFIX@:>@
1744
+
1745
+ By default, \`make install' will install all the files in
1746
+ \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1747
+ an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1748
+ for instance \`--prefix=\$HOME'.
1749
+
1750
+ For better control, use the options below.
1751
+
1752
+ Fine tuning of the installation directories:
1753
+ --bindir=DIR user executables [EPREFIX/bin]
1754
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
1755
+ --libexecdir=DIR program executables [EPREFIX/libexec]
1756
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1757
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1758
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1759
+ --libdir=DIR object code libraries [EPREFIX/lib]
1760
+ --includedir=DIR C header files [PREFIX/include]
1761
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
1762
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1763
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1764
+ --infodir=DIR info documentation [DATAROOTDIR/info]
1765
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1766
+ --mandir=DIR man documentation [DATAROOTDIR/man]
1767
+ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@
1768
+ --htmldir=DIR html documentation [DOCDIR]
1769
+ --dvidir=DIR dvi documentation [DOCDIR]
1770
+ --pdfdir=DIR pdf documentation [DOCDIR]
1771
+ --psdir=DIR ps documentation [DOCDIR]
1772
+ _ACEOF
1773
+
1774
+ cat <<\_ACEOF
1775
+
1776
+ System types:
1777
+ --build=BUILD configure for building on BUILD [guessed]
1778
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
1779
+ --target=TARGET configure for building compilers for TARGET [HOST]
1780
+ _ACEOF
1781
+ fi
1782
+
1783
+ if test -n "$ac_init_help"; then
1784
+
1785
+ cat <<\_ACEOF
1786
+
1787
+ Optional Features:
1788
+ --disable-option-checking ignore unrecognized --enable/--with options
1789
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1790
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1791
+ --enable-thrift_protocol Enable the fbthrift_protocol extension
1792
+ --enable-shared=PKGS build shared libraries default=yes
1793
+ --enable-static=PKGS build static libraries default=yes
1794
+ --enable-fast-install=PKGS optimize for fast installation default=yes
1795
+ --disable-libtool-lock avoid locking (might break parallel builds)
1796
+
1797
+ Optional Packages:
1798
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1799
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1800
+ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib
1801
+ --with-php-config=PATH Path to php-config php-config
1802
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
1803
+ --with-pic try to use only PIC/non-PIC objects default=use both
1804
+ --with-tags=TAGS include additional configurations automatic
1805
+
1806
+
1807
+ Some influential environment variables:
1808
+ CC C compiler command
1809
+ CFLAGS C compiler flags
1810
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1811
+ nonstandard directory <lib dir>
1812
+ LIBS libraries to pass to the linker, e.g. -l<library>
1813
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1814
+ you have headers in a nonstandard directory <include dir>
1815
+ CPP C preprocessor
1816
+ CXX C++ compiler command
1817
+ CXXFLAGS C++ compiler flags
1818
+ CXXCPP C++ preprocessor
1819
+
1820
+ Use these variables to override the choices made by `configure' or to help
1821
+ it to find libraries and programs with nonstandard names/locations.
1822
+
1823
+ Report bugs to the package provider.
1824
+ _ACEOF
1825
+ ac_status=$?
1826
+ fi
1827
+
1828
+ if test "$ac_init_help" = "recursive"; then
1829
+ # If there are subdirs, report their specific --help.
1830
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1831
+ test -d "$ac_dir" ||
1832
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1833
+ continue
1834
+ ac_builddir=.
1835
+
1836
+ case "$ac_dir" in
1837
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1838
+ *)
1839
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1840
+ # A ".." for each directory in $ac_dir_suffix.
1841
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1842
+ case $ac_top_builddir_sub in
1843
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1844
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1845
+ esac ;;
1846
+ esac
1847
+ ac_abs_top_builddir=$ac_pwd
1848
+ ac_abs_builddir=$ac_pwd$ac_dir_suffix
1849
+ # for backward compatibility:
1850
+ ac_top_builddir=$ac_top_build_prefix
1851
+
1852
+ case $srcdir in
1853
+ .) # We are building in place.
1854
+ ac_srcdir=.
1855
+ ac_top_srcdir=$ac_top_builddir_sub
1856
+ ac_abs_top_srcdir=$ac_pwd ;;
1857
+ [\\/]* | ?:[\\/]* ) # Absolute name.
1858
+ ac_srcdir=$srcdir$ac_dir_suffix;
1859
+ ac_top_srcdir=$srcdir
1860
+ ac_abs_top_srcdir=$srcdir ;;
1861
+ *) # Relative name.
1862
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1863
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
1864
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1865
+ esac
1866
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1867
+
1868
+ cd "$ac_dir" || { ac_status=$?; continue; }
1869
+ # Check for guested configure.
1870
+ if test -f "$ac_srcdir/configure.gnu"; then
1871
+ echo &&
1872
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1873
+ elif test -f "$ac_srcdir/configure"; then
1874
+ echo &&
1875
+ $SHELL "$ac_srcdir/configure" --help=recursive
1876
+ else
1877
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1878
+ fi || ac_status=$?
1879
+ cd "$ac_pwd" || { ac_status=$?; break; }
1880
+ done
1881
+ fi
1882
+
1883
+ test -n "$ac_init_help" && exit $ac_status
1884
+ if $ac_init_version; then
1885
+ cat <<\_ACEOF
1886
+ configure
1887
+ generated by GNU Autoconf 2.68
1888
+
1889
+ Copyright (C) 2010 Free Software Foundation, Inc.
1890
+ This configure script is free software; the Free Software Foundation
1891
+ gives unlimited permission to copy, distribute and modify it.
1892
+ _ACEOF
1893
+ exit
1894
+ fi
1895
+
1896
+ ## ------------------------ ##
1897
+ ## Autoconf initialization. ##
1898
+ ## ------------------------ ##
1899
+
1900
+ @%:@ ac_fn_c_try_compile LINENO
1901
+ @%:@ --------------------------
1902
+ @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
1903
+ ac_fn_c_try_compile ()
1904
+ {
1905
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906
+ rm -f conftest.$ac_objext
1907
+ if { { ac_try="$ac_compile"
1908
+ case "(($ac_try" in
1909
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1910
+ *) ac_try_echo=$ac_try;;
1911
+ esac
1912
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1913
+ $as_echo "$ac_try_echo"; } >&5
1914
+ (eval "$ac_compile") 2>conftest.err
1915
+ ac_status=$?
1916
+ if test -s conftest.err; then
1917
+ grep -v '^ *+' conftest.err >conftest.er1
1918
+ cat conftest.er1 >&5
1919
+ mv -f conftest.er1 conftest.err
1920
+ fi
1921
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922
+ test $ac_status = 0; } && {
1923
+ test -z "$ac_c_werror_flag" ||
1924
+ test ! -s conftest.err
1925
+ } && test -s conftest.$ac_objext; then :
1926
+ ac_retval=0
1927
+ else
1928
+ $as_echo "$as_me: failed program was:" >&5
1929
+ sed 's/^/| /' conftest.$ac_ext >&5
1930
+
1931
+ ac_retval=1
1932
+ fi
1933
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1934
+ as_fn_set_status $ac_retval
1935
+
1936
+ } @%:@ ac_fn_c_try_compile
1937
+
1938
+ @%:@ ac_fn_c_try_cpp LINENO
1939
+ @%:@ ----------------------
1940
+ @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
1941
+ ac_fn_c_try_cpp ()
1942
+ {
1943
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
1945
+ case "(($ac_try" in
1946
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947
+ *) ac_try_echo=$ac_try;;
1948
+ esac
1949
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950
+ $as_echo "$ac_try_echo"; } >&5
1951
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1952
+ ac_status=$?
1953
+ if test -s conftest.err; then
1954
+ grep -v '^ *+' conftest.err >conftest.er1
1955
+ cat conftest.er1 >&5
1956
+ mv -f conftest.er1 conftest.err
1957
+ fi
1958
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1959
+ test $ac_status = 0; } > conftest.i && {
1960
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1961
+ test ! -s conftest.err
1962
+ }; then :
1963
+ ac_retval=0
1964
+ else
1965
+ $as_echo "$as_me: failed program was:" >&5
1966
+ sed 's/^/| /' conftest.$ac_ext >&5
1967
+
1968
+ ac_retval=1
1969
+ fi
1970
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971
+ as_fn_set_status $ac_retval
1972
+
1973
+ } @%:@ ac_fn_c_try_cpp
1974
+
1975
+ @%:@ ac_fn_c_try_link LINENO
1976
+ @%:@ -----------------------
1977
+ @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded.
1978
+ ac_fn_c_try_link ()
1979
+ {
1980
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981
+ rm -f conftest.$ac_objext conftest$ac_exeext
1982
+ if { { ac_try="$ac_link"
1983
+ case "(($ac_try" in
1984
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1985
+ *) ac_try_echo=$ac_try;;
1986
+ esac
1987
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1988
+ $as_echo "$ac_try_echo"; } >&5
1989
+ (eval "$ac_link") 2>conftest.err
1990
+ ac_status=$?
1991
+ if test -s conftest.err; then
1992
+ grep -v '^ *+' conftest.err >conftest.er1
1993
+ cat conftest.er1 >&5
1994
+ mv -f conftest.er1 conftest.err
1995
+ fi
1996
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1997
+ test $ac_status = 0; } && {
1998
+ test -z "$ac_c_werror_flag" ||
1999
+ test ! -s conftest.err
2000
+ } && test -s conftest$ac_exeext && {
2001
+ test "$cross_compiling" = yes ||
2002
+ $as_test_x conftest$ac_exeext
2003
+ }; then :
2004
+ ac_retval=0
2005
+ else
2006
+ $as_echo "$as_me: failed program was:" >&5
2007
+ sed 's/^/| /' conftest.$ac_ext >&5
2008
+
2009
+ ac_retval=1
2010
+ fi
2011
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2012
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2013
+ # interfere with the next link command; also delete a directory that is
2014
+ # left behind by Apple's compiler. We do this before executing the actions.
2015
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2016
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2017
+ as_fn_set_status $ac_retval
2018
+
2019
+ } @%:@ ac_fn_c_try_link
2020
+
2021
+ @%:@ ac_fn_cxx_try_compile LINENO
2022
+ @%:@ ----------------------------
2023
+ @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
2024
+ ac_fn_cxx_try_compile ()
2025
+ {
2026
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027
+ rm -f conftest.$ac_objext
2028
+ if { { ac_try="$ac_compile"
2029
+ case "(($ac_try" in
2030
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031
+ *) ac_try_echo=$ac_try;;
2032
+ esac
2033
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034
+ $as_echo "$ac_try_echo"; } >&5
2035
+ (eval "$ac_compile") 2>conftest.err
2036
+ ac_status=$?
2037
+ if test -s conftest.err; then
2038
+ grep -v '^ *+' conftest.err >conftest.er1
2039
+ cat conftest.er1 >&5
2040
+ mv -f conftest.er1 conftest.err
2041
+ fi
2042
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043
+ test $ac_status = 0; } && {
2044
+ test -z "$ac_cxx_werror_flag" ||
2045
+ test ! -s conftest.err
2046
+ } && test -s conftest.$ac_objext; then :
2047
+ ac_retval=0
2048
+ else
2049
+ $as_echo "$as_me: failed program was:" >&5
2050
+ sed 's/^/| /' conftest.$ac_ext >&5
2051
+
2052
+ ac_retval=1
2053
+ fi
2054
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2055
+ as_fn_set_status $ac_retval
2056
+
2057
+ } @%:@ ac_fn_cxx_try_compile
2058
+
2059
+ @%:@ ac_fn_cxx_try_cpp LINENO
2060
+ @%:@ ------------------------
2061
+ @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
2062
+ ac_fn_cxx_try_cpp ()
2063
+ {
2064
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
2066
+ case "(($ac_try" in
2067
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2068
+ *) ac_try_echo=$ac_try;;
2069
+ esac
2070
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2071
+ $as_echo "$ac_try_echo"; } >&5
2072
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2073
+ ac_status=$?
2074
+ if test -s conftest.err; then
2075
+ grep -v '^ *+' conftest.err >conftest.er1
2076
+ cat conftest.er1 >&5
2077
+ mv -f conftest.er1 conftest.err
2078
+ fi
2079
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2080
+ test $ac_status = 0; } > conftest.i && {
2081
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2082
+ test ! -s conftest.err
2083
+ }; then :
2084
+ ac_retval=0
2085
+ else
2086
+ $as_echo "$as_me: failed program was:" >&5
2087
+ sed 's/^/| /' conftest.$ac_ext >&5
2088
+
2089
+ ac_retval=1
2090
+ fi
2091
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2092
+ as_fn_set_status $ac_retval
2093
+
2094
+ } @%:@ ac_fn_cxx_try_cpp
2095
+
2096
+ @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2097
+ @%:@ -------------------------------------------------------
2098
+ @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using
2099
+ @%:@ the include files in INCLUDES and setting the cache variable VAR
2100
+ @%:@ accordingly.
2101
+ ac_fn_c_check_header_mongrel ()
2102
+ {
2103
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104
+ if eval \${$3+:} false; then :
2105
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106
+ $as_echo_n "checking for $2... " >&6; }
2107
+ if eval \${$3+:} false; then :
2108
+ $as_echo_n "(cached) " >&6
2109
+ fi
2110
+ eval ac_res=\$$3
2111
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2112
+ $as_echo "$ac_res" >&6; }
2113
+ else
2114
+ # Is the header compilable?
2115
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2116
+ $as_echo_n "checking $2 usability... " >&6; }
2117
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118
+ /* end confdefs.h. */
2119
+ $4
2120
+ @%:@include <$2>
2121
+ _ACEOF
2122
+ if ac_fn_c_try_compile "$LINENO"; then :
2123
+ ac_header_compiler=yes
2124
+ else
2125
+ ac_header_compiler=no
2126
+ fi
2127
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2129
+ $as_echo "$ac_header_compiler" >&6; }
2130
+
2131
+ # Is the header present?
2132
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2133
+ $as_echo_n "checking $2 presence... " >&6; }
2134
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135
+ /* end confdefs.h. */
2136
+ @%:@include <$2>
2137
+ _ACEOF
2138
+ if ac_fn_c_try_cpp "$LINENO"; then :
2139
+ ac_header_preproc=yes
2140
+ else
2141
+ ac_header_preproc=no
2142
+ fi
2143
+ rm -f conftest.err conftest.i conftest.$ac_ext
2144
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2145
+ $as_echo "$ac_header_preproc" >&6; }
2146
+
2147
+ # So? What about this header?
2148
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2149
+ yes:no: )
2150
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2151
+ $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2152
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2153
+ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2154
+ ;;
2155
+ no:yes:* )
2156
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2157
+ $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2158
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2159
+ $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2160
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2161
+ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2162
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2163
+ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2164
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2165
+ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2166
+ ;;
2167
+ esac
2168
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2169
+ $as_echo_n "checking for $2... " >&6; }
2170
+ if eval \${$3+:} false; then :
2171
+ $as_echo_n "(cached) " >&6
2172
+ else
2173
+ eval "$3=\$ac_header_compiler"
2174
+ fi
2175
+ eval ac_res=\$$3
2176
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2177
+ $as_echo "$ac_res" >&6; }
2178
+ fi
2179
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2180
+
2181
+ } @%:@ ac_fn_c_check_header_mongrel
2182
+
2183
+ @%:@ ac_fn_c_try_run LINENO
2184
+ @%:@ ----------------------
2185
+ @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes
2186
+ @%:@ that executables *can* be run.
2187
+ ac_fn_c_try_run ()
2188
+ {
2189
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190
+ if { { ac_try="$ac_link"
2191
+ case "(($ac_try" in
2192
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2193
+ *) ac_try_echo=$ac_try;;
2194
+ esac
2195
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2196
+ $as_echo "$ac_try_echo"; } >&5
2197
+ (eval "$ac_link") 2>&5
2198
+ ac_status=$?
2199
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2200
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2201
+ { { case "(($ac_try" in
2202
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203
+ *) ac_try_echo=$ac_try;;
2204
+ esac
2205
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206
+ $as_echo "$ac_try_echo"; } >&5
2207
+ (eval "$ac_try") 2>&5
2208
+ ac_status=$?
2209
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2210
+ test $ac_status = 0; }; }; then :
2211
+ ac_retval=0
2212
+ else
2213
+ $as_echo "$as_me: program exited with status $ac_status" >&5
2214
+ $as_echo "$as_me: failed program was:" >&5
2215
+ sed 's/^/| /' conftest.$ac_ext >&5
2216
+
2217
+ ac_retval=$ac_status
2218
+ fi
2219
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2220
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2221
+ as_fn_set_status $ac_retval
2222
+
2223
+ } @%:@ ac_fn_c_try_run
2224
+
2225
+ @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2226
+ @%:@ -------------------------------------------------------
2227
+ @%:@ Tests whether HEADER exists and can be compiled using the include files in
2228
+ @%:@ INCLUDES, setting the cache variable VAR accordingly.
2229
+ ac_fn_c_check_header_compile ()
2230
+ {
2231
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2233
+ $as_echo_n "checking for $2... " >&6; }
2234
+ if eval \${$3+:} false; then :
2235
+ $as_echo_n "(cached) " >&6
2236
+ else
2237
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238
+ /* end confdefs.h. */
2239
+ $4
2240
+ @%:@include <$2>
2241
+ _ACEOF
2242
+ if ac_fn_c_try_compile "$LINENO"; then :
2243
+ eval "$3=yes"
2244
+ else
2245
+ eval "$3=no"
2246
+ fi
2247
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248
+ fi
2249
+ eval ac_res=\$$3
2250
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2251
+ $as_echo "$ac_res" >&6; }
2252
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253
+
2254
+ } @%:@ ac_fn_c_check_header_compile
2255
+
2256
+ @%:@ ac_fn_c_check_func LINENO FUNC VAR
2257
+ @%:@ ----------------------------------
2258
+ @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly
2259
+ ac_fn_c_check_func ()
2260
+ {
2261
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2263
+ $as_echo_n "checking for $2... " >&6; }
2264
+ if eval \${$3+:} false; then :
2265
+ $as_echo_n "(cached) " >&6
2266
+ else
2267
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268
+ /* end confdefs.h. */
2269
+ /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2270
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
2271
+ #define $2 innocuous_$2
2272
+
2273
+ /* System header to define __stub macros and hopefully few prototypes,
2274
+ which can conflict with char $2 (); below.
2275
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2276
+ <limits.h> exists even on freestanding compilers. */
2277
+
2278
+ #ifdef __STDC__
2279
+ # include <limits.h>
2280
+ #else
2281
+ # include <assert.h>
2282
+ #endif
2283
+
2284
+ #undef $2
2285
+
2286
+ /* Override any GCC internal prototype to avoid an error.
2287
+ Use char because int might match the return type of a GCC
2288
+ builtin and then its argument prototype would still apply. */
2289
+ #ifdef __cplusplus
2290
+ extern "C"
2291
+ #endif
2292
+ char $2 ();
2293
+ /* The GNU C library defines this for functions which it implements
2294
+ to always fail with ENOSYS. Some functions are actually named
2295
+ something starting with __ and the normal name is an alias. */
2296
+ #if defined __stub_$2 || defined __stub___$2
2297
+ choke me
2298
+ #endif
2299
+
2300
+ int
2301
+ main ()
2302
+ {
2303
+ return $2 ();
2304
+ ;
2305
+ return 0;
2306
+ }
2307
+ _ACEOF
2308
+ if ac_fn_c_try_link "$LINENO"; then :
2309
+ eval "$3=yes"
2310
+ else
2311
+ eval "$3=no"
2312
+ fi
2313
+ rm -f core conftest.err conftest.$ac_objext \
2314
+ conftest$ac_exeext conftest.$ac_ext
2315
+ fi
2316
+ eval ac_res=\$$3
2317
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2318
+ $as_echo "$ac_res" >&6; }
2319
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2320
+
2321
+ } @%:@ ac_fn_c_check_func
2322
+ cat >config.log <<_ACEOF
2323
+ This file contains any messages produced by compilers while
2324
+ running configure, to aid debugging if configure makes a mistake.
2325
+
2326
+ It was created by $as_me, which was
2327
+ generated by GNU Autoconf 2.68. Invocation command line was
2328
+
2329
+ $ $0 $@
2330
+
2331
+ _ACEOF
2332
+ exec 5>>config.log
2333
+ {
2334
+ cat <<_ASUNAME
2335
+ ## --------- ##
2336
+ ## Platform. ##
2337
+ ## --------- ##
2338
+
2339
+ hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2340
+ uname -m = `(uname -m) 2>/dev/null || echo unknown`
2341
+ uname -r = `(uname -r) 2>/dev/null || echo unknown`
2342
+ uname -s = `(uname -s) 2>/dev/null || echo unknown`
2343
+ uname -v = `(uname -v) 2>/dev/null || echo unknown`
2344
+
2345
+ /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2346
+ /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2347
+
2348
+ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2349
+ /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2350
+ /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2351
+ /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2352
+ /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2353
+ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2354
+ /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2355
+
2356
+ _ASUNAME
2357
+
2358
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2359
+ for as_dir in $PATH
2360
+ do
2361
+ IFS=$as_save_IFS
2362
+ test -z "$as_dir" && as_dir=.
2363
+ $as_echo "PATH: $as_dir"
2364
+ done
2365
+ IFS=$as_save_IFS
2366
+
2367
+ } >&5
2368
+
2369
+ cat >&5 <<_ACEOF
2370
+
2371
+
2372
+ ## ----------- ##
2373
+ ## Core tests. ##
2374
+ ## ----------- ##
2375
+
2376
+ _ACEOF
2377
+
2378
+
2379
+ # Keep a trace of the command line.
2380
+ # Strip out --no-create and --no-recursion so they do not pile up.
2381
+ # Strip out --silent because we don't want to record it for future runs.
2382
+ # Also quote any args containing shell meta-characters.
2383
+ # Make two passes to allow for proper duplicate-argument suppression.
2384
+ ac_configure_args=
2385
+ ac_configure_args0=
2386
+ ac_configure_args1=
2387
+ ac_must_keep_next=false
2388
+ for ac_pass in 1 2
2389
+ do
2390
+ for ac_arg
2391
+ do
2392
+ case $ac_arg in
2393
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2394
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2395
+ | -silent | --silent | --silen | --sile | --sil)
2396
+ continue ;;
2397
+ *\'*)
2398
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2399
+ esac
2400
+ case $ac_pass in
2401
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2402
+ 2)
2403
+ as_fn_append ac_configure_args1 " '$ac_arg'"
2404
+ if test $ac_must_keep_next = true; then
2405
+ ac_must_keep_next=false # Got value, back to normal.
2406
+ else
2407
+ case $ac_arg in
2408
+ *=* | --config-cache | -C | -disable-* | --disable-* \
2409
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2410
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2411
+ | -with-* | --with-* | -without-* | --without-* | --x)
2412
+ case "$ac_configure_args0 " in
2413
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2414
+ esac
2415
+ ;;
2416
+ -* ) ac_must_keep_next=true ;;
2417
+ esac
2418
+ fi
2419
+ as_fn_append ac_configure_args " '$ac_arg'"
2420
+ ;;
2421
+ esac
2422
+ done
2423
+ done
2424
+ { ac_configure_args0=; unset ac_configure_args0;}
2425
+ { ac_configure_args1=; unset ac_configure_args1;}
2426
+
2427
+ # When interrupted or exit'd, cleanup temporary files, and complete
2428
+ # config.log. We remove comments because anyway the quotes in there
2429
+ # would cause problems or look ugly.
2430
+ # WARNING: Use '\'' to represent an apostrophe within the trap.
2431
+ # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2432
+ trap 'exit_status=$?
2433
+ # Save into config.log some information that might help in debugging.
2434
+ {
2435
+ echo
2436
+
2437
+ $as_echo "## ---------------- ##
2438
+ ## Cache variables. ##
2439
+ ## ---------------- ##"
2440
+ echo
2441
+ # The following way of writing the cache mishandles newlines in values,
2442
+ (
2443
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2444
+ eval ac_val=\$$ac_var
2445
+ case $ac_val in #(
2446
+ *${as_nl}*)
2447
+ case $ac_var in #(
2448
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2449
+ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2450
+ esac
2451
+ case $ac_var in #(
2452
+ _ | IFS | as_nl) ;; #(
2453
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2454
+ *) { eval $ac_var=; unset $ac_var;} ;;
2455
+ esac ;;
2456
+ esac
2457
+ done
2458
+ (set) 2>&1 |
2459
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2460
+ *${as_nl}ac_space=\ *)
2461
+ sed -n \
2462
+ "s/'\''/'\''\\\\'\'''\''/g;
2463
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2464
+ ;; #(
2465
+ *)
2466
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2467
+ ;;
2468
+ esac |
2469
+ sort
2470
+ )
2471
+ echo
2472
+
2473
+ $as_echo "## ----------------- ##
2474
+ ## Output variables. ##
2475
+ ## ----------------- ##"
2476
+ echo
2477
+ for ac_var in $ac_subst_vars
2478
+ do
2479
+ eval ac_val=\$$ac_var
2480
+ case $ac_val in
2481
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2482
+ esac
2483
+ $as_echo "$ac_var='\''$ac_val'\''"
2484
+ done | sort
2485
+ echo
2486
+
2487
+ if test -n "$ac_subst_files"; then
2488
+ $as_echo "## ------------------- ##
2489
+ ## File substitutions. ##
2490
+ ## ------------------- ##"
2491
+ echo
2492
+ for ac_var in $ac_subst_files
2493
+ do
2494
+ eval ac_val=\$$ac_var
2495
+ case $ac_val in
2496
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2497
+ esac
2498
+ $as_echo "$ac_var='\''$ac_val'\''"
2499
+ done | sort
2500
+ echo
2501
+ fi
2502
+
2503
+ if test -s confdefs.h; then
2504
+ $as_echo "## ----------- ##
2505
+ ## confdefs.h. ##
2506
+ ## ----------- ##"
2507
+ echo
2508
+ cat confdefs.h
2509
+ echo
2510
+ fi
2511
+ test "$ac_signal" != 0 &&
2512
+ $as_echo "$as_me: caught signal $ac_signal"
2513
+ $as_echo "$as_me: exit $exit_status"
2514
+ } >&5
2515
+ rm -f core *.core core.conftest.* &&
2516
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2517
+ exit $exit_status
2518
+ ' 0
2519
+ for ac_signal in 1 2 13 15; do
2520
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2521
+ done
2522
+ ac_signal=0
2523
+
2524
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
2525
+ rm -f -r conftest* confdefs.h
2526
+
2527
+ $as_echo "/* confdefs.h */" > confdefs.h
2528
+
2529
+ # Predefined preprocessor variables.
2530
+
2531
+ cat >>confdefs.h <<_ACEOF
2532
+ @%:@define PACKAGE_NAME "$PACKAGE_NAME"
2533
+ _ACEOF
2534
+
2535
+ cat >>confdefs.h <<_ACEOF
2536
+ @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2537
+ _ACEOF
2538
+
2539
+ cat >>confdefs.h <<_ACEOF
2540
+ @%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
2541
+ _ACEOF
2542
+
2543
+ cat >>confdefs.h <<_ACEOF
2544
+ @%:@define PACKAGE_STRING "$PACKAGE_STRING"
2545
+ _ACEOF
2546
+
2547
+ cat >>confdefs.h <<_ACEOF
2548
+ @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2549
+ _ACEOF
2550
+
2551
+ cat >>confdefs.h <<_ACEOF
2552
+ @%:@define PACKAGE_URL "$PACKAGE_URL"
2553
+ _ACEOF
2554
+
2555
+
2556
+ # Let the site file select an alternate cache file if it wants to.
2557
+ # Prefer an explicitly selected file to automatically selected ones.
2558
+ ac_site_file1=NONE
2559
+ ac_site_file2=NONE
2560
+ if test -n "$CONFIG_SITE"; then
2561
+ # We do not want a PATH search for config.site.
2562
+ case $CONFIG_SITE in @%:@((
2563
+ -*) ac_site_file1=./$CONFIG_SITE;;
2564
+ */*) ac_site_file1=$CONFIG_SITE;;
2565
+ *) ac_site_file1=./$CONFIG_SITE;;
2566
+ esac
2567
+ elif test "x$prefix" != xNONE; then
2568
+ ac_site_file1=$prefix/share/config.site
2569
+ ac_site_file2=$prefix/etc/config.site
2570
+ else
2571
+ ac_site_file1=$ac_default_prefix/share/config.site
2572
+ ac_site_file2=$ac_default_prefix/etc/config.site
2573
+ fi
2574
+ for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2575
+ do
2576
+ test "x$ac_site_file" = xNONE && continue
2577
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2578
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2579
+ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2580
+ sed 's/^/| /' "$ac_site_file" >&5
2581
+ . "$ac_site_file" \
2582
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2583
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2584
+ as_fn_error $? "failed to load site script $ac_site_file
2585
+ See \`config.log' for more details" "$LINENO" 5; }
2586
+ fi
2587
+ done
2588
+
2589
+ if test -r "$cache_file"; then
2590
+ # Some versions of bash will fail to source /dev/null (special files
2591
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2592
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2593
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2594
+ $as_echo "$as_me: loading cache $cache_file" >&6;}
2595
+ case $cache_file in
2596
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
2597
+ *) . "./$cache_file";;
2598
+ esac
2599
+ fi
2600
+ else
2601
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2602
+ $as_echo "$as_me: creating cache $cache_file" >&6;}
2603
+ >$cache_file
2604
+ fi
2605
+
2606
+ # Check that the precious variables saved in the cache have kept the same
2607
+ # value.
2608
+ ac_cache_corrupted=false
2609
+ for ac_var in $ac_precious_vars; do
2610
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
2611
+ eval ac_new_set=\$ac_env_${ac_var}_set
2612
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
2613
+ eval ac_new_val=\$ac_env_${ac_var}_value
2614
+ case $ac_old_set,$ac_new_set in
2615
+ set,)
2616
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2617
+ $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2618
+ ac_cache_corrupted=: ;;
2619
+ ,set)
2620
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2621
+ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2622
+ ac_cache_corrupted=: ;;
2623
+ ,);;
2624
+ *)
2625
+ if test "x$ac_old_val" != "x$ac_new_val"; then
2626
+ # differences in whitespace do not lead to failure.
2627
+ ac_old_val_w=`echo x $ac_old_val`
2628
+ ac_new_val_w=`echo x $ac_new_val`
2629
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
2630
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2631
+ $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2632
+ ac_cache_corrupted=:
2633
+ else
2634
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2635
+ $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2636
+ eval $ac_var=\$ac_old_val
2637
+ fi
2638
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2639
+ $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2640
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2641
+ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2642
+ fi;;
2643
+ esac
2644
+ # Pass precious variables to config.status.
2645
+ if test "$ac_new_set" = set; then
2646
+ case $ac_new_val in
2647
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2648
+ *) ac_arg=$ac_var=$ac_new_val ;;
2649
+ esac
2650
+ case " $ac_configure_args " in
2651
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2652
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2653
+ esac
2654
+ fi
2655
+ done
2656
+ if $ac_cache_corrupted; then
2657
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2660
+ $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2661
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2662
+ fi
2663
+ ## -------------------- ##
2664
+ ## Main body of script. ##
2665
+ ## -------------------- ##
2666
+
2667
+ ac_ext=c
2668
+ ac_cpp='$CPP $CPPFLAGS'
2669
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2670
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2671
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2672
+
2673
+
2674
+
2675
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
2676
+ $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
2677
+ if ${ac_cv_path_GREP+:} false; then :
2678
+ $as_echo_n "(cached) " >&6
2679
+ else
2680
+ if test -z "$GREP"; then
2681
+ ac_path_GREP_found=false
2682
+ # Loop through the user's path and test for each of PROGNAME-LIST
2683
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2684
+ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
2685
+ do
2686
+ IFS=$as_save_IFS
2687
+ test -z "$as_dir" && as_dir=.
2688
+ for ac_prog in grep ggrep; do
2689
+ for ac_exec_ext in '' $ac_executable_extensions; do
2690
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
2691
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
2692
+ # Check for GNU ac_path_GREP and select it if it is found.
2693
+ # Check for GNU $ac_path_GREP
2694
+ case `"$ac_path_GREP" --version 2>&1` in
2695
+ *GNU*)
2696
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
2697
+ *)
2698
+ ac_count=0
2699
+ $as_echo_n 0123456789 >"conftest.in"
2700
+ while :
2701
+ do
2702
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
2703
+ mv "conftest.tmp" "conftest.in"
2704
+ cp "conftest.in" "conftest.nl"
2705
+ $as_echo 'GREP' >> "conftest.nl"
2706
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
2707
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
2708
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
2709
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
2710
+ # Best one so far, save it but keep looking for a better one
2711
+ ac_cv_path_GREP="$ac_path_GREP"
2712
+ ac_path_GREP_max=$ac_count
2713
+ fi
2714
+ # 10*(2^10) chars as input seems more than enough
2715
+ test $ac_count -gt 10 && break
2716
+ done
2717
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
2718
+ esac
2719
+
2720
+ $ac_path_GREP_found && break 3
2721
+ done
2722
+ done
2723
+ done
2724
+ IFS=$as_save_IFS
2725
+ if test -z "$ac_cv_path_GREP"; then
2726
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2727
+ fi
2728
+ else
2729
+ ac_cv_path_GREP=$GREP
2730
+ fi
2731
+
2732
+ fi
2733
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
2734
+ $as_echo "$ac_cv_path_GREP" >&6; }
2735
+ GREP="$ac_cv_path_GREP"
2736
+
2737
+
2738
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
2739
+ $as_echo_n "checking for egrep... " >&6; }
2740
+ if ${ac_cv_path_EGREP+:} false; then :
2741
+ $as_echo_n "(cached) " >&6
2742
+ else
2743
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2744
+ then ac_cv_path_EGREP="$GREP -E"
2745
+ else
2746
+ if test -z "$EGREP"; then
2747
+ ac_path_EGREP_found=false
2748
+ # Loop through the user's path and test for each of PROGNAME-LIST
2749
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2750
+ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
2751
+ do
2752
+ IFS=$as_save_IFS
2753
+ test -z "$as_dir" && as_dir=.
2754
+ for ac_prog in egrep; do
2755
+ for ac_exec_ext in '' $ac_executable_extensions; do
2756
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
2757
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
2758
+ # Check for GNU ac_path_EGREP and select it if it is found.
2759
+ # Check for GNU $ac_path_EGREP
2760
+ case `"$ac_path_EGREP" --version 2>&1` in
2761
+ *GNU*)
2762
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
2763
+ *)
2764
+ ac_count=0
2765
+ $as_echo_n 0123456789 >"conftest.in"
2766
+ while :
2767
+ do
2768
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
2769
+ mv "conftest.tmp" "conftest.in"
2770
+ cp "conftest.in" "conftest.nl"
2771
+ $as_echo 'EGREP' >> "conftest.nl"
2772
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
2773
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
2774
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
2775
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
2776
+ # Best one so far, save it but keep looking for a better one
2777
+ ac_cv_path_EGREP="$ac_path_EGREP"
2778
+ ac_path_EGREP_max=$ac_count
2779
+ fi
2780
+ # 10*(2^10) chars as input seems more than enough
2781
+ test $ac_count -gt 10 && break
2782
+ done
2783
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
2784
+ esac
2785
+
2786
+ $ac_path_EGREP_found && break 3
2787
+ done
2788
+ done
2789
+ done
2790
+ IFS=$as_save_IFS
2791
+ if test -z "$ac_cv_path_EGREP"; then
2792
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2793
+ fi
2794
+ else
2795
+ ac_cv_path_EGREP=$EGREP
2796
+ fi
2797
+
2798
+ fi
2799
+ fi
2800
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
2801
+ $as_echo "$ac_cv_path_EGREP" >&6; }
2802
+ EGREP="$ac_cv_path_EGREP"
2803
+
2804
+
2805
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
2806
+ $as_echo_n "checking for a sed that does not truncate output... " >&6; }
2807
+ if ${lt_cv_path_SED+:} false; then :
2808
+ $as_echo_n "(cached) " >&6
2809
+ else
2810
+ # Loop through the user's path and test for sed and gsed.
2811
+ # Then use that list of sed's as ones to test for truncation.
2812
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2813
+ for as_dir in $PATH
2814
+ do
2815
+ IFS=$as_save_IFS
2816
+ test -z "$as_dir" && as_dir=.
2817
+ for lt_ac_prog in sed gsed; do
2818
+ for ac_exec_ext in '' $ac_executable_extensions; do
2819
+ if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
2820
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
2821
+ fi
2822
+ done
2823
+ done
2824
+ done
2825
+ lt_ac_max=0
2826
+ lt_ac_count=0
2827
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
2828
+ # along with /bin/sed that truncates output.
2829
+ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
2830
+ test ! -f $lt_ac_sed && continue
2831
+ cat /dev/null > conftest.in
2832
+ lt_ac_count=0
2833
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
2834
+ # Check for GNU sed and select it if it is found.
2835
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
2836
+ lt_cv_path_SED=$lt_ac_sed
2837
+ break
2838
+ fi
2839
+ while true; do
2840
+ cat conftest.in conftest.in >conftest.tmp
2841
+ mv conftest.tmp conftest.in
2842
+ cp conftest.in conftest.nl
2843
+ echo >>conftest.nl
2844
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
2845
+ cmp -s conftest.out conftest.nl || break
2846
+ # 10000 chars as input seems more than enough
2847
+ test $lt_ac_count -gt 10 && break
2848
+ lt_ac_count=`expr $lt_ac_count + 1`
2849
+ if test $lt_ac_count -gt $lt_ac_max; then
2850
+ lt_ac_max=$lt_ac_count
2851
+ lt_cv_path_SED=$lt_ac_sed
2852
+ fi
2853
+ done
2854
+ done
2855
+
2856
+ fi
2857
+
2858
+ SED=$lt_cv_path_SED
2859
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
2860
+ $as_echo "$SED" >&6; }
2861
+
2862
+
2863
+
2864
+
2865
+
2866
+
2867
+ PHP_VAR_SUBST="$PHP_VAR_SUBST EGREP"
2868
+
2869
+
2870
+
2871
+
2872
+
2873
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SED"
2874
+
2875
+
2876
+
2877
+ test -f config.nice && mv config.nice config.nice.old
2878
+ rm -f config.nice.old
2879
+ cat >config.nice<<EOF
2880
+ #! /bin/sh
2881
+ #
2882
+ # Created by configure
2883
+
2884
+ EOF
2885
+
2886
+ for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2887
+ eval val=\$$var
2888
+ if test -n "$val"; then
2889
+ echo "$var='$val' \\" >> config.nice
2890
+ fi
2891
+ done
2892
+
2893
+ echo "'$0' \\" >> config.nice
2894
+ if test `expr -- $0 : "'.*"` = 0; then
2895
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$0'"
2896
+ else
2897
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND $0"
2898
+ fi
2899
+ for arg in $ac_configure_args; do
2900
+ if test `expr -- $arg : "'.*"` = 0; then
2901
+ if test `expr -- $arg : "--.*"` = 0; then
2902
+ break;
2903
+ fi
2904
+ echo "'$arg' \\" >> config.nice
2905
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '$arg'"
2906
+ else
2907
+ if test `expr -- $arg : "'--.*"` = 0; then
2908
+ break;
2909
+ fi
2910
+ echo "$arg \\" >> config.nice
2911
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $arg"
2912
+ fi
2913
+ done
2914
+ echo '"$@"' >> config.nice
2915
+ chmod +x config.nice
2916
+ CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2917
+
2918
+
2919
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CONFIGURE_COMMAND"
2920
+
2921
+
2922
+
2923
+
2924
+
2925
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CONFIGURE_OPTIONS"
2926
+
2927
+
2928
+
2929
+
2930
+
2931
+
2932
+ test -z "$CFLAGS" && auto_cflags=1
2933
+
2934
+ abs_srcdir=`(cd $srcdir && pwd)`
2935
+ abs_builddir=`pwd`
2936
+
2937
+ ac_ext=c
2938
+ ac_cpp='$CPP $CPPFLAGS'
2939
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2940
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2941
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2942
+ if test -n "$ac_tool_prefix"; then
2943
+ for ac_prog in cc gcc
2944
+ do
2945
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2946
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2947
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2948
+ $as_echo_n "checking for $ac_word... " >&6; }
2949
+ if ${ac_cv_prog_CC+:} false; then :
2950
+ $as_echo_n "(cached) " >&6
2951
+ else
2952
+ if test -n "$CC"; then
2953
+ ac_cv_prog_CC="$CC" # Let the user override the test.
2954
+ else
2955
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2956
+ for as_dir in $PATH
2957
+ do
2958
+ IFS=$as_save_IFS
2959
+ test -z "$as_dir" && as_dir=.
2960
+ for ac_exec_ext in '' $ac_executable_extensions; do
2961
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2962
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2963
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2964
+ break 2
2965
+ fi
2966
+ done
2967
+ done
2968
+ IFS=$as_save_IFS
2969
+
2970
+ fi
2971
+ fi
2972
+ CC=$ac_cv_prog_CC
2973
+ if test -n "$CC"; then
2974
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2975
+ $as_echo "$CC" >&6; }
2976
+ else
2977
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978
+ $as_echo "no" >&6; }
2979
+ fi
2980
+
2981
+
2982
+ test -n "$CC" && break
2983
+ done
2984
+ fi
2985
+ if test -z "$CC"; then
2986
+ ac_ct_CC=$CC
2987
+ for ac_prog in cc gcc
2988
+ do
2989
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
2990
+ set dummy $ac_prog; ac_word=$2
2991
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2992
+ $as_echo_n "checking for $ac_word... " >&6; }
2993
+ if ${ac_cv_prog_ac_ct_CC+:} false; then :
2994
+ $as_echo_n "(cached) " >&6
2995
+ else
2996
+ if test -n "$ac_ct_CC"; then
2997
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2998
+ else
2999
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3000
+ for as_dir in $PATH
3001
+ do
3002
+ IFS=$as_save_IFS
3003
+ test -z "$as_dir" && as_dir=.
3004
+ for ac_exec_ext in '' $ac_executable_extensions; do
3005
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3006
+ ac_cv_prog_ac_ct_CC="$ac_prog"
3007
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3008
+ break 2
3009
+ fi
3010
+ done
3011
+ done
3012
+ IFS=$as_save_IFS
3013
+
3014
+ fi
3015
+ fi
3016
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
3017
+ if test -n "$ac_ct_CC"; then
3018
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3019
+ $as_echo "$ac_ct_CC" >&6; }
3020
+ else
3021
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3022
+ $as_echo "no" >&6; }
3023
+ fi
3024
+
3025
+
3026
+ test -n "$ac_ct_CC" && break
3027
+ done
3028
+
3029
+ if test "x$ac_ct_CC" = x; then
3030
+ CC=""
3031
+ else
3032
+ case $cross_compiling:$ac_tool_warned in
3033
+ yes:)
3034
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3035
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3036
+ ac_tool_warned=yes ;;
3037
+ esac
3038
+ CC=$ac_ct_CC
3039
+ fi
3040
+ fi
3041
+
3042
+
3043
+ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3044
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3045
+ as_fn_error $? "no acceptable C compiler found in \$PATH
3046
+ See \`config.log' for more details" "$LINENO" 5; }
3047
+
3048
+ # Provide some information about the compiler.
3049
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3050
+ set X $ac_compile
3051
+ ac_compiler=$2
3052
+ for ac_option in --version -v -V -qversion; do
3053
+ { { ac_try="$ac_compiler $ac_option >&5"
3054
+ case "(($ac_try" in
3055
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056
+ *) ac_try_echo=$ac_try;;
3057
+ esac
3058
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3059
+ $as_echo "$ac_try_echo"; } >&5
3060
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3061
+ ac_status=$?
3062
+ if test -s conftest.err; then
3063
+ sed '10a\
3064
+ ... rest of stderr output deleted ...
3065
+ 10q' conftest.err >conftest.er1
3066
+ cat conftest.er1 >&5
3067
+ fi
3068
+ rm -f conftest.er1 conftest.err
3069
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3070
+ test $ac_status = 0; }
3071
+ done
3072
+
3073
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3074
+ /* end confdefs.h. */
3075
+
3076
+ int
3077
+ main ()
3078
+ {
3079
+
3080
+ ;
3081
+ return 0;
3082
+ }
3083
+ _ACEOF
3084
+ ac_clean_files_save=$ac_clean_files
3085
+ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3086
+ # Try to create an executable without -o first, disregard a.out.
3087
+ # It will help us diagnose broken compilers, and finding out an intuition
3088
+ # of exeext.
3089
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3090
+ $as_echo_n "checking whether the C compiler works... " >&6; }
3091
+ ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3092
+
3093
+ # The possible output files:
3094
+ ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3095
+
3096
+ ac_rmfiles=
3097
+ for ac_file in $ac_files
3098
+ do
3099
+ case $ac_file in
3100
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3101
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3102
+ esac
3103
+ done
3104
+ rm -f $ac_rmfiles
3105
+
3106
+ if { { ac_try="$ac_link_default"
3107
+ case "(($ac_try" in
3108
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109
+ *) ac_try_echo=$ac_try;;
3110
+ esac
3111
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3112
+ $as_echo "$ac_try_echo"; } >&5
3113
+ (eval "$ac_link_default") 2>&5
3114
+ ac_status=$?
3115
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3116
+ test $ac_status = 0; }; then :
3117
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3118
+ # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3119
+ # in a Makefile. We should not override ac_cv_exeext if it was cached,
3120
+ # so that the user can short-circuit this test for compilers unknown to
3121
+ # Autoconf.
3122
+ for ac_file in $ac_files ''
3123
+ do
3124
+ test -f "$ac_file" || continue
3125
+ case $ac_file in
3126
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3127
+ ;;
3128
+ [ab].out )
3129
+ # We found the default executable, but exeext='' is most
3130
+ # certainly right.
3131
+ break;;
3132
+ *.* )
3133
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3134
+ then :; else
3135
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3136
+ fi
3137
+ # We set ac_cv_exeext here because the later test for it is not
3138
+ # safe: cross compilers may not add the suffix if given an `-o'
3139
+ # argument, so we may need to know it at that point already.
3140
+ # Even if this section looks crufty: it has the advantage of
3141
+ # actually working.
3142
+ break;;
3143
+ * )
3144
+ break;;
3145
+ esac
3146
+ done
3147
+ test "$ac_cv_exeext" = no && ac_cv_exeext=
3148
+
3149
+ else
3150
+ ac_file=''
3151
+ fi
3152
+ if test -z "$ac_file"; then :
3153
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3154
+ $as_echo "no" >&6; }
3155
+ $as_echo "$as_me: failed program was:" >&5
3156
+ sed 's/^/| /' conftest.$ac_ext >&5
3157
+
3158
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3160
+ as_fn_error 77 "C compiler cannot create executables
3161
+ See \`config.log' for more details" "$LINENO" 5; }
3162
+ else
3163
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3164
+ $as_echo "yes" >&6; }
3165
+ fi
3166
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3167
+ $as_echo_n "checking for C compiler default output file name... " >&6; }
3168
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3169
+ $as_echo "$ac_file" >&6; }
3170
+ ac_exeext=$ac_cv_exeext
3171
+
3172
+ rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3173
+ ac_clean_files=$ac_clean_files_save
3174
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3175
+ $as_echo_n "checking for suffix of executables... " >&6; }
3176
+ if { { ac_try="$ac_link"
3177
+ case "(($ac_try" in
3178
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3179
+ *) ac_try_echo=$ac_try;;
3180
+ esac
3181
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3182
+ $as_echo "$ac_try_echo"; } >&5
3183
+ (eval "$ac_link") 2>&5
3184
+ ac_status=$?
3185
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3186
+ test $ac_status = 0; }; then :
3187
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
3188
+ # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3189
+ # work properly (i.e., refer to `conftest.exe'), while it won't with
3190
+ # `rm'.
3191
+ for ac_file in conftest.exe conftest conftest.*; do
3192
+ test -f "$ac_file" || continue
3193
+ case $ac_file in
3194
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3195
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3196
+ break;;
3197
+ * ) break;;
3198
+ esac
3199
+ done
3200
+ else
3201
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3202
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3203
+ as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3204
+ See \`config.log' for more details" "$LINENO" 5; }
3205
+ fi
3206
+ rm -f conftest conftest$ac_cv_exeext
3207
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3208
+ $as_echo "$ac_cv_exeext" >&6; }
3209
+
3210
+ rm -f conftest.$ac_ext
3211
+ EXEEXT=$ac_cv_exeext
3212
+ ac_exeext=$EXEEXT
3213
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3214
+ /* end confdefs.h. */
3215
+ @%:@include <stdio.h>
3216
+ int
3217
+ main ()
3218
+ {
3219
+ FILE *f = fopen ("conftest.out", "w");
3220
+ return ferror (f) || fclose (f) != 0;
3221
+
3222
+ ;
3223
+ return 0;
3224
+ }
3225
+ _ACEOF
3226
+ ac_clean_files="$ac_clean_files conftest.out"
3227
+ # Check that the compiler produces executables we can run. If not, either
3228
+ # the compiler is broken, or we cross compile.
3229
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3230
+ $as_echo_n "checking whether we are cross compiling... " >&6; }
3231
+ if test "$cross_compiling" != yes; then
3232
+ { { ac_try="$ac_link"
3233
+ case "(($ac_try" in
3234
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3235
+ *) ac_try_echo=$ac_try;;
3236
+ esac
3237
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3238
+ $as_echo "$ac_try_echo"; } >&5
3239
+ (eval "$ac_link") 2>&5
3240
+ ac_status=$?
3241
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3242
+ test $ac_status = 0; }
3243
+ if { ac_try='./conftest$ac_cv_exeext'
3244
+ { { case "(($ac_try" in
3245
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3246
+ *) ac_try_echo=$ac_try;;
3247
+ esac
3248
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3249
+ $as_echo "$ac_try_echo"; } >&5
3250
+ (eval "$ac_try") 2>&5
3251
+ ac_status=$?
3252
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3253
+ test $ac_status = 0; }; }; then
3254
+ cross_compiling=no
3255
+ else
3256
+ if test "$cross_compiling" = maybe; then
3257
+ cross_compiling=yes
3258
+ else
3259
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3260
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3261
+ as_fn_error $? "cannot run C compiled programs.
3262
+ If you meant to cross compile, use \`--host'.
3263
+ See \`config.log' for more details" "$LINENO" 5; }
3264
+ fi
3265
+ fi
3266
+ fi
3267
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3268
+ $as_echo "$cross_compiling" >&6; }
3269
+
3270
+ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3271
+ ac_clean_files=$ac_clean_files_save
3272
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3273
+ $as_echo_n "checking for suffix of object files... " >&6; }
3274
+ if ${ac_cv_objext+:} false; then :
3275
+ $as_echo_n "(cached) " >&6
3276
+ else
3277
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3278
+ /* end confdefs.h. */
3279
+
3280
+ int
3281
+ main ()
3282
+ {
3283
+
3284
+ ;
3285
+ return 0;
3286
+ }
3287
+ _ACEOF
3288
+ rm -f conftest.o conftest.obj
3289
+ if { { ac_try="$ac_compile"
3290
+ case "(($ac_try" in
3291
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3292
+ *) ac_try_echo=$ac_try;;
3293
+ esac
3294
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3295
+ $as_echo "$ac_try_echo"; } >&5
3296
+ (eval "$ac_compile") 2>&5
3297
+ ac_status=$?
3298
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3299
+ test $ac_status = 0; }; then :
3300
+ for ac_file in conftest.o conftest.obj conftest.*; do
3301
+ test -f "$ac_file" || continue;
3302
+ case $ac_file in
3303
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3304
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3305
+ break;;
3306
+ esac
3307
+ done
3308
+ else
3309
+ $as_echo "$as_me: failed program was:" >&5
3310
+ sed 's/^/| /' conftest.$ac_ext >&5
3311
+
3312
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3313
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3314
+ as_fn_error $? "cannot compute suffix of object files: cannot compile
3315
+ See \`config.log' for more details" "$LINENO" 5; }
3316
+ fi
3317
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
3318
+ fi
3319
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3320
+ $as_echo "$ac_cv_objext" >&6; }
3321
+ OBJEXT=$ac_cv_objext
3322
+ ac_objext=$OBJEXT
3323
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3324
+ $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3325
+ if ${ac_cv_c_compiler_gnu+:} false; then :
3326
+ $as_echo_n "(cached) " >&6
3327
+ else
3328
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3329
+ /* end confdefs.h. */
3330
+
3331
+ int
3332
+ main ()
3333
+ {
3334
+ #ifndef __GNUC__
3335
+ choke me
3336
+ #endif
3337
+
3338
+ ;
3339
+ return 0;
3340
+ }
3341
+ _ACEOF
3342
+ if ac_fn_c_try_compile "$LINENO"; then :
3343
+ ac_compiler_gnu=yes
3344
+ else
3345
+ ac_compiler_gnu=no
3346
+ fi
3347
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3348
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
3349
+
3350
+ fi
3351
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3352
+ $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3353
+ if test $ac_compiler_gnu = yes; then
3354
+ GCC=yes
3355
+ else
3356
+ GCC=
3357
+ fi
3358
+ ac_test_CFLAGS=${CFLAGS+set}
3359
+ ac_save_CFLAGS=$CFLAGS
3360
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3361
+ $as_echo_n "checking whether $CC accepts -g... " >&6; }
3362
+ if ${ac_cv_prog_cc_g+:} false; then :
3363
+ $as_echo_n "(cached) " >&6
3364
+ else
3365
+ ac_save_c_werror_flag=$ac_c_werror_flag
3366
+ ac_c_werror_flag=yes
3367
+ ac_cv_prog_cc_g=no
3368
+ CFLAGS="-g"
3369
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3370
+ /* end confdefs.h. */
3371
+
3372
+ int
3373
+ main ()
3374
+ {
3375
+
3376
+ ;
3377
+ return 0;
3378
+ }
3379
+ _ACEOF
3380
+ if ac_fn_c_try_compile "$LINENO"; then :
3381
+ ac_cv_prog_cc_g=yes
3382
+ else
3383
+ CFLAGS=""
3384
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3385
+ /* end confdefs.h. */
3386
+
3387
+ int
3388
+ main ()
3389
+ {
3390
+
3391
+ ;
3392
+ return 0;
3393
+ }
3394
+ _ACEOF
3395
+ if ac_fn_c_try_compile "$LINENO"; then :
3396
+
3397
+ else
3398
+ ac_c_werror_flag=$ac_save_c_werror_flag
3399
+ CFLAGS="-g"
3400
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401
+ /* end confdefs.h. */
3402
+
3403
+ int
3404
+ main ()
3405
+ {
3406
+
3407
+ ;
3408
+ return 0;
3409
+ }
3410
+ _ACEOF
3411
+ if ac_fn_c_try_compile "$LINENO"; then :
3412
+ ac_cv_prog_cc_g=yes
3413
+ fi
3414
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3415
+ fi
3416
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3417
+ fi
3418
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419
+ ac_c_werror_flag=$ac_save_c_werror_flag
3420
+ fi
3421
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3422
+ $as_echo "$ac_cv_prog_cc_g" >&6; }
3423
+ if test "$ac_test_CFLAGS" = set; then
3424
+ CFLAGS=$ac_save_CFLAGS
3425
+ elif test $ac_cv_prog_cc_g = yes; then
3426
+ if test "$GCC" = yes; then
3427
+ CFLAGS="-g -O2"
3428
+ else
3429
+ CFLAGS="-g"
3430
+ fi
3431
+ else
3432
+ if test "$GCC" = yes; then
3433
+ CFLAGS="-O2"
3434
+ else
3435
+ CFLAGS=
3436
+ fi
3437
+ fi
3438
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3439
+ $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3440
+ if ${ac_cv_prog_cc_c89+:} false; then :
3441
+ $as_echo_n "(cached) " >&6
3442
+ else
3443
+ ac_cv_prog_cc_c89=no
3444
+ ac_save_CC=$CC
3445
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446
+ /* end confdefs.h. */
3447
+ #include <stdarg.h>
3448
+ #include <stdio.h>
3449
+ #include <sys/types.h>
3450
+ #include <sys/stat.h>
3451
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3452
+ struct buf { int x; };
3453
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
3454
+ static char *e (p, i)
3455
+ char **p;
3456
+ int i;
3457
+ {
3458
+ return p[i];
3459
+ }
3460
+ static char *f (char * (*g) (char **, int), char **p, ...)
3461
+ {
3462
+ char *s;
3463
+ va_list v;
3464
+ va_start (v,p);
3465
+ s = g (p, va_arg (v,int));
3466
+ va_end (v);
3467
+ return s;
3468
+ }
3469
+
3470
+ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3471
+ function prototypes and stuff, but not '\xHH' hex character constants.
3472
+ These don't provoke an error unfortunately, instead are silently treated
3473
+ as 'x'. The following induces an error, until -std is added to get
3474
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3475
+ array size at least. It's necessary to write '\x00'==0 to get something
3476
+ that's true only with -std. */
3477
+ int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3478
+
3479
+ /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3480
+ inside strings and character constants. */
3481
+ #define FOO(x) 'x'
3482
+ int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3483
+
3484
+ int test (int i, double x);
3485
+ struct s1 {int (*f) (int a);};
3486
+ struct s2 {int (*f) (double a);};
3487
+ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3488
+ int argc;
3489
+ char **argv;
3490
+ int
3491
+ main ()
3492
+ {
3493
+ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3494
+ ;
3495
+ return 0;
3496
+ }
3497
+ _ACEOF
3498
+ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3499
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3500
+ do
3501
+ CC="$ac_save_CC $ac_arg"
3502
+ if ac_fn_c_try_compile "$LINENO"; then :
3503
+ ac_cv_prog_cc_c89=$ac_arg
3504
+ fi
3505
+ rm -f core conftest.err conftest.$ac_objext
3506
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
3507
+ done
3508
+ rm -f conftest.$ac_ext
3509
+ CC=$ac_save_CC
3510
+
3511
+ fi
3512
+ # AC_CACHE_VAL
3513
+ case "x$ac_cv_prog_cc_c89" in
3514
+ x)
3515
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3516
+ $as_echo "none needed" >&6; } ;;
3517
+ xno)
3518
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3519
+ $as_echo "unsupported" >&6; } ;;
3520
+ *)
3521
+ CC="$CC $ac_cv_prog_cc_c89"
3522
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3523
+ $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3524
+ esac
3525
+ if test "x$ac_cv_prog_cc_c89" != xno; then :
3526
+
3527
+ fi
3528
+
3529
+ ac_ext=c
3530
+ ac_cpp='$CPP $CPPFLAGS'
3531
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3532
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3533
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
3534
+
3535
+
3536
+ ac_ext=c
3537
+ ac_cpp='$CPP $CPPFLAGS'
3538
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3539
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3540
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
3541
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3542
+ $as_echo_n "checking how to run the C preprocessor... " >&6; }
3543
+ # On Suns, sometimes $CPP names a directory.
3544
+ if test -n "$CPP" && test -d "$CPP"; then
3545
+ CPP=
3546
+ fi
3547
+ if test -z "$CPP"; then
3548
+ if ${ac_cv_prog_CPP+:} false; then :
3549
+ $as_echo_n "(cached) " >&6
3550
+ else
3551
+ # Double quotes because CPP needs to be expanded
3552
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3553
+ do
3554
+ ac_preproc_ok=false
3555
+ for ac_c_preproc_warn_flag in '' yes
3556
+ do
3557
+ # Use a header file that comes with gcc, so configuring glibc
3558
+ # with a fresh cross-compiler works.
3559
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3560
+ # <limits.h> exists even on freestanding compilers.
3561
+ # On the NeXT, cc -E runs the code through the compiler's parser,
3562
+ # not just through cpp. "Syntax error" is here to catch this case.
3563
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3564
+ /* end confdefs.h. */
3565
+ @%:@ifdef __STDC__
3566
+ @%:@ include <limits.h>
3567
+ @%:@else
3568
+ @%:@ include <assert.h>
3569
+ @%:@endif
3570
+ Syntax error
3571
+ _ACEOF
3572
+ if ac_fn_c_try_cpp "$LINENO"; then :
3573
+
3574
+ else
3575
+ # Broken: fails on valid input.
3576
+ continue
3577
+ fi
3578
+ rm -f conftest.err conftest.i conftest.$ac_ext
3579
+
3580
+ # OK, works on sane cases. Now check whether nonexistent headers
3581
+ # can be detected and how.
3582
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583
+ /* end confdefs.h. */
3584
+ @%:@include <ac_nonexistent.h>
3585
+ _ACEOF
3586
+ if ac_fn_c_try_cpp "$LINENO"; then :
3587
+ # Broken: success on invalid input.
3588
+ continue
3589
+ else
3590
+ # Passes both tests.
3591
+ ac_preproc_ok=:
3592
+ break
3593
+ fi
3594
+ rm -f conftest.err conftest.i conftest.$ac_ext
3595
+
3596
+ done
3597
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3598
+ rm -f conftest.i conftest.err conftest.$ac_ext
3599
+ if $ac_preproc_ok; then :
3600
+ break
3601
+ fi
3602
+
3603
+ done
3604
+ ac_cv_prog_CPP=$CPP
3605
+
3606
+ fi
3607
+ CPP=$ac_cv_prog_CPP
3608
+ else
3609
+ ac_cv_prog_CPP=$CPP
3610
+ fi
3611
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3612
+ $as_echo "$CPP" >&6; }
3613
+ ac_preproc_ok=false
3614
+ for ac_c_preproc_warn_flag in '' yes
3615
+ do
3616
+ # Use a header file that comes with gcc, so configuring glibc
3617
+ # with a fresh cross-compiler works.
3618
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3619
+ # <limits.h> exists even on freestanding compilers.
3620
+ # On the NeXT, cc -E runs the code through the compiler's parser,
3621
+ # not just through cpp. "Syntax error" is here to catch this case.
3622
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3623
+ /* end confdefs.h. */
3624
+ @%:@ifdef __STDC__
3625
+ @%:@ include <limits.h>
3626
+ @%:@else
3627
+ @%:@ include <assert.h>
3628
+ @%:@endif
3629
+ Syntax error
3630
+ _ACEOF
3631
+ if ac_fn_c_try_cpp "$LINENO"; then :
3632
+
3633
+ else
3634
+ # Broken: fails on valid input.
3635
+ continue
3636
+ fi
3637
+ rm -f conftest.err conftest.i conftest.$ac_ext
3638
+
3639
+ # OK, works on sane cases. Now check whether nonexistent headers
3640
+ # can be detected and how.
3641
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3642
+ /* end confdefs.h. */
3643
+ @%:@include <ac_nonexistent.h>
3644
+ _ACEOF
3645
+ if ac_fn_c_try_cpp "$LINENO"; then :
3646
+ # Broken: success on invalid input.
3647
+ continue
3648
+ else
3649
+ # Passes both tests.
3650
+ ac_preproc_ok=:
3651
+ break
3652
+ fi
3653
+ rm -f conftest.err conftest.i conftest.$ac_ext
3654
+
3655
+ done
3656
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3657
+ rm -f conftest.i conftest.err conftest.$ac_ext
3658
+ if $ac_preproc_ok; then :
3659
+
3660
+ else
3661
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3662
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3663
+ as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3664
+ See \`config.log' for more details" "$LINENO" 5; }
3665
+ fi
3666
+
3667
+ ac_ext=c
3668
+ ac_cpp='$CPP $CPPFLAGS'
3669
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3670
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3671
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
3672
+
3673
+
3674
+
3675
+ ICC="no"
3676
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc" >&5
3677
+ $as_echo_n "checking for icc... " >&6; }
3678
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3679
+ /* end confdefs.h. */
3680
+ __INTEL_COMPILER
3681
+ _ACEOF
3682
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3683
+ $EGREP "^__INTEL_COMPILER" >/dev/null 2>&1; then :
3684
+ ICC="no"
3685
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686
+ $as_echo "no" >&6; }
3687
+ else
3688
+ ICC="yes"
3689
+ GCC="no"
3690
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3691
+ $as_echo "yes" >&6; }
3692
+
3693
+ fi
3694
+ rm -f conftest*
3695
+
3696
+
3697
+
3698
+ SUNCC="no"
3699
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suncc" >&5
3700
+ $as_echo_n "checking for suncc... " >&6; }
3701
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3702
+ /* end confdefs.h. */
3703
+ __SUNPRO_C
3704
+ _ACEOF
3705
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3706
+ $EGREP "^__SUNPRO_C" >/dev/null 2>&1; then :
3707
+ SUNCC="no"
3708
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709
+ $as_echo "no" >&6; }
3710
+ else
3711
+ SUNCC="yes"
3712
+ GCC="no"
3713
+ test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
3714
+ GCC=""
3715
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3716
+ $as_echo "yes" >&6; }
3717
+
3718
+ fi
3719
+ rm -f conftest*
3720
+
3721
+
3722
+ if test "x$CC" != xcc; then
3723
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
3724
+ $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
3725
+ else
3726
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
3727
+ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
3728
+ fi
3729
+ set dummy $CC; ac_cc=`$as_echo "$2" |
3730
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3731
+ if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
3732
+ $as_echo_n "(cached) " >&6
3733
+ else
3734
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3735
+ /* end confdefs.h. */
3736
+
3737
+ int
3738
+ main ()
3739
+ {
3740
+
3741
+ ;
3742
+ return 0;
3743
+ }
3744
+ _ACEOF
3745
+ # Make sure it works both with $CC and with simple cc.
3746
+ # We do the test twice because some compilers refuse to overwrite an
3747
+ # existing .o file with -o, though they will create one.
3748
+ ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3749
+ rm -f conftest2.*
3750
+ if { { case "(($ac_try" in
3751
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752
+ *) ac_try_echo=$ac_try;;
3753
+ esac
3754
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755
+ $as_echo "$ac_try_echo"; } >&5
3756
+ (eval "$ac_try") 2>&5
3757
+ ac_status=$?
3758
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759
+ test $ac_status = 0; } &&
3760
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
3761
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3762
+ *) ac_try_echo=$ac_try;;
3763
+ esac
3764
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3765
+ $as_echo "$ac_try_echo"; } >&5
3766
+ (eval "$ac_try") 2>&5
3767
+ ac_status=$?
3768
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3769
+ test $ac_status = 0; };
3770
+ then
3771
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3772
+ if test "x$CC" != xcc; then
3773
+ # Test first that cc exists at all.
3774
+ if { ac_try='cc -c conftest.$ac_ext >&5'
3775
+ { { case "(($ac_try" in
3776
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777
+ *) ac_try_echo=$ac_try;;
3778
+ esac
3779
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3780
+ $as_echo "$ac_try_echo"; } >&5
3781
+ (eval "$ac_try") 2>&5
3782
+ ac_status=$?
3783
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3784
+ test $ac_status = 0; }; }; then
3785
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3786
+ rm -f conftest2.*
3787
+ if { { case "(($ac_try" in
3788
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789
+ *) ac_try_echo=$ac_try;;
3790
+ esac
3791
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3792
+ $as_echo "$ac_try_echo"; } >&5
3793
+ (eval "$ac_try") 2>&5
3794
+ ac_status=$?
3795
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3796
+ test $ac_status = 0; } &&
3797
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
3798
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799
+ *) ac_try_echo=$ac_try;;
3800
+ esac
3801
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3802
+ $as_echo "$ac_try_echo"; } >&5
3803
+ (eval "$ac_try") 2>&5
3804
+ ac_status=$?
3805
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3806
+ test $ac_status = 0; };
3807
+ then
3808
+ # cc works too.
3809
+ :
3810
+ else
3811
+ # cc exists but doesn't like -o.
3812
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
3813
+ fi
3814
+ fi
3815
+ fi
3816
+ else
3817
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
3818
+ fi
3819
+ rm -f core conftest*
3820
+
3821
+ fi
3822
+ if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
3823
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3824
+ $as_echo "yes" >&6; }
3825
+ else
3826
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3827
+ $as_echo "no" >&6; }
3828
+
3829
+ $as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h
3830
+
3831
+ fi
3832
+
3833
+
3834
+
3835
+ php_with_libdir=lib
3836
+
3837
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system library directory" >&5
3838
+ $as_echo_n "checking for system library directory... " >&6; }
3839
+
3840
+ @%:@ Check whether --with-libdir was given.
3841
+ if test "${with_libdir+set}" = set; then :
3842
+ withval=$with_libdir; PHP_LIBDIR=$withval
3843
+ else
3844
+
3845
+ PHP_LIBDIR=lib
3846
+
3847
+
3848
+ fi
3849
+
3850
+
3851
+ ext_output=$PHP_LIBDIR
3852
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
3853
+ $as_echo "$ext_output" >&6; }
3854
+
3855
+
3856
+
3857
+
3858
+
3859
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -R" >&5
3860
+ $as_echo_n "checking if compiler supports -R... " >&6; }
3861
+ if ${php_cv_cc_dashr+:} false; then :
3862
+ $as_echo_n "(cached) " >&6
3863
+ else
3864
+
3865
+ SAVE_LIBS=$LIBS
3866
+ LIBS="-R /usr/$PHP_LIBDIR $LIBS"
3867
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3868
+ /* end confdefs.h. */
3869
+
3870
+ int
3871
+ main ()
3872
+ {
3873
+
3874
+ ;
3875
+ return 0;
3876
+ }
3877
+ _ACEOF
3878
+ if ac_fn_c_try_link "$LINENO"; then :
3879
+ php_cv_cc_dashr=yes
3880
+ else
3881
+ php_cv_cc_dashr=no
3882
+ fi
3883
+ rm -f core conftest.err conftest.$ac_objext \
3884
+ conftest$ac_exeext conftest.$ac_ext
3885
+ LIBS=$SAVE_LIBS
3886
+ fi
3887
+
3888
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_dashr" >&5
3889
+ $as_echo "$php_cv_cc_dashr" >&6; }
3890
+ if test $php_cv_cc_dashr = "yes"; then
3891
+ ld_runpath_switch=-R
3892
+ else
3893
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wl,-rpath," >&5
3894
+ $as_echo_n "checking if compiler supports -Wl,-rpath,... " >&6; }
3895
+ if ${php_cv_cc_rpath+:} false; then :
3896
+ $as_echo_n "(cached) " >&6
3897
+ else
3898
+
3899
+ SAVE_LIBS=$LIBS
3900
+ LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
3901
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3902
+ /* end confdefs.h. */
3903
+
3904
+ int
3905
+ main ()
3906
+ {
3907
+
3908
+ ;
3909
+ return 0;
3910
+ }
3911
+ _ACEOF
3912
+ if ac_fn_c_try_link "$LINENO"; then :
3913
+ php_cv_cc_rpath=yes
3914
+ else
3915
+ php_cv_cc_rpath=no
3916
+ fi
3917
+ rm -f core conftest.err conftest.$ac_objext \
3918
+ conftest$ac_exeext conftest.$ac_ext
3919
+ LIBS=$SAVE_LIBS
3920
+ fi
3921
+
3922
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_rpath" >&5
3923
+ $as_echo "$php_cv_cc_rpath" >&6; }
3924
+ if test $php_cv_cc_rpath = "yes"; then
3925
+ ld_runpath_switch=-Wl,-rpath,
3926
+ else
3927
+ ld_runpath_switch=-L
3928
+ fi
3929
+ fi
3930
+ if test "$PHP_RPATH" = "no"; then
3931
+ ld_runpath_switch=
3932
+ fi
3933
+
3934
+ ac_aux_dir=
3935
+ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3936
+ if test -f "$ac_dir/install-sh"; then
3937
+ ac_aux_dir=$ac_dir
3938
+ ac_install_sh="$ac_aux_dir/install-sh -c"
3939
+ break
3940
+ elif test -f "$ac_dir/install.sh"; then
3941
+ ac_aux_dir=$ac_dir
3942
+ ac_install_sh="$ac_aux_dir/install.sh -c"
3943
+ break
3944
+ elif test -f "$ac_dir/shtool"; then
3945
+ ac_aux_dir=$ac_dir
3946
+ ac_install_sh="$ac_aux_dir/shtool install -c"
3947
+ break
3948
+ fi
3949
+ done
3950
+ if test -z "$ac_aux_dir"; then
3951
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3952
+ fi
3953
+
3954
+ # These three variables are undocumented and unsupported,
3955
+ # and are intended to be withdrawn in a future Autoconf release.
3956
+ # They can cause serious problems if a builder's source tree is in a directory
3957
+ # whose full name contains unusual characters.
3958
+ ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3959
+ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3960
+ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3961
+
3962
+
3963
+ # Make sure we can run config.sub.
3964
+ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3965
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3966
+
3967
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3968
+ $as_echo_n "checking build system type... " >&6; }
3969
+ if ${ac_cv_build+:} false; then :
3970
+ $as_echo_n "(cached) " >&6
3971
+ else
3972
+ ac_build_alias=$build_alias
3973
+ test "x$ac_build_alias" = x &&
3974
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3975
+ test "x$ac_build_alias" = x &&
3976
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3977
+ ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3978
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3979
+
3980
+ fi
3981
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3982
+ $as_echo "$ac_cv_build" >&6; }
3983
+ case $ac_cv_build in
3984
+ *-*-*) ;;
3985
+ *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3986
+ esac
3987
+ build=$ac_cv_build
3988
+ ac_save_IFS=$IFS; IFS='-'
3989
+ set x $ac_cv_build
3990
+ shift
3991
+ build_cpu=$1
3992
+ build_vendor=$2
3993
+ shift; shift
3994
+ # Remember, the first character of IFS is used to create $*,
3995
+ # except with old shells:
3996
+ build_os=$*
3997
+ IFS=$ac_save_IFS
3998
+ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3999
+
4000
+
4001
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4002
+ $as_echo_n "checking host system type... " >&6; }
4003
+ if ${ac_cv_host+:} false; then :
4004
+ $as_echo_n "(cached) " >&6
4005
+ else
4006
+ if test "x$host_alias" = x; then
4007
+ ac_cv_host=$ac_cv_build
4008
+ else
4009
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4010
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4011
+ fi
4012
+
4013
+ fi
4014
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4015
+ $as_echo "$ac_cv_host" >&6; }
4016
+ case $ac_cv_host in
4017
+ *-*-*) ;;
4018
+ *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4019
+ esac
4020
+ host=$ac_cv_host
4021
+ ac_save_IFS=$IFS; IFS='-'
4022
+ set x $ac_cv_host
4023
+ shift
4024
+ host_cpu=$1
4025
+ host_vendor=$2
4026
+ shift; shift
4027
+ # Remember, the first character of IFS is used to create $*,
4028
+ # except with old shells:
4029
+ host_os=$*
4030
+ IFS=$ac_save_IFS
4031
+ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4032
+
4033
+
4034
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4035
+ $as_echo_n "checking target system type... " >&6; }
4036
+ if ${ac_cv_target+:} false; then :
4037
+ $as_echo_n "(cached) " >&6
4038
+ else
4039
+ if test "x$target_alias" = x; then
4040
+ ac_cv_target=$ac_cv_host
4041
+ else
4042
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4043
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4044
+ fi
4045
+
4046
+ fi
4047
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4048
+ $as_echo "$ac_cv_target" >&6; }
4049
+ case $ac_cv_target in
4050
+ *-*-*) ;;
4051
+ *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4052
+ esac
4053
+ target=$ac_cv_target
4054
+ ac_save_IFS=$IFS; IFS='-'
4055
+ set x $ac_cv_target
4056
+ shift
4057
+ target_cpu=$1
4058
+ target_vendor=$2
4059
+ shift; shift
4060
+ # Remember, the first character of IFS is used to create $*,
4061
+ # except with old shells:
4062
+ target_os=$*
4063
+ IFS=$ac_save_IFS
4064
+ case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4065
+
4066
+
4067
+ # The aliases save the names the user supplied, while $host etc.
4068
+ # will get canonicalized.
4069
+ test -n "$target_alias" &&
4070
+ test "$program_prefix$program_suffix$program_transform_name" = \
4071
+ NONENONEs,x,x, &&
4072
+ program_prefix=${target_alias}-
4073
+
4074
+ if test -z "$host_alias" && test -n "$host"; then
4075
+ host_alias=$host
4076
+ fi
4077
+ if test -z "$host_alias"; then
4078
+ as_fn_error $? "host_alias is not set!" "$LINENO" 5
4079
+ fi
4080
+
4081
+
4082
+
4083
+
4084
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_SUFFIX_NAME"
4085
+
4086
+
4087
+
4088
+
4089
+
4090
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SHLIB_DL_SUFFIX_NAME"
4091
+
4092
+
4093
+
4094
+ SHLIB_SUFFIX_NAME=so
4095
+ SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
4096
+ case $host_alias in
4097
+ *hpux*)
4098
+ SHLIB_SUFFIX_NAME=sl
4099
+ SHLIB_DL_SUFFIX_NAME=sl
4100
+ ;;
4101
+ *darwin*)
4102
+ SHLIB_SUFFIX_NAME=dylib
4103
+ SHLIB_DL_SUFFIX_NAME=so
4104
+ ;;
4105
+ esac
4106
+
4107
+
4108
+
4109
+ php_with_php_config=php-config
4110
+
4111
+
4112
+
4113
+ @%:@ Check whether --with-php-config was given.
4114
+ if test "${with_php_config+set}" = set; then :
4115
+ withval=$with_php_config; PHP_PHP_CONFIG=$withval
4116
+ else
4117
+
4118
+ PHP_PHP_CONFIG=php-config
4119
+
4120
+
4121
+ fi
4122
+
4123
+
4124
+ ext_output=$PHP_PHP_CONFIG
4125
+
4126
+
4127
+
4128
+
4129
+
4130
+ PHP_CONFIG=$PHP_PHP_CONFIG
4131
+ prefix=`$PHP_CONFIG --prefix 2>/dev/null`
4132
+ phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
4133
+ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
4134
+ EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
4135
+ PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
4136
+
4137
+ if test -z "$prefix"; then
4138
+ as_fn_error $? "Cannot find php-config. Please use --with-php-config=PATH" "$LINENO" 5
4139
+ fi
4140
+
4141
+ php_shtool=$srcdir/build/shtool
4142
+
4143
+ test -d include || $php_shtool mkdir include
4144
+ > Makefile.objects
4145
+ > Makefile.fragments
4146
+ pattern=define
4147
+ $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
4148
+
4149
+
4150
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP prefix" >&5
4151
+ $as_echo_n "checking for PHP prefix... " >&6; }
4152
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $prefix" >&5
4153
+ $as_echo "$prefix" >&6; }
4154
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP includes" >&5
4155
+ $as_echo_n "checking for PHP includes... " >&6; }
4156
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INCLUDES" >&5
4157
+ $as_echo "$INCLUDES" >&6; }
4158
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP extension directory" >&5
4159
+ $as_echo_n "checking for PHP extension directory... " >&6; }
4160
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTENSION_DIR" >&5
4161
+ $as_echo "$EXTENSION_DIR" >&6; }
4162
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP installed headers prefix" >&5
4163
+ $as_echo_n "checking for PHP installed headers prefix... " >&6; }
4164
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $phpincludedir" >&5
4165
+ $as_echo "$phpincludedir" >&6; }
4166
+
4167
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if debug is enabled" >&5
4168
+ $as_echo_n "checking if debug is enabled... " >&6; }
4169
+ old_CPPFLAGS=$CPPFLAGS
4170
+ CPPFLAGS="-I$phpincludedir"
4171
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172
+ /* end confdefs.h. */
4173
+
4174
+ #include <main/php_config.h>
4175
+ #if ZEND_DEBUG
4176
+ php_debug_is_enabled
4177
+ #endif
4178
+
4179
+ _ACEOF
4180
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4181
+ $EGREP "php_debug_is_enabled" >/dev/null 2>&1; then :
4182
+
4183
+ PHP_DEBUG=yes
4184
+
4185
+ else
4186
+
4187
+ PHP_DEBUG=no
4188
+
4189
+ fi
4190
+ rm -f conftest*
4191
+
4192
+ CPPFLAGS=$old_CPPFLAGS
4193
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_DEBUG" >&5
4194
+ $as_echo "$PHP_DEBUG" >&6; }
4195
+
4196
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if zts is enabled" >&5
4197
+ $as_echo_n "checking if zts is enabled... " >&6; }
4198
+ old_CPPFLAGS=$CPPFLAGS
4199
+ CPPFLAGS="-I$phpincludedir"
4200
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4201
+ /* end confdefs.h. */
4202
+
4203
+ #include <main/php_config.h>
4204
+ #if ZTS
4205
+ php_zts_is_enabled
4206
+ #endif
4207
+
4208
+ _ACEOF
4209
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4210
+ $EGREP "php_zts_is_enabled" >/dev/null 2>&1; then :
4211
+
4212
+ PHP_THREAD_SAFETY=yes
4213
+
4214
+ else
4215
+
4216
+ PHP_THREAD_SAFETY=no
4217
+
4218
+ fi
4219
+ rm -f conftest*
4220
+
4221
+ CPPFLAGS=$old_CPPFLAGS
4222
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_DEBUG" >&5
4223
+ $as_echo "$PHP_DEBUG" >&6; }
4224
+
4225
+ ZEND_EXT_TYPE="zend_extension"
4226
+
4227
+ PHP_VAR_SUBST="$PHP_VAR_SUBST ZEND_EXT_TYPE"
4228
+
4229
+
4230
+ if test "$PHP_DEBUG" = "yes"; then
4231
+ PHP_DEBUG=1
4232
+ ZEND_DEBUG=yes
4233
+
4234
+ CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
4235
+ CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
4236
+
4237
+ if test "$GCC" = "yes" || test "$ICC" = "yes"; then
4238
+ CFLAGS="$CFLAGS -O0"
4239
+ CXXFLAGS="$CXXFLAGS -g -O0"
4240
+ fi
4241
+ if test "$SUNCC" = "yes"; then
4242
+ if test -n "$auto_cflags"; then
4243
+ CFLAGS="-g"
4244
+ CXXFLAGS="-g"
4245
+ else
4246
+ CFLAGS="$CFLAGS -g"
4247
+ CXXFLAGS="$CFLAGS -g"
4248
+ fi
4249
+ fi
4250
+ else
4251
+ PHP_DEBUG=0
4252
+ ZEND_DEBUG=no
4253
+ fi
4254
+
4255
+
4256
+
4257
+ OVERALL_TARGET=php
4258
+ php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
4259
+ php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
4260
+ php_c_post=
4261
+ php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
4262
+ php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
4263
+ php_cxx_post=
4264
+ php_lo=lo
4265
+
4266
+ case $with_pic in
4267
+ yes) pic_setting='-prefer-pic';;
4268
+ no) pic_setting='-prefer-non-pic';;
4269
+ esac
4270
+
4271
+ shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
4272
+ shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
4273
+ shared_c_post=
4274
+ shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
4275
+ shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
4276
+ shared_cxx_post=
4277
+ shared_lo=lo
4278
+
4279
+ php_build_target=program
4280
+
4281
+ OVERALL_TARGET=libphp$PHP_MAJOR_VERSION.la
4282
+ php_build_target=shared
4283
+
4284
+ php_c_pre=$shared_c_pre
4285
+ php_c_meta=$shared_c_meta
4286
+ php_c_post=$shared_c_post
4287
+ php_cxx_pre=$shared_cxx_pre
4288
+ php_cxx_meta=$shared_cxx_meta
4289
+ php_cxx_post=$shared_cxx_post
4290
+ php_lo=$shared_lo
4291
+
4292
+
4293
+
4294
+ # Extract the first word of "re2c", so it can be a program name with args.
4295
+ set dummy re2c; ac_word=$2
4296
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297
+ $as_echo_n "checking for $ac_word... " >&6; }
4298
+ if ${ac_cv_prog_RE2C+:} false; then :
4299
+ $as_echo_n "(cached) " >&6
4300
+ else
4301
+ if test -n "$RE2C"; then
4302
+ ac_cv_prog_RE2C="$RE2C" # Let the user override the test.
4303
+ else
4304
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305
+ for as_dir in $PATH
4306
+ do
4307
+ IFS=$as_save_IFS
4308
+ test -z "$as_dir" && as_dir=.
4309
+ for ac_exec_ext in '' $ac_executable_extensions; do
4310
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311
+ ac_cv_prog_RE2C="re2c"
4312
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313
+ break 2
4314
+ fi
4315
+ done
4316
+ done
4317
+ IFS=$as_save_IFS
4318
+
4319
+ fi
4320
+ fi
4321
+ RE2C=$ac_cv_prog_RE2C
4322
+ if test -n "$RE2C"; then
4323
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RE2C" >&5
4324
+ $as_echo "$RE2C" >&6; }
4325
+ else
4326
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327
+ $as_echo "no" >&6; }
4328
+ fi
4329
+
4330
+
4331
+ if test -n "$RE2C"; then
4332
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for re2c version" >&5
4333
+ $as_echo_n "checking for re2c version... " >&6; }
4334
+ if ${php_cv_re2c_version+:} false; then :
4335
+ $as_echo_n "(cached) " >&6
4336
+ else
4337
+
4338
+ re2c_vernum=`$RE2C --vernum 2>/dev/null`
4339
+ if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
4340
+ php_cv_re2c_version=invalid
4341
+ else
4342
+ php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
4343
+ fi
4344
+
4345
+ fi
4346
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_re2c_version" >&5
4347
+ $as_echo "$php_cv_re2c_version" >&6; }
4348
+ fi
4349
+ case $php_cv_re2c_version in
4350
+ ""|invalid)
4351
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers." >&5
4352
+ $as_echo "$as_me: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers." >&2;}
4353
+ RE2C="exit 0;"
4354
+ ;;
4355
+ esac
4356
+
4357
+ PHP_VAR_SUBST="$PHP_VAR_SUBST RE2C"
4358
+
4359
+
4360
+
4361
+ for ac_prog in gawk nawk awk mawk
4362
+ do
4363
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
4364
+ set dummy $ac_prog; ac_word=$2
4365
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4366
+ $as_echo_n "checking for $ac_word... " >&6; }
4367
+ if ${ac_cv_prog_AWK+:} false; then :
4368
+ $as_echo_n "(cached) " >&6
4369
+ else
4370
+ if test -n "$AWK"; then
4371
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
4372
+ else
4373
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4374
+ as_dummy="/usr/xpg4/bin/:$PATH"
4375
+ for as_dir in $as_dummy
4376
+ do
4377
+ IFS=$as_save_IFS
4378
+ test -z "$as_dir" && as_dir=.
4379
+ for ac_exec_ext in '' $ac_executable_extensions; do
4380
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4381
+ ac_cv_prog_AWK="$ac_prog"
4382
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383
+ break 2
4384
+ fi
4385
+ done
4386
+ done
4387
+ IFS=$as_save_IFS
4388
+
4389
+ fi
4390
+ fi
4391
+ AWK=$ac_cv_prog_AWK
4392
+ if test -n "$AWK"; then
4393
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4394
+ $as_echo "$AWK" >&6; }
4395
+ else
4396
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4397
+ $as_echo "no" >&6; }
4398
+ fi
4399
+
4400
+
4401
+ test -n "$AWK" && break
4402
+ done
4403
+ test -n "$AWK" || AWK="bork"
4404
+
4405
+ case "$AWK" in
4406
+ *mawk)
4407
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mawk is known to have problems on some systems. You should install GNU awk" >&5
4408
+ $as_echo "$as_me: WARNING: mawk is known to have problems on some systems. You should install GNU awk" >&2;}
4409
+ ;;
4410
+ *gawk)
4411
+ ;;
4412
+ bork)
4413
+ as_fn_error $? "Could not find awk; Install GNU awk" "$LINENO" 5
4414
+ ;;
4415
+ *)
4416
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $AWK is broken" >&5
4417
+ $as_echo_n "checking if $AWK is broken... " >&6; }
4418
+ if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
4419
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4420
+ $as_echo "yes" >&6; }
4421
+ as_fn_error $? "You should install GNU awk" "$LINENO" 5
4422
+ else
4423
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424
+ $as_echo "no" >&6; }
4425
+ fi
4426
+ ;;
4427
+ esac
4428
+
4429
+ PHP_VAR_SUBST="$PHP_VAR_SUBST AWK"
4430
+
4431
+
4432
+
4433
+
4434
+
4435
+ php_enable_thrift_protocol=no
4436
+
4437
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the thrift_protocol extension" >&5
4438
+ $as_echo_n "checking whether to enable the thrift_protocol extension... " >&6; }
4439
+ @%:@ Check whether --enable-thrift_protocol was given.
4440
+ if test "${enable_thrift_protocol+set}" = set; then :
4441
+ enableval=$enable_thrift_protocol; PHP_THRIFT_PROTOCOL=$enableval
4442
+ else
4443
+
4444
+ PHP_THRIFT_PROTOCOL=no
4445
+ test "$PHP_ENABLE_ALL" && PHP_THRIFT_PROTOCOL=$PHP_ENABLE_ALL
4446
+
4447
+ fi
4448
+
4449
+
4450
+
4451
+ ext_output="yes, shared"
4452
+ ext_shared=yes
4453
+ case $PHP_THRIFT_PROTOCOL in
4454
+ shared,*)
4455
+ PHP_THRIFT_PROTOCOL=`echo "$PHP_THRIFT_PROTOCOL"|$SED 's/^shared,//'`
4456
+ ;;
4457
+ shared)
4458
+ PHP_THRIFT_PROTOCOL=yes
4459
+ ;;
4460
+ no)
4461
+ ext_output=no
4462
+ ext_shared=no
4463
+ ;;
4464
+ *)
4465
+ ext_output=yes
4466
+ ext_shared=no
4467
+ ;;
4468
+ esac
4469
+
4470
+
4471
+ ext_output="yes, shared"
4472
+ ext_shared=yes
4473
+ test "$PHP_THRIFT_PROTOCOL" = "no" && PHP_THRIFT_PROTOCOL=yes
4474
+
4475
+
4476
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ext_output" >&5
4477
+ $as_echo "$ext_output" >&6; }
4478
+
4479
+
4480
+
4481
+
4482
+ if test "$PHP_THRIFT_PROTOCOL" != "no"; then
4483
+
4484
+ if test -z "$php_cxx_done"; then
4485
+ ac_ext=cpp
4486
+ ac_cpp='$CXXCPP $CPPFLAGS'
4487
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4488
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4489
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4490
+ if test -z "$CXX"; then
4491
+ if test -n "$CCC"; then
4492
+ CXX=$CCC
4493
+ else
4494
+ if test -n "$ac_tool_prefix"; then
4495
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4496
+ do
4497
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4498
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4499
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500
+ $as_echo_n "checking for $ac_word... " >&6; }
4501
+ if ${ac_cv_prog_CXX+:} false; then :
4502
+ $as_echo_n "(cached) " >&6
4503
+ else
4504
+ if test -n "$CXX"; then
4505
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
4506
+ else
4507
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508
+ for as_dir in $PATH
4509
+ do
4510
+ IFS=$as_save_IFS
4511
+ test -z "$as_dir" && as_dir=.
4512
+ for ac_exec_ext in '' $ac_executable_extensions; do
4513
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4514
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4515
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516
+ break 2
4517
+ fi
4518
+ done
4519
+ done
4520
+ IFS=$as_save_IFS
4521
+
4522
+ fi
4523
+ fi
4524
+ CXX=$ac_cv_prog_CXX
4525
+ if test -n "$CXX"; then
4526
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4527
+ $as_echo "$CXX" >&6; }
4528
+ else
4529
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4530
+ $as_echo "no" >&6; }
4531
+ fi
4532
+
4533
+
4534
+ test -n "$CXX" && break
4535
+ done
4536
+ fi
4537
+ if test -z "$CXX"; then
4538
+ ac_ct_CXX=$CXX
4539
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4540
+ do
4541
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
4542
+ set dummy $ac_prog; ac_word=$2
4543
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544
+ $as_echo_n "checking for $ac_word... " >&6; }
4545
+ if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4546
+ $as_echo_n "(cached) " >&6
4547
+ else
4548
+ if test -n "$ac_ct_CXX"; then
4549
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4550
+ else
4551
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552
+ for as_dir in $PATH
4553
+ do
4554
+ IFS=$as_save_IFS
4555
+ test -z "$as_dir" && as_dir=.
4556
+ for ac_exec_ext in '' $ac_executable_extensions; do
4557
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4558
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
4559
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560
+ break 2
4561
+ fi
4562
+ done
4563
+ done
4564
+ IFS=$as_save_IFS
4565
+
4566
+ fi
4567
+ fi
4568
+ ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4569
+ if test -n "$ac_ct_CXX"; then
4570
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4571
+ $as_echo "$ac_ct_CXX" >&6; }
4572
+ else
4573
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4574
+ $as_echo "no" >&6; }
4575
+ fi
4576
+
4577
+
4578
+ test -n "$ac_ct_CXX" && break
4579
+ done
4580
+
4581
+ if test "x$ac_ct_CXX" = x; then
4582
+ CXX="g++"
4583
+ else
4584
+ case $cross_compiling:$ac_tool_warned in
4585
+ yes:)
4586
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4587
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4588
+ ac_tool_warned=yes ;;
4589
+ esac
4590
+ CXX=$ac_ct_CXX
4591
+ fi
4592
+ fi
4593
+
4594
+ fi
4595
+ fi
4596
+ # Provide some information about the compiler.
4597
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4598
+ set X $ac_compile
4599
+ ac_compiler=$2
4600
+ for ac_option in --version -v -V -qversion; do
4601
+ { { ac_try="$ac_compiler $ac_option >&5"
4602
+ case "(($ac_try" in
4603
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4604
+ *) ac_try_echo=$ac_try;;
4605
+ esac
4606
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4607
+ $as_echo "$ac_try_echo"; } >&5
4608
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4609
+ ac_status=$?
4610
+ if test -s conftest.err; then
4611
+ sed '10a\
4612
+ ... rest of stderr output deleted ...
4613
+ 10q' conftest.err >conftest.er1
4614
+ cat conftest.er1 >&5
4615
+ fi
4616
+ rm -f conftest.er1 conftest.err
4617
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4618
+ test $ac_status = 0; }
4619
+ done
4620
+
4621
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4622
+ $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4623
+ if ${ac_cv_cxx_compiler_gnu+:} false; then :
4624
+ $as_echo_n "(cached) " >&6
4625
+ else
4626
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4627
+ /* end confdefs.h. */
4628
+
4629
+ int
4630
+ main ()
4631
+ {
4632
+ #ifndef __GNUC__
4633
+ choke me
4634
+ #endif
4635
+
4636
+ ;
4637
+ return 0;
4638
+ }
4639
+ _ACEOF
4640
+ if ac_fn_cxx_try_compile "$LINENO"; then :
4641
+ ac_compiler_gnu=yes
4642
+ else
4643
+ ac_compiler_gnu=no
4644
+ fi
4645
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4646
+ ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4647
+
4648
+ fi
4649
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4650
+ $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4651
+ if test $ac_compiler_gnu = yes; then
4652
+ GXX=yes
4653
+ else
4654
+ GXX=
4655
+ fi
4656
+ ac_test_CXXFLAGS=${CXXFLAGS+set}
4657
+ ac_save_CXXFLAGS=$CXXFLAGS
4658
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4659
+ $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4660
+ if ${ac_cv_prog_cxx_g+:} false; then :
4661
+ $as_echo_n "(cached) " >&6
4662
+ else
4663
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4664
+ ac_cxx_werror_flag=yes
4665
+ ac_cv_prog_cxx_g=no
4666
+ CXXFLAGS="-g"
4667
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668
+ /* end confdefs.h. */
4669
+
4670
+ int
4671
+ main ()
4672
+ {
4673
+
4674
+ ;
4675
+ return 0;
4676
+ }
4677
+ _ACEOF
4678
+ if ac_fn_cxx_try_compile "$LINENO"; then :
4679
+ ac_cv_prog_cxx_g=yes
4680
+ else
4681
+ CXXFLAGS=""
4682
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683
+ /* end confdefs.h. */
4684
+
4685
+ int
4686
+ main ()
4687
+ {
4688
+
4689
+ ;
4690
+ return 0;
4691
+ }
4692
+ _ACEOF
4693
+ if ac_fn_cxx_try_compile "$LINENO"; then :
4694
+
4695
+ else
4696
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4697
+ CXXFLAGS="-g"
4698
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4699
+ /* end confdefs.h. */
4700
+
4701
+ int
4702
+ main ()
4703
+ {
4704
+
4705
+ ;
4706
+ return 0;
4707
+ }
4708
+ _ACEOF
4709
+ if ac_fn_cxx_try_compile "$LINENO"; then :
4710
+ ac_cv_prog_cxx_g=yes
4711
+ fi
4712
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4713
+ fi
4714
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4715
+ fi
4716
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4717
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4718
+ fi
4719
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4720
+ $as_echo "$ac_cv_prog_cxx_g" >&6; }
4721
+ if test "$ac_test_CXXFLAGS" = set; then
4722
+ CXXFLAGS=$ac_save_CXXFLAGS
4723
+ elif test $ac_cv_prog_cxx_g = yes; then
4724
+ if test "$GXX" = yes; then
4725
+ CXXFLAGS="-g -O2"
4726
+ else
4727
+ CXXFLAGS="-g"
4728
+ fi
4729
+ else
4730
+ if test "$GXX" = yes; then
4731
+ CXXFLAGS="-O2"
4732
+ else
4733
+ CXXFLAGS=
4734
+ fi
4735
+ fi
4736
+ ac_ext=c
4737
+ ac_cpp='$CPP $CPPFLAGS'
4738
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4739
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4740
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
4741
+
4742
+ ac_ext=cpp
4743
+ ac_cpp='$CXXCPP $CPPFLAGS'
4744
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4745
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4746
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4747
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
4748
+ $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
4749
+ if test -z "$CXXCPP"; then
4750
+ if ${ac_cv_prog_CXXCPP+:} false; then :
4751
+ $as_echo_n "(cached) " >&6
4752
+ else
4753
+ # Double quotes because CXXCPP needs to be expanded
4754
+ for CXXCPP in "$CXX -E" "/lib/cpp"
4755
+ do
4756
+ ac_preproc_ok=false
4757
+ for ac_cxx_preproc_warn_flag in '' yes
4758
+ do
4759
+ # Use a header file that comes with gcc, so configuring glibc
4760
+ # with a fresh cross-compiler works.
4761
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4762
+ # <limits.h> exists even on freestanding compilers.
4763
+ # On the NeXT, cc -E runs the code through the compiler's parser,
4764
+ # not just through cpp. "Syntax error" is here to catch this case.
4765
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766
+ /* end confdefs.h. */
4767
+ @%:@ifdef __STDC__
4768
+ @%:@ include <limits.h>
4769
+ @%:@else
4770
+ @%:@ include <assert.h>
4771
+ @%:@endif
4772
+ Syntax error
4773
+ _ACEOF
4774
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
4775
+
4776
+ else
4777
+ # Broken: fails on valid input.
4778
+ continue
4779
+ fi
4780
+ rm -f conftest.err conftest.i conftest.$ac_ext
4781
+
4782
+ # OK, works on sane cases. Now check whether nonexistent headers
4783
+ # can be detected and how.
4784
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785
+ /* end confdefs.h. */
4786
+ @%:@include <ac_nonexistent.h>
4787
+ _ACEOF
4788
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
4789
+ # Broken: success on invalid input.
4790
+ continue
4791
+ else
4792
+ # Passes both tests.
4793
+ ac_preproc_ok=:
4794
+ break
4795
+ fi
4796
+ rm -f conftest.err conftest.i conftest.$ac_ext
4797
+
4798
+ done
4799
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4800
+ rm -f conftest.i conftest.err conftest.$ac_ext
4801
+ if $ac_preproc_ok; then :
4802
+ break
4803
+ fi
4804
+
4805
+ done
4806
+ ac_cv_prog_CXXCPP=$CXXCPP
4807
+
4808
+ fi
4809
+ CXXCPP=$ac_cv_prog_CXXCPP
4810
+ else
4811
+ ac_cv_prog_CXXCPP=$CXXCPP
4812
+ fi
4813
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
4814
+ $as_echo "$CXXCPP" >&6; }
4815
+ ac_preproc_ok=false
4816
+ for ac_cxx_preproc_warn_flag in '' yes
4817
+ do
4818
+ # Use a header file that comes with gcc, so configuring glibc
4819
+ # with a fresh cross-compiler works.
4820
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4821
+ # <limits.h> exists even on freestanding compilers.
4822
+ # On the NeXT, cc -E runs the code through the compiler's parser,
4823
+ # not just through cpp. "Syntax error" is here to catch this case.
4824
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825
+ /* end confdefs.h. */
4826
+ @%:@ifdef __STDC__
4827
+ @%:@ include <limits.h>
4828
+ @%:@else
4829
+ @%:@ include <assert.h>
4830
+ @%:@endif
4831
+ Syntax error
4832
+ _ACEOF
4833
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
4834
+
4835
+ else
4836
+ # Broken: fails on valid input.
4837
+ continue
4838
+ fi
4839
+ rm -f conftest.err conftest.i conftest.$ac_ext
4840
+
4841
+ # OK, works on sane cases. Now check whether nonexistent headers
4842
+ # can be detected and how.
4843
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844
+ /* end confdefs.h. */
4845
+ @%:@include <ac_nonexistent.h>
4846
+ _ACEOF
4847
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
4848
+ # Broken: success on invalid input.
4849
+ continue
4850
+ else
4851
+ # Passes both tests.
4852
+ ac_preproc_ok=:
4853
+ break
4854
+ fi
4855
+ rm -f conftest.err conftest.i conftest.$ac_ext
4856
+
4857
+ done
4858
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4859
+ rm -f conftest.i conftest.err conftest.$ac_ext
4860
+ if $ac_preproc_ok; then :
4861
+
4862
+ else
4863
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4864
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4865
+ as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
4866
+ See \`config.log' for more details" "$LINENO" 5; }
4867
+ fi
4868
+
4869
+ ac_ext=c
4870
+ ac_cpp='$CPP $CPPFLAGS'
4871
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4872
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4873
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
4874
+
4875
+ php_cxx_done=yes
4876
+ fi
4877
+
4878
+
4879
+
4880
+ if test "$ext_shared" = "yes"; then
4881
+ THRIFT_PROTOCOL_SHARED_LIBADD="-lstdc++ $THRIFT_PROTOCOL_SHARED_LIBADD"
4882
+ if test -n """"; then
4883
+
4884
+ if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then
4885
+
4886
+ if test -z """" || echo """" | grep '^/' >/dev/null ; then
4887
+ ai_p=""
4888
+ else
4889
+
4890
+ ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`"
4891
+
4892
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
4893
+ ai_p="$ep_realdir/`basename \"""\"`"
4894
+ fi
4895
+
4896
+
4897
+ if test "$ext_shared" = "yes"; then
4898
+ THRIFT_PROTOCOL_SHARED_LIBADD="-L$ai_p $THRIFT_PROTOCOL_SHARED_LIBADD"
4899
+ test -n "$ld_runpath_switch" && THRIFT_PROTOCOL_SHARED_LIBADD="$ld_runpath_switch$ai_p $THRIFT_PROTOCOL_SHARED_LIBADD"
4900
+ else
4901
+
4902
+
4903
+
4904
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
4905
+
4906
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
4907
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
4908
+ eval "LIBPATH$unique=set"
4909
+
4910
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
4911
+ LDFLAGS="$LDFLAGS -L$ai_p"
4912
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
4913
+
4914
+ fi
4915
+
4916
+
4917
+ fi
4918
+
4919
+ fi
4920
+
4921
+ fi
4922
+ else
4923
+
4924
+
4925
+ if test -n """"; then
4926
+
4927
+ if test """" != "/usr/$PHP_LIBDIR" && test """" != "/usr/lib"; then
4928
+
4929
+ if test -z """" || echo """" | grep '^/' >/dev/null ; then
4930
+ ai_p=""
4931
+ else
4932
+
4933
+ ep_dir="`echo ""|$SED 's%/*[^/][^/]*/*$%%'`"
4934
+
4935
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
4936
+ ai_p="$ep_realdir/`basename \"""\"`"
4937
+ fi
4938
+
4939
+
4940
+
4941
+
4942
+
4943
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
4944
+
4945
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
4946
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
4947
+ eval "LIBPATH$unique=set"
4948
+
4949
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
4950
+ LDFLAGS="$LDFLAGS -L$ai_p"
4951
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
4952
+
4953
+ fi
4954
+
4955
+
4956
+
4957
+ fi
4958
+
4959
+ fi
4960
+
4961
+
4962
+ case stdc++ in
4963
+ c|c_r|pthread*) ;;
4964
+ *)
4965
+ LIBS="-lstdc++ $LIBS"
4966
+ ;;
4967
+ esac
4968
+
4969
+
4970
+
4971
+
4972
+ fi
4973
+
4974
+
4975
+
4976
+ PHP_VAR_SUBST="$PHP_VAR_SUBST THRIFT_PROTOCOL_SHARED_LIBADD"
4977
+
4978
+
4979
+ ext_builddir=.
4980
+ ext_srcdir=$abs_srcdir
4981
+
4982
+ ac_extra=
4983
+
4984
+ if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
4985
+ PHP_THRIFT_PROTOCOL_SHARED=no
4986
+
4987
+
4988
+ case "" in
4989
+ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
4990
+ /*) ac_srcdir=`echo """"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
4991
+ *) ac_srcdir="$abs_srcdir/""/"; ac_bdir="""/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
4992
+ esac
4993
+
4994
+
4995
+
4996
+ b_c_pre=$php_c_pre
4997
+ b_cxx_pre=$php_cxx_pre
4998
+ b_c_meta=$php_c_meta
4999
+ b_cxx_meta=$php_cxx_meta
5000
+ b_c_post=$php_c_post
5001
+ b_cxx_post=$php_cxx_post
5002
+ b_lo=$php_lo
5003
+
5004
+
5005
+ old_IFS=$IFS
5006
+ for ac_src in php_thrift_protocol.cpp; do
5007
+
5008
+ IFS=.
5009
+ set $ac_src
5010
+ ac_obj=$1
5011
+ IFS=$old_IFS
5012
+
5013
+ PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
5014
+
5015
+ case $ac_src in
5016
+ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5017
+ *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5018
+ *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5019
+ *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
5020
+ esac
5021
+
5022
+ cat >>Makefile.objects<<EOF
5023
+ $ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
5024
+ $ac_comp
5025
+ EOF
5026
+ done
5027
+
5028
+
5029
+ EXT_STATIC="$EXT_STATIC thrift_protocol"
5030
+ if test "$ext_shared" != "nocli"; then
5031
+ EXT_CLI_STATIC="$EXT_CLI_STATIC thrift_protocol"
5032
+ fi
5033
+ else
5034
+ if test "$ext_shared" = "shared" || test "$ext_shared" = "yes"; then
5035
+ PHP_THRIFT_PROTOCOL_SHARED=yes
5036
+
5037
+ case "" in
5038
+ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
5039
+ /*) ac_srcdir=`echo """"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
5040
+ *) ac_srcdir="$abs_srcdir/""/"; ac_bdir="""/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
5041
+ esac
5042
+
5043
+
5044
+
5045
+ b_c_pre=$shared_c_pre
5046
+ b_cxx_pre=$shared_cxx_pre
5047
+ b_c_meta=$shared_c_meta
5048
+ b_cxx_meta=$shared_cxx_meta
5049
+ b_c_post=$shared_c_post
5050
+ b_cxx_post=$shared_cxx_post
5051
+ b_lo=$shared_lo
5052
+
5053
+
5054
+ old_IFS=$IFS
5055
+ for ac_src in php_thrift_protocol.cpp; do
5056
+
5057
+ IFS=.
5058
+ set $ac_src
5059
+ ac_obj=$1
5060
+ IFS=$old_IFS
5061
+
5062
+ shared_objects_thrift_protocol="$shared_objects_thrift_protocol $ac_bdir$ac_obj.lo"
5063
+
5064
+ case $ac_src in
5065
+ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5066
+ *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5067
+ *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5068
+ *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
5069
+ esac
5070
+
5071
+ cat >>Makefile.objects<<EOF
5072
+ $ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
5073
+ $ac_comp
5074
+ EOF
5075
+ done
5076
+
5077
+ case $host_alias in
5078
+ *netware*)
5079
+
5080
+ install_modules="install-modules"
5081
+
5082
+ case $host_alias in
5083
+ *aix*)
5084
+ suffix=so
5085
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/phpthrift_protocol.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(PHPTHRIFT_PROTOCOL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/phpthrift_protocol.so '$ext_builddir'/phpthrift_protocol.so'
5086
+ ;;
5087
+ *netware*)
5088
+ suffix=nlm
5089
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) -L$(top_builddir)/netware -lphp5lib $(THRIFT_PROTOCOL_SHARED_LIBADD)'
5090
+ ;;
5091
+ *)
5092
+ suffix=la
5093
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(PHPTHRIFT_PROTOCOL_SHARED_LIBADD)'
5094
+ ;;
5095
+ esac
5096
+
5097
+ if test "x" = "xyes"; then
5098
+ PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/phpthrift_protocol.$suffix"
5099
+ else
5100
+ PHP_MODULES="$PHP_MODULES \$(phplibdir)/phpthrift_protocol.$suffix"
5101
+ fi
5102
+
5103
+ PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_thrift_protocol"
5104
+
5105
+ cat >>Makefile.objects<<EOF
5106
+ \$(phplibdir)/phpthrift_protocol.$suffix: $ext_builddir/phpthrift_protocol.$suffix
5107
+ \$(LIBTOOL) --mode=install cp $ext_builddir/phpthrift_protocol.$suffix \$(phplibdir)
5108
+
5109
+ $ext_builddir/phpthrift_protocol.$suffix: \$(shared_objects_thrift_protocol) \$(PHPTHRIFT_PROTOCOL_SHARED_DEPENDENCIES)
5110
+ $link_cmd
5111
+
5112
+ EOF
5113
+
5114
+ ;;
5115
+ *)
5116
+
5117
+ install_modules="install-modules"
5118
+
5119
+ case $host_alias in
5120
+ *aix*)
5121
+ suffix=so
5122
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$ext_builddir'/thrift_protocol.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_LIBADD) && mv -f '$ext_builddir'/.libs/thrift_protocol.so '$ext_builddir'/thrift_protocol.so'
5123
+ ;;
5124
+ *netware*)
5125
+ suffix=nlm
5126
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) -L$(top_builddir)/netware -lphp5lib $(IFT_PROTOCOL_SHARED_LIBADD)'
5127
+ ;;
5128
+ *)
5129
+ suffix=la
5130
+ link_cmd='$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_thrift_protocol) $(THRIFT_PROTOCOL_SHARED_LIBADD)'
5131
+ ;;
5132
+ esac
5133
+
5134
+ if test "x" = "xyes"; then
5135
+ PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/thrift_protocol.$suffix"
5136
+ else
5137
+ PHP_MODULES="$PHP_MODULES \$(phplibdir)/thrift_protocol.$suffix"
5138
+ fi
5139
+
5140
+ PHP_VAR_SUBST="$PHP_VAR_SUBST shared_objects_thrift_protocol"
5141
+
5142
+ cat >>Makefile.objects<<EOF
5143
+ \$(phplibdir)/thrift_protocol.$suffix: $ext_builddir/thrift_protocol.$suffix
5144
+ \$(LIBTOOL) --mode=install cp $ext_builddir/thrift_protocol.$suffix \$(phplibdir)
5145
+
5146
+ $ext_builddir/thrift_protocol.$suffix: \$(shared_objects_thrift_protocol) \$(THRIFT_PROTOCOL_SHARED_DEPENDENCIES)
5147
+ $link_cmd
5148
+
5149
+ EOF
5150
+
5151
+ ;;
5152
+ esac
5153
+
5154
+ cat >>confdefs.h <<_ACEOF
5155
+ @%:@define COMPILE_DL_THRIFT_PROTOCOL 1
5156
+ _ACEOF
5157
+
5158
+ fi
5159
+ fi
5160
+
5161
+ if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" = "cli"; then
5162
+ PHP_THRIFT_PROTOCOL_SHARED=no
5163
+ case "$PHP_SAPI" in
5164
+ cgi|embed)
5165
+
5166
+
5167
+ case "" in
5168
+ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
5169
+ /*) ac_srcdir=`echo """"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
5170
+ *) ac_srcdir="$abs_srcdir/""/"; ac_bdir="""/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
5171
+ esac
5172
+
5173
+
5174
+
5175
+ b_c_pre=$php_c_pre
5176
+ b_cxx_pre=$php_cxx_pre
5177
+ b_c_meta=$php_c_meta
5178
+ b_cxx_meta=$php_cxx_meta
5179
+ b_c_post=$php_c_post
5180
+ b_cxx_post=$php_cxx_post
5181
+ b_lo=$php_lo
5182
+
5183
+
5184
+ old_IFS=$IFS
5185
+ for ac_src in php_thrift_protocol.cpp; do
5186
+
5187
+ IFS=.
5188
+ set $ac_src
5189
+ ac_obj=$1
5190
+ IFS=$old_IFS
5191
+
5192
+ PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo"
5193
+
5194
+ case $ac_src in
5195
+ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5196
+ *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5197
+ *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5198
+ *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
5199
+ esac
5200
+
5201
+ cat >>Makefile.objects<<EOF
5202
+ $ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
5203
+ $ac_comp
5204
+ EOF
5205
+ done
5206
+
5207
+
5208
+ EXT_STATIC="$EXT_STATIC thrift_protocol"
5209
+ ;;
5210
+ *)
5211
+
5212
+
5213
+ case "" in
5214
+ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
5215
+ /*) ac_srcdir=`echo """"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
5216
+ *) ac_srcdir="$abs_srcdir/""/"; ac_bdir="""/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
5217
+ esac
5218
+
5219
+
5220
+
5221
+ b_c_pre=$php_c_pre
5222
+ b_cxx_pre=$php_cxx_pre
5223
+ b_c_meta=$php_c_meta
5224
+ b_cxx_meta=$php_cxx_meta
5225
+ b_c_post=$php_c_post
5226
+ b_cxx_post=$php_cxx_post
5227
+ b_lo=$php_lo
5228
+
5229
+
5230
+ old_IFS=$IFS
5231
+ for ac_src in php_thrift_protocol.cpp; do
5232
+
5233
+ IFS=.
5234
+ set $ac_src
5235
+ ac_obj=$1
5236
+ IFS=$old_IFS
5237
+
5238
+ PHP_CLI_OBJS="$PHP_CLI_OBJS $ac_bdir$ac_obj.lo"
5239
+
5240
+ case $ac_src in
5241
+ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5242
+ *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5243
+ *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
5244
+ *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
5245
+ esac
5246
+
5247
+ cat >>Makefile.objects<<EOF
5248
+ $ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
5249
+ $ac_comp
5250
+ EOF
5251
+ done
5252
+
5253
+
5254
+ ;;
5255
+ esac
5256
+ EXT_CLI_STATIC="$EXT_CLI_STATIC thrift_protocol"
5257
+ fi
5258
+
5259
+
5260
+ BUILD_DIR="$BUILD_DIR $ext_builddir"
5261
+
5262
+
5263
+
5264
+ if test "$ext_builddir" = "."; then
5265
+ PHP_PECL_EXTENSION=thrift_protocol
5266
+
5267
+ PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_PECL_EXTENSION"
5268
+
5269
+ fi
5270
+
5271
+ fi
5272
+
5273
+
5274
+
5275
+ enable_static=no
5276
+ enable_shared=yes
5277
+
5278
+
5279
+ @%:@ Check whether --enable-shared was given.
5280
+ if test "${enable_shared+set}" = set; then :
5281
+ enableval=$enable_shared; p=${PACKAGE-default}
5282
+ case $enableval in
5283
+ yes) enable_shared=yes ;;
5284
+ no) enable_shared=no ;;
5285
+ *)
5286
+ enable_shared=no
5287
+ # Look at the argument we got. We use all the common list separators.
5288
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5289
+ for pkg in $enableval; do
5290
+ IFS="$lt_save_ifs"
5291
+ if test "X$pkg" = "X$p"; then
5292
+ enable_shared=yes
5293
+ fi
5294
+ done
5295
+ IFS="$lt_save_ifs"
5296
+ ;;
5297
+ esac
5298
+ else
5299
+ enable_shared=yes
5300
+ fi
5301
+
5302
+
5303
+ @%:@ Check whether --enable-static was given.
5304
+ if test "${enable_static+set}" = set; then :
5305
+ enableval=$enable_static; p=${PACKAGE-default}
5306
+ case $enableval in
5307
+ yes) enable_static=yes ;;
5308
+ no) enable_static=no ;;
5309
+ *)
5310
+ enable_static=no
5311
+ # Look at the argument we got. We use all the common list separators.
5312
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5313
+ for pkg in $enableval; do
5314
+ IFS="$lt_save_ifs"
5315
+ if test "X$pkg" = "X$p"; then
5316
+ enable_static=yes
5317
+ fi
5318
+ done
5319
+ IFS="$lt_save_ifs"
5320
+ ;;
5321
+ esac
5322
+ else
5323
+ enable_static=yes
5324
+ fi
5325
+
5326
+
5327
+ @%:@ Check whether --enable-fast-install was given.
5328
+ if test "${enable_fast_install+set}" = set; then :
5329
+ enableval=$enable_fast_install; p=${PACKAGE-default}
5330
+ case $enableval in
5331
+ yes) enable_fast_install=yes ;;
5332
+ no) enable_fast_install=no ;;
5333
+ *)
5334
+ enable_fast_install=no
5335
+ # Look at the argument we got. We use all the common list separators.
5336
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5337
+ for pkg in $enableval; do
5338
+ IFS="$lt_save_ifs"
5339
+ if test "X$pkg" = "X$p"; then
5340
+ enable_fast_install=yes
5341
+ fi
5342
+ done
5343
+ IFS="$lt_save_ifs"
5344
+ ;;
5345
+ esac
5346
+ else
5347
+ enable_fast_install=yes
5348
+ fi
5349
+
5350
+
5351
+
5352
+ @%:@ Check whether --with-gnu-ld was given.
5353
+ if test "${with_gnu_ld+set}" = set; then :
5354
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5355
+ else
5356
+ with_gnu_ld=no
5357
+ fi
5358
+
5359
+ ac_prog=ld
5360
+ if test "$GCC" = yes; then
5361
+ # Check if gcc -print-prog-name=ld gives a path.
5362
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5363
+ $as_echo_n "checking for ld used by $CC... " >&6; }
5364
+ case $host in
5365
+ *-*-mingw*)
5366
+ # gcc leaves a trailing carriage return which upsets mingw
5367
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5368
+ *)
5369
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5370
+ esac
5371
+ case $ac_prog in
5372
+ # Accept absolute paths.
5373
+ [\\/]* | ?:[\\/]*)
5374
+ re_direlt='/[^/][^/]*/\.\./'
5375
+ # Canonicalize the pathname of ld
5376
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5377
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5378
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5379
+ done
5380
+ test -z "$LD" && LD="$ac_prog"
5381
+ ;;
5382
+ "")
5383
+ # If it fails, then pretend we aren't using GCC.
5384
+ ac_prog=ld
5385
+ ;;
5386
+ *)
5387
+ # If it is relative, then search for the first ld in PATH.
5388
+ with_gnu_ld=unknown
5389
+ ;;
5390
+ esac
5391
+ elif test "$with_gnu_ld" = yes; then
5392
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5393
+ $as_echo_n "checking for GNU ld... " >&6; }
5394
+ else
5395
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5396
+ $as_echo_n "checking for non-GNU ld... " >&6; }
5397
+ fi
5398
+ if ${lt_cv_path_LD+:} false; then :
5399
+ $as_echo_n "(cached) " >&6
5400
+ else
5401
+ if test -z "$LD"; then
5402
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5403
+ for ac_dir in $PATH; do
5404
+ IFS="$lt_save_ifs"
5405
+ test -z "$ac_dir" && ac_dir=.
5406
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5407
+ lt_cv_path_LD="$ac_dir/$ac_prog"
5408
+ # Check to see if the program is GNU ld. I'd rather use --version,
5409
+ # but apparently some variants of GNU ld only accept -v.
5410
+ # Break only if it was the GNU/non-GNU ld that we prefer.
5411
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5412
+ *GNU* | *'with BFD'*)
5413
+ test "$with_gnu_ld" != no && break
5414
+ ;;
5415
+ *)
5416
+ test "$with_gnu_ld" != yes && break
5417
+ ;;
5418
+ esac
5419
+ fi
5420
+ done
5421
+ IFS="$lt_save_ifs"
5422
+ else
5423
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
5424
+ fi
5425
+ fi
5426
+
5427
+ LD="$lt_cv_path_LD"
5428
+ if test -n "$LD"; then
5429
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5430
+ $as_echo "$LD" >&6; }
5431
+ else
5432
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433
+ $as_echo "no" >&6; }
5434
+ fi
5435
+ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5436
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5437
+ $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5438
+ if ${lt_cv_prog_gnu_ld+:} false; then :
5439
+ $as_echo_n "(cached) " >&6
5440
+ else
5441
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
5442
+ case `$LD -v 2>&1 </dev/null` in
5443
+ *GNU* | *'with BFD'*)
5444
+ lt_cv_prog_gnu_ld=yes
5445
+ ;;
5446
+ *)
5447
+ lt_cv_prog_gnu_ld=no
5448
+ ;;
5449
+ esac
5450
+ fi
5451
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5452
+ $as_echo "$lt_cv_prog_gnu_ld" >&6; }
5453
+ with_gnu_ld=$lt_cv_prog_gnu_ld
5454
+
5455
+
5456
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
5457
+ $as_echo_n "checking for $LD option to reload object files... " >&6; }
5458
+ if ${lt_cv_ld_reload_flag+:} false; then :
5459
+ $as_echo_n "(cached) " >&6
5460
+ else
5461
+ lt_cv_ld_reload_flag='-r'
5462
+ fi
5463
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
5464
+ $as_echo "$lt_cv_ld_reload_flag" >&6; }
5465
+ reload_flag=$lt_cv_ld_reload_flag
5466
+ case $reload_flag in
5467
+ "" | " "*) ;;
5468
+ *) reload_flag=" $reload_flag" ;;
5469
+ esac
5470
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
5471
+ case $host_os in
5472
+ darwin*)
5473
+ if test "$GCC" = yes; then
5474
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5475
+ else
5476
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
5477
+ fi
5478
+ ;;
5479
+ esac
5480
+
5481
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
5482
+ $as_echo_n "checking for BSD-compatible nm... " >&6; }
5483
+ if ${lt_cv_path_NM+:} false; then :
5484
+ $as_echo_n "(cached) " >&6
5485
+ else
5486
+ if test -n "$NM"; then
5487
+ # Let the user override the test.
5488
+ lt_cv_path_NM="$NM"
5489
+ else
5490
+ lt_nm_to_check="${ac_tool_prefix}nm"
5491
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5492
+ lt_nm_to_check="$lt_nm_to_check nm"
5493
+ fi
5494
+ for lt_tmp_nm in $lt_nm_to_check; do
5495
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5496
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5497
+ IFS="$lt_save_ifs"
5498
+ test -z "$ac_dir" && ac_dir=.
5499
+ tmp_nm="$ac_dir/$lt_tmp_nm"
5500
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5501
+ # Check to see if the nm accepts a BSD-compat flag.
5502
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5503
+ # nm: unknown option "B" ignored
5504
+ # Tru64's nm complains that /dev/null is an invalid object file
5505
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5506
+ */dev/null* | *'Invalid file or object type'*)
5507
+ lt_cv_path_NM="$tmp_nm -B"
5508
+ break
5509
+ ;;
5510
+ *)
5511
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5512
+ */dev/null*)
5513
+ lt_cv_path_NM="$tmp_nm -p"
5514
+ break
5515
+ ;;
5516
+ *)
5517
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5518
+ continue # so that we can try to find one that supports BSD flags
5519
+ ;;
5520
+ esac
5521
+ ;;
5522
+ esac
5523
+ fi
5524
+ done
5525
+ IFS="$lt_save_ifs"
5526
+ done
5527
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5528
+ fi
5529
+ fi
5530
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5531
+ $as_echo "$lt_cv_path_NM" >&6; }
5532
+ NM="$lt_cv_path_NM"
5533
+
5534
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5535
+ $as_echo_n "checking whether ln -s works... " >&6; }
5536
+ LN_S=$as_ln_s
5537
+ if test "$LN_S" = "ln -s"; then
5538
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5539
+ $as_echo "yes" >&6; }
5540
+ else
5541
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5542
+ $as_echo "no, using $LN_S" >&6; }
5543
+ fi
5544
+
5545
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
5546
+ $as_echo_n "checking how to recognize dependent libraries... " >&6; }
5547
+ if ${lt_cv_deplibs_check_method+:} false; then :
5548
+ $as_echo_n "(cached) " >&6
5549
+ else
5550
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
5551
+ lt_cv_file_magic_test_file=
5552
+ lt_cv_deplibs_check_method='unknown'
5553
+ # Need to set the preceding variable on all platforms that support
5554
+ # interlibrary dependencies.
5555
+ # 'none' -- dependencies not supported.
5556
+ # `unknown' -- same as none, but documents that we really don't know.
5557
+ # 'pass_all' -- all dependencies passed with no checks.
5558
+ # 'test_compile' -- check by making test program.
5559
+ # 'file_magic [[regex]]' -- check by looking for files in library path
5560
+ # which responds to the $file_magic_cmd with a given extended regex.
5561
+ # If you have `file' or equivalent on your system and you're not sure
5562
+ # whether `pass_all' will *always* work, you probably want this one.
5563
+
5564
+ case $host_os in
5565
+ aix[4-9]*)
5566
+ lt_cv_deplibs_check_method=pass_all
5567
+ ;;
5568
+
5569
+ beos*)
5570
+ lt_cv_deplibs_check_method=pass_all
5571
+ ;;
5572
+
5573
+ bsdi[45]*)
5574
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5575
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
5576
+ lt_cv_file_magic_test_file=/shlib/libc.so
5577
+ ;;
5578
+
5579
+ cygwin*)
5580
+ # func_win32_libid is a shell function defined in ltmain.sh
5581
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5582
+ lt_cv_file_magic_cmd='func_win32_libid'
5583
+ ;;
5584
+
5585
+ mingw* | pw32*)
5586
+ # Base MSYS/MinGW do not provide the 'file' command needed by
5587
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
5588
+ # unless we find 'file', for example because we are cross-compiling.
5589
+ if ( file / ) >/dev/null 2>&1; then
5590
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5591
+ lt_cv_file_magic_cmd='func_win32_libid'
5592
+ else
5593
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5594
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
5595
+ fi
5596
+ ;;
5597
+
5598
+ darwin* | rhapsody*)
5599
+ lt_cv_deplibs_check_method=pass_all
5600
+ ;;
5601
+
5602
+ freebsd* | dragonfly*)
5603
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5604
+ case $host_cpu in
5605
+ i*86 )
5606
+ # Not sure whether the presence of OpenBSD here was a mistake.
5607
+ # Let's accept both of them until this is cleared up.
5608
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5609
+ lt_cv_file_magic_cmd=/usr/bin/file
5610
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5611
+ ;;
5612
+ esac
5613
+ else
5614
+ lt_cv_deplibs_check_method=pass_all
5615
+ fi
5616
+ ;;
5617
+
5618
+ gnu*)
5619
+ lt_cv_deplibs_check_method=pass_all
5620
+ ;;
5621
+
5622
+ hpux10.20* | hpux11*)
5623
+ lt_cv_file_magic_cmd=/usr/bin/file
5624
+ case $host_cpu in
5625
+ ia64*)
5626
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5627
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5628
+ ;;
5629
+ hppa*64*)
5630
+ 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]'
5631
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5632
+ ;;
5633
+ *)
5634
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5635
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
5636
+ ;;
5637
+ esac
5638
+ ;;
5639
+
5640
+ interix[3-9]*)
5641
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5642
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
5643
+ ;;
5644
+
5645
+ irix5* | irix6* | nonstopux*)
5646
+ case $LD in
5647
+ *-32|*"-32 ") libmagic=32-bit;;
5648
+ *-n32|*"-n32 ") libmagic=N32;;
5649
+ *-64|*"-64 ") libmagic=64-bit;;
5650
+ *) libmagic=never-match;;
5651
+ esac
5652
+ lt_cv_deplibs_check_method=pass_all
5653
+ ;;
5654
+
5655
+ # This must be Linux ELF.
5656
+ linux* | k*bsd*-gnu)
5657
+ lt_cv_deplibs_check_method=pass_all
5658
+ ;;
5659
+
5660
+ netbsd*)
5661
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5662
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5663
+ else
5664
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5665
+ fi
5666
+ ;;
5667
+
5668
+ newos6*)
5669
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5670
+ lt_cv_file_magic_cmd=/usr/bin/file
5671
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
5672
+ ;;
5673
+
5674
+ nto-qnx*)
5675
+ lt_cv_deplibs_check_method=unknown
5676
+ ;;
5677
+
5678
+ openbsd*)
5679
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5680
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5681
+ else
5682
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5683
+ fi
5684
+ ;;
5685
+
5686
+ osf3* | osf4* | osf5*)
5687
+ lt_cv_deplibs_check_method=pass_all
5688
+ ;;
5689
+
5690
+ rdos*)
5691
+ lt_cv_deplibs_check_method=pass_all
5692
+ ;;
5693
+
5694
+ solaris*)
5695
+ lt_cv_deplibs_check_method=pass_all
5696
+ ;;
5697
+
5698
+ sysv4 | sysv4.3*)
5699
+ case $host_vendor in
5700
+ motorola)
5701
+ 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]'
5702
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5703
+ ;;
5704
+ ncr)
5705
+ lt_cv_deplibs_check_method=pass_all
5706
+ ;;
5707
+ sequent)
5708
+ lt_cv_file_magic_cmd='/bin/file'
5709
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5710
+ ;;
5711
+ sni)
5712
+ lt_cv_file_magic_cmd='/bin/file'
5713
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5714
+ lt_cv_file_magic_test_file=/lib/libc.so
5715
+ ;;
5716
+ siemens)
5717
+ lt_cv_deplibs_check_method=pass_all
5718
+ ;;
5719
+ pc)
5720
+ lt_cv_deplibs_check_method=pass_all
5721
+ ;;
5722
+ esac
5723
+ ;;
5724
+
5725
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5726
+ lt_cv_deplibs_check_method=pass_all
5727
+ ;;
5728
+ esac
5729
+
5730
+ fi
5731
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
5732
+ $as_echo "$lt_cv_deplibs_check_method" >&6; }
5733
+ file_magic_cmd=$lt_cv_file_magic_cmd
5734
+ deplibs_check_method=$lt_cv_deplibs_check_method
5735
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
5736
+
5737
+
5738
+
5739
+
5740
+ # If no C compiler was specified, use CC.
5741
+ LTCC=${LTCC-"$CC"}
5742
+
5743
+ # If no C compiler flags were specified, use CFLAGS.
5744
+ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5745
+
5746
+ # Allow CC to be a program name with arguments.
5747
+ compiler=$CC
5748
+
5749
+ #AC_ARG_ENABLE([libtool-lock],
5750
+ #[ --disable-libtool-lock avoid locking (might break parallel builds)])
5751
+ #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5752
+
5753
+ # Some flags need to be propagated to the compiler or linker for good
5754
+ # libtool support.
5755
+ case $host in
5756
+ ia64-*-hpux*)
5757
+ # Find out which ABI we are using.
5758
+ echo 'int i;' > conftest.$ac_ext
5759
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5760
+ (eval $ac_compile) 2>&5
5761
+ ac_status=$?
5762
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5763
+ test $ac_status = 0; }; then
5764
+ case `/usr/bin/file conftest.$ac_objext` in
5765
+ *ELF-32*)
5766
+ HPUX_IA64_MODE="32"
5767
+ ;;
5768
+ *ELF-64*)
5769
+ HPUX_IA64_MODE="64"
5770
+ ;;
5771
+ esac
5772
+ fi
5773
+ rm -rf conftest*
5774
+ ;;
5775
+ *-*-irix6*)
5776
+ # Find out which ABI we are using.
5777
+ echo '#line __oline__ "configure"' > conftest.$ac_ext
5778
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5779
+ (eval $ac_compile) 2>&5
5780
+ ac_status=$?
5781
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5782
+ test $ac_status = 0; }; then
5783
+ if test "$lt_cv_prog_gnu_ld" = yes; then
5784
+ case `/usr/bin/file conftest.$ac_objext` in
5785
+ *32-bit*)
5786
+ LD="${LD-ld} -melf32bsmip"
5787
+ ;;
5788
+ *N32*)
5789
+ LD="${LD-ld} -melf32bmipn32"
5790
+ ;;
5791
+ *64-bit*)
5792
+ LD="${LD-ld} -melf64bmip"
5793
+ ;;
5794
+ esac
5795
+ else
5796
+ case `/usr/bin/file conftest.$ac_objext` in
5797
+ *32-bit*)
5798
+ LD="${LD-ld} -32"
5799
+ ;;
5800
+ *N32*)
5801
+ LD="${LD-ld} -n32"
5802
+ ;;
5803
+ *64-bit*)
5804
+ LD="${LD-ld} -64"
5805
+ ;;
5806
+ esac
5807
+ fi
5808
+ fi
5809
+ rm -rf conftest*
5810
+ ;;
5811
+
5812
+ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
5813
+ s390*-*linux*|sparc*-*linux*)
5814
+ # Find out which ABI we are using.
5815
+ echo 'int i;' > conftest.$ac_ext
5816
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5817
+ (eval $ac_compile) 2>&5
5818
+ ac_status=$?
5819
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5820
+ test $ac_status = 0; }; then
5821
+ case `/usr/bin/file conftest.o` in
5822
+ *32-bit*)
5823
+ case $host in
5824
+ x86_64-*kfreebsd*-gnu)
5825
+ LD="${LD-ld} -m elf_i386_fbsd"
5826
+ ;;
5827
+ x86_64-*linux*)
5828
+ LD="${LD-ld} -m elf_i386"
5829
+ ;;
5830
+ ppc64-*linux*|powerpc64-*linux*)
5831
+ LD="${LD-ld} -m elf32ppclinux"
5832
+ ;;
5833
+ s390x-*linux*)
5834
+ LD="${LD-ld} -m elf_s390"
5835
+ ;;
5836
+ sparc64-*linux*)
5837
+ LD="${LD-ld} -m elf32_sparc"
5838
+ ;;
5839
+ esac
5840
+ ;;
5841
+ *64-bit*)
5842
+ case $host in
5843
+ x86_64-*kfreebsd*-gnu)
5844
+ LD="${LD-ld} -m elf_x86_64_fbsd"
5845
+ ;;
5846
+ x86_64-*linux*)
5847
+ LD="${LD-ld} -m elf_x86_64"
5848
+ ;;
5849
+ ppc*-*linux*|powerpc*-*linux*)
5850
+ LD="${LD-ld} -m elf64ppc"
5851
+ ;;
5852
+ s390*-*linux*)
5853
+ LD="${LD-ld} -m elf64_s390"
5854
+ ;;
5855
+ sparc*-*linux*)
5856
+ LD="${LD-ld} -m elf64_sparc"
5857
+ ;;
5858
+ esac
5859
+ ;;
5860
+ esac
5861
+ fi
5862
+ rm -rf conftest*
5863
+ ;;
5864
+
5865
+ *-*-sco3.2v5*)
5866
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5867
+ SAVE_CFLAGS="$CFLAGS"
5868
+ CFLAGS="$CFLAGS -belf"
5869
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
5870
+ $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
5871
+ if ${lt_cv_cc_needs_belf+:} false; then :
5872
+ $as_echo_n "(cached) " >&6
5873
+ else
5874
+
5875
+ ac_ext=c
5876
+ ac_cpp='$CPP $CPPFLAGS'
5877
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5878
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5879
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
5880
+
5881
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5882
+ /* end confdefs.h. */
5883
+
5884
+ int
5885
+ main ()
5886
+ {
5887
+
5888
+ ;
5889
+ return 0;
5890
+ }
5891
+ _ACEOF
5892
+ if ac_fn_c_try_link "$LINENO"; then :
5893
+ lt_cv_cc_needs_belf=yes
5894
+ else
5895
+ lt_cv_cc_needs_belf=no
5896
+ fi
5897
+ rm -f core conftest.err conftest.$ac_objext \
5898
+ conftest$ac_exeext conftest.$ac_ext
5899
+ ac_ext=c
5900
+ ac_cpp='$CPP $CPPFLAGS'
5901
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5902
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5903
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
5904
+
5905
+ fi
5906
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
5907
+ $as_echo "$lt_cv_cc_needs_belf" >&6; }
5908
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5909
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5910
+ CFLAGS="$SAVE_CFLAGS"
5911
+ fi
5912
+ ;;
5913
+ sparc*-*solaris*)
5914
+ # Find out which ABI we are using.
5915
+ echo 'int i;' > conftest.$ac_ext
5916
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5917
+ (eval $ac_compile) 2>&5
5918
+ ac_status=$?
5919
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5920
+ test $ac_status = 0; }; then
5921
+ case `/usr/bin/file conftest.o` in
5922
+ *64-bit*)
5923
+ case $lt_cv_prog_gnu_ld in
5924
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
5925
+ *)
5926
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
5927
+ LD="${LD-ld} -64"
5928
+ fi
5929
+ ;;
5930
+ esac
5931
+ ;;
5932
+ esac
5933
+ fi
5934
+ rm -rf conftest*
5935
+ ;;
5936
+
5937
+
5938
+ esac
5939
+
5940
+ need_locks="$enable_libtool_lock"
5941
+
5942
+
5943
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5944
+ $as_echo_n "checking for ANSI C header files... " >&6; }
5945
+ if ${ac_cv_header_stdc+:} false; then :
5946
+ $as_echo_n "(cached) " >&6
5947
+ else
5948
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949
+ /* end confdefs.h. */
5950
+ #include <stdlib.h>
5951
+ #include <stdarg.h>
5952
+ #include <string.h>
5953
+ #include <float.h>
5954
+
5955
+ int
5956
+ main ()
5957
+ {
5958
+
5959
+ ;
5960
+ return 0;
5961
+ }
5962
+ _ACEOF
5963
+ if ac_fn_c_try_compile "$LINENO"; then :
5964
+ ac_cv_header_stdc=yes
5965
+ else
5966
+ ac_cv_header_stdc=no
5967
+ fi
5968
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5969
+
5970
+ if test $ac_cv_header_stdc = yes; then
5971
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5972
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973
+ /* end confdefs.h. */
5974
+ #include <string.h>
5975
+
5976
+ _ACEOF
5977
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5978
+ $EGREP "memchr" >/dev/null 2>&1; then :
5979
+
5980
+ else
5981
+ ac_cv_header_stdc=no
5982
+ fi
5983
+ rm -f conftest*
5984
+
5985
+ fi
5986
+
5987
+ if test $ac_cv_header_stdc = yes; then
5988
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5989
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5990
+ /* end confdefs.h. */
5991
+ #include <stdlib.h>
5992
+
5993
+ _ACEOF
5994
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5995
+ $EGREP "free" >/dev/null 2>&1; then :
5996
+
5997
+ else
5998
+ ac_cv_header_stdc=no
5999
+ fi
6000
+ rm -f conftest*
6001
+
6002
+ fi
6003
+
6004
+ if test $ac_cv_header_stdc = yes; then
6005
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6006
+ if test "$cross_compiling" = yes; then :
6007
+ :
6008
+ else
6009
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6010
+ /* end confdefs.h. */
6011
+ #include <ctype.h>
6012
+ #include <stdlib.h>
6013
+ #if ((' ' & 0x0FF) == 0x020)
6014
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6015
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6016
+ #else
6017
+ # define ISLOWER(c) \
6018
+ (('a' <= (c) && (c) <= 'i') \
6019
+ || ('j' <= (c) && (c) <= 'r') \
6020
+ || ('s' <= (c) && (c) <= 'z'))
6021
+ # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6022
+ #endif
6023
+
6024
+ #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6025
+ int
6026
+ main ()
6027
+ {
6028
+ int i;
6029
+ for (i = 0; i < 256; i++)
6030
+ if (XOR (islower (i), ISLOWER (i))
6031
+ || toupper (i) != TOUPPER (i))
6032
+ return 2;
6033
+ return 0;
6034
+ }
6035
+ _ACEOF
6036
+ if ac_fn_c_try_run "$LINENO"; then :
6037
+
6038
+ else
6039
+ ac_cv_header_stdc=no
6040
+ fi
6041
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6042
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
6043
+ fi
6044
+
6045
+ fi
6046
+ fi
6047
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6048
+ $as_echo "$ac_cv_header_stdc" >&6; }
6049
+ if test $ac_cv_header_stdc = yes; then
6050
+
6051
+ $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h
6052
+
6053
+ fi
6054
+
6055
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6056
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6057
+ inttypes.h stdint.h unistd.h
6058
+ do :
6059
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6060
+ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6061
+ "
6062
+ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6063
+ cat >>confdefs.h <<_ACEOF
6064
+ @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6065
+ _ACEOF
6066
+
6067
+ fi
6068
+
6069
+ done
6070
+
6071
+
6072
+ for ac_header in dlfcn.h
6073
+ do :
6074
+ ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
6075
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6076
+ cat >>confdefs.h <<_ACEOF
6077
+ @%:@define HAVE_DLFCN_H 1
6078
+ _ACEOF
6079
+
6080
+ fi
6081
+
6082
+ done
6083
+
6084
+
6085
+
6086
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6087
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6088
+ (test "X$CXX" != "Xg++"))) ; then
6089
+ ac_ext=cpp
6090
+ ac_cpp='$CXXCPP $CPPFLAGS'
6091
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6092
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6093
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6094
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
6095
+ $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
6096
+ if test -z "$CXXCPP"; then
6097
+ if ${ac_cv_prog_CXXCPP+:} false; then :
6098
+ $as_echo_n "(cached) " >&6
6099
+ else
6100
+ # Double quotes because CXXCPP needs to be expanded
6101
+ for CXXCPP in "$CXX -E" "/lib/cpp"
6102
+ do
6103
+ ac_preproc_ok=false
6104
+ for ac_cxx_preproc_warn_flag in '' yes
6105
+ do
6106
+ # Use a header file that comes with gcc, so configuring glibc
6107
+ # with a fresh cross-compiler works.
6108
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6109
+ # <limits.h> exists even on freestanding compilers.
6110
+ # On the NeXT, cc -E runs the code through the compiler's parser,
6111
+ # not just through cpp. "Syntax error" is here to catch this case.
6112
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6113
+ /* end confdefs.h. */
6114
+ @%:@ifdef __STDC__
6115
+ @%:@ include <limits.h>
6116
+ @%:@else
6117
+ @%:@ include <assert.h>
6118
+ @%:@endif
6119
+ Syntax error
6120
+ _ACEOF
6121
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
6122
+
6123
+ else
6124
+ # Broken: fails on valid input.
6125
+ continue
6126
+ fi
6127
+ rm -f conftest.err conftest.i conftest.$ac_ext
6128
+
6129
+ # OK, works on sane cases. Now check whether nonexistent headers
6130
+ # can be detected and how.
6131
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132
+ /* end confdefs.h. */
6133
+ @%:@include <ac_nonexistent.h>
6134
+ _ACEOF
6135
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
6136
+ # Broken: success on invalid input.
6137
+ continue
6138
+ else
6139
+ # Passes both tests.
6140
+ ac_preproc_ok=:
6141
+ break
6142
+ fi
6143
+ rm -f conftest.err conftest.i conftest.$ac_ext
6144
+
6145
+ done
6146
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6147
+ rm -f conftest.i conftest.err conftest.$ac_ext
6148
+ if $ac_preproc_ok; then :
6149
+ break
6150
+ fi
6151
+
6152
+ done
6153
+ ac_cv_prog_CXXCPP=$CXXCPP
6154
+
6155
+ fi
6156
+ CXXCPP=$ac_cv_prog_CXXCPP
6157
+ else
6158
+ ac_cv_prog_CXXCPP=$CXXCPP
6159
+ fi
6160
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
6161
+ $as_echo "$CXXCPP" >&6; }
6162
+ ac_preproc_ok=false
6163
+ for ac_cxx_preproc_warn_flag in '' yes
6164
+ do
6165
+ # Use a header file that comes with gcc, so configuring glibc
6166
+ # with a fresh cross-compiler works.
6167
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6168
+ # <limits.h> exists even on freestanding compilers.
6169
+ # On the NeXT, cc -E runs the code through the compiler's parser,
6170
+ # not just through cpp. "Syntax error" is here to catch this case.
6171
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6172
+ /* end confdefs.h. */
6173
+ @%:@ifdef __STDC__
6174
+ @%:@ include <limits.h>
6175
+ @%:@else
6176
+ @%:@ include <assert.h>
6177
+ @%:@endif
6178
+ Syntax error
6179
+ _ACEOF
6180
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
6181
+
6182
+ else
6183
+ # Broken: fails on valid input.
6184
+ continue
6185
+ fi
6186
+ rm -f conftest.err conftest.i conftest.$ac_ext
6187
+
6188
+ # OK, works on sane cases. Now check whether nonexistent headers
6189
+ # can be detected and how.
6190
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191
+ /* end confdefs.h. */
6192
+ @%:@include <ac_nonexistent.h>
6193
+ _ACEOF
6194
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
6195
+ # Broken: success on invalid input.
6196
+ continue
6197
+ else
6198
+ # Passes both tests.
6199
+ ac_preproc_ok=:
6200
+ break
6201
+ fi
6202
+ rm -f conftest.err conftest.i conftest.$ac_ext
6203
+
6204
+ done
6205
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6206
+ rm -f conftest.i conftest.err conftest.$ac_ext
6207
+ if $ac_preproc_ok; then :
6208
+
6209
+ else
6210
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6211
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6212
+ as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
6213
+ See \`config.log' for more details" "$LINENO" 5; }
6214
+ fi
6215
+
6216
+ ac_ext=cpp
6217
+ ac_cpp='$CXXCPP $CPPFLAGS'
6218
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6219
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6220
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6221
+
6222
+ fi
6223
+
6224
+
6225
+ # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6226
+ # find the maximum length of command line arguments
6227
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6228
+ $as_echo_n "checking the maximum length of command line arguments... " >&6; }
6229
+ if ${lt_cv_sys_max_cmd_len+:} false; then :
6230
+ $as_echo_n "(cached) " >&6
6231
+ else
6232
+ i=0
6233
+ teststring="ABCD"
6234
+
6235
+ case $build_os in
6236
+ msdosdjgpp*)
6237
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
6238
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
6239
+ # during glob expansion). Even if it were fixed, the result of this
6240
+ # check would be larger than it should be.
6241
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
6242
+ ;;
6243
+
6244
+ gnu*)
6245
+ # Under GNU Hurd, this test is not required because there is
6246
+ # no limit to the length of command line arguments.
6247
+ # Libtool will interpret -1 as no limit whatsoever
6248
+ lt_cv_sys_max_cmd_len=-1;
6249
+ ;;
6250
+
6251
+ cygwin* | mingw*)
6252
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
6253
+ # about 5 minutes as the teststring grows exponentially.
6254
+ # Worse, since 9x/ME are not pre-emptively multitasking,
6255
+ # you end up with a "frozen" computer, even though with patience
6256
+ # the test eventually succeeds (with a max line length of 256k).
6257
+ # Instead, let's just punt: use the minimum linelength reported by
6258
+ # all of the supported platforms: 8192 (on NT/2K/XP).
6259
+ lt_cv_sys_max_cmd_len=8192;
6260
+ ;;
6261
+
6262
+ amigaos*)
6263
+ # On AmigaOS with pdksh, this test takes hours, literally.
6264
+ # So we just punt and use a minimum line length of 8192.
6265
+ lt_cv_sys_max_cmd_len=8192;
6266
+ ;;
6267
+
6268
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6269
+ # This has been around since 386BSD, at least. Likely further.
6270
+ if test -x /sbin/sysctl; then
6271
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6272
+ elif test -x /usr/sbin/sysctl; then
6273
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6274
+ else
6275
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6276
+ fi
6277
+ # And add a safety zone
6278
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6279
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6280
+ ;;
6281
+
6282
+ interix*)
6283
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
6284
+ lt_cv_sys_max_cmd_len=196608
6285
+ ;;
6286
+
6287
+ osf*)
6288
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6289
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6290
+ # nice to cause kernel panics so lets avoid the loop below.
6291
+ # First set a reasonable default.
6292
+ lt_cv_sys_max_cmd_len=16384
6293
+ #
6294
+ if test -x /sbin/sysconfig; then
6295
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6296
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
6297
+ esac
6298
+ fi
6299
+ ;;
6300
+ sco3.2v5*)
6301
+ lt_cv_sys_max_cmd_len=102400
6302
+ ;;
6303
+ sysv5* | sco5v6* | sysv4.2uw2*)
6304
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6305
+ if test -n "$kargmax"; then
6306
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6307
+ else
6308
+ lt_cv_sys_max_cmd_len=32768
6309
+ fi
6310
+ ;;
6311
+ *)
6312
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6313
+ if test -n "$lt_cv_sys_max_cmd_len"; then
6314
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6315
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6316
+ else
6317
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6318
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6319
+ = "XX$teststring") >/dev/null 2>&1 &&
6320
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
6321
+ lt_cv_sys_max_cmd_len=$new_result &&
6322
+ test $i != 17 # 1/2 MB should be enough
6323
+ do
6324
+ i=`expr $i + 1`
6325
+ teststring=$teststring$teststring
6326
+ done
6327
+ teststring=
6328
+ # Add a significant safety factor because C++ compilers can tack on massive
6329
+ # amounts of additional arguments before passing them to the linker.
6330
+ # It appears as though 1/2 is a usable value.
6331
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6332
+ fi
6333
+ ;;
6334
+ esac
6335
+
6336
+ fi
6337
+
6338
+ if test -n $lt_cv_sys_max_cmd_len ; then
6339
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6340
+ $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6341
+ else
6342
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6343
+ $as_echo "none" >&6; }
6344
+ fi
6345
+
6346
+
6347
+
6348
+
6349
+
6350
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
6351
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
6352
+ $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6353
+ if ${lt_cv_sys_global_symbol_pipe+:} false; then :
6354
+ $as_echo_n "(cached) " >&6
6355
+ else
6356
+
6357
+ # These are sane defaults that work on at least a few old systems.
6358
+ # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6359
+
6360
+ # Character class describing NM global symbol codes.
6361
+ symcode='[BCDEGRST]'
6362
+
6363
+ # Regexp to match symbols that can be accessed directly from C.
6364
+ sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6365
+
6366
+ # Transform an extracted symbol line into a proper C declaration
6367
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6368
+
6369
+ # Transform an extracted symbol line into symbol name and symbol address
6370
+ 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'"
6371
+
6372
+ # Define system-specific variables.
6373
+ case $host_os in
6374
+ aix*)
6375
+ symcode='[BCDT]'
6376
+ ;;
6377
+ cygwin* | mingw* | pw32*)
6378
+ symcode='[ABCDGISTW]'
6379
+ ;;
6380
+ hpux*) # Its linker distinguishes data from code symbols
6381
+ if test "$host_cpu" = ia64; then
6382
+ symcode='[ABCDEGRST]'
6383
+ fi
6384
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6385
+ 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'"
6386
+ ;;
6387
+ linux* | k*bsd*-gnu)
6388
+ if test "$host_cpu" = ia64; then
6389
+ symcode='[ABCDGIRSTW]'
6390
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6391
+ 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'"
6392
+ fi
6393
+ ;;
6394
+ irix* | nonstopux*)
6395
+ symcode='[BCDEGRST]'
6396
+ ;;
6397
+ osf*)
6398
+ symcode='[BCDEGQRST]'
6399
+ ;;
6400
+ solaris*)
6401
+ symcode='[BDRT]'
6402
+ ;;
6403
+ sco3.2v5*)
6404
+ symcode='[DT]'
6405
+ ;;
6406
+ sysv4.2uw2*)
6407
+ symcode='[DT]'
6408
+ ;;
6409
+ sysv5* | sco5v6* | unixware* | OpenUNIX*)
6410
+ symcode='[ABDT]'
6411
+ ;;
6412
+ sysv4)
6413
+ symcode='[DFNSTU]'
6414
+ ;;
6415
+ esac
6416
+
6417
+ # Handle CRLF in mingw tool chain
6418
+ opt_cr=
6419
+ case $build_os in
6420
+ mingw*)
6421
+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6422
+ ;;
6423
+ esac
6424
+
6425
+ # If we're using GNU nm, then use its standard symbol codes.
6426
+ case `$NM -V 2>&1` in
6427
+ *GNU* | *'with BFD'*)
6428
+ symcode='[ABCDGIRSTW]' ;;
6429
+ esac
6430
+
6431
+ # Try without a prefix undercore, then with it.
6432
+ for ac_symprfx in "" "_"; do
6433
+
6434
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6435
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
6436
+
6437
+ # Write the raw and C identifiers.
6438
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6439
+
6440
+ # Check to see that the pipe works correctly.
6441
+ pipe_works=no
6442
+
6443
+ rm -f conftest*
6444
+ cat > conftest.$ac_ext <<EOF
6445
+ #ifdef __cplusplus
6446
+ extern "C" {
6447
+ #endif
6448
+ char nm_test_var;
6449
+ void nm_test_func(){}
6450
+ #ifdef __cplusplus
6451
+ }
6452
+ #endif
6453
+ int main(){nm_test_var='a';nm_test_func();return(0);}
6454
+ EOF
6455
+
6456
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6457
+ (eval $ac_compile) 2>&5
6458
+ ac_status=$?
6459
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6460
+ test $ac_status = 0; }; then
6461
+ # Now try to grab the symbols.
6462
+ nlist=conftest.nm
6463
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
6464
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6465
+ ac_status=$?
6466
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6467
+ test $ac_status = 0; } && test -s "$nlist"; then
6468
+ # Try sorting and uniquifying the output.
6469
+ if sort "$nlist" | uniq > "$nlist"T; then
6470
+ mv -f "$nlist"T "$nlist"
6471
+ else
6472
+ rm -f "$nlist"T
6473
+ fi
6474
+
6475
+ # Make sure that we snagged all the symbols we need.
6476
+ if grep ' nm_test_var$' "$nlist" >/dev/null; then
6477
+ if grep ' nm_test_func$' "$nlist" >/dev/null; then
6478
+ cat <<EOF > conftest.$ac_ext
6479
+ #ifdef __cplusplus
6480
+ extern "C" {
6481
+ #endif
6482
+
6483
+ EOF
6484
+ # Now generate the symbol file.
6485
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6486
+
6487
+ cat <<EOF >> conftest.$ac_ext
6488
+ #if defined (__STDC__) && __STDC__
6489
+ # define lt_ptr_t void *
6490
+ #else
6491
+ # define lt_ptr_t char *
6492
+ # define const
6493
+ #endif
6494
+
6495
+ /* The mapping between symbol names and symbols. */
6496
+ const struct {
6497
+ const char *name;
6498
+ lt_ptr_t address;
6499
+ }
6500
+ lt_preloaded_symbols[] =
6501
+ {
6502
+ EOF
6503
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6504
+ cat <<\EOF >> conftest.$ac_ext
6505
+ {0, (lt_ptr_t) 0}
6506
+ };
6507
+
6508
+ #ifdef __cplusplus
6509
+ }
6510
+ #endif
6511
+ EOF
6512
+ # Now try linking the two files.
6513
+ mv conftest.$ac_objext conftstm.$ac_objext
6514
+ lt_save_LIBS="$LIBS"
6515
+ lt_save_CFLAGS="$CFLAGS"
6516
+ LIBS="conftstm.$ac_objext"
6517
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6518
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6519
+ (eval $ac_link) 2>&5
6520
+ ac_status=$?
6521
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6522
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
6523
+ pipe_works=yes
6524
+ fi
6525
+ LIBS="$lt_save_LIBS"
6526
+ CFLAGS="$lt_save_CFLAGS"
6527
+ else
6528
+ echo "cannot find nm_test_func in $nlist" >&5
6529
+ fi
6530
+ else
6531
+ echo "cannot find nm_test_var in $nlist" >&5
6532
+ fi
6533
+ else
6534
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6535
+ fi
6536
+ else
6537
+ echo "$progname: failed program was:" >&5
6538
+ cat conftest.$ac_ext >&5
6539
+ fi
6540
+ rm -rf conftest* conftst*
6541
+
6542
+ # Do not use the global_symbol_pipe unless it works.
6543
+ if test "$pipe_works" = yes; then
6544
+ break
6545
+ else
6546
+ lt_cv_sys_global_symbol_pipe=
6547
+ fi
6548
+ done
6549
+
6550
+ fi
6551
+
6552
+ if test -z "$lt_cv_sys_global_symbol_pipe"; then
6553
+ lt_cv_sys_global_symbol_to_cdecl=
6554
+ fi
6555
+ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6556
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6557
+ $as_echo "failed" >&6; }
6558
+ else
6559
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6560
+ $as_echo "ok" >&6; }
6561
+ fi
6562
+
6563
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
6564
+ $as_echo_n "checking for objdir... " >&6; }
6565
+ if ${lt_cv_objdir+:} false; then :
6566
+ $as_echo_n "(cached) " >&6
6567
+ else
6568
+ rm -f .libs 2>/dev/null
6569
+ mkdir .libs 2>/dev/null
6570
+ if test -d .libs; then
6571
+ lt_cv_objdir=.libs
6572
+ else
6573
+ # MS-DOS does not allow filenames that begin with a dot.
6574
+ lt_cv_objdir=_libs
6575
+ fi
6576
+ rmdir .libs 2>/dev/null
6577
+ fi
6578
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
6579
+ $as_echo "$lt_cv_objdir" >&6; }
6580
+ objdir=$lt_cv_objdir
6581
+
6582
+
6583
+
6584
+
6585
+
6586
+ case $host_os in
6587
+ aix3*)
6588
+ # AIX sometimes has problems with the GCC collect2 program. For some
6589
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
6590
+ # vanish in a puff of smoke.
6591
+ if test "X${COLLECT_NAMES+set}" != Xset; then
6592
+ COLLECT_NAMES=
6593
+ export COLLECT_NAMES
6594
+ fi
6595
+ ;;
6596
+ esac
6597
+
6598
+ # Sed substitution that helps us do robust quoting. It backslashifies
6599
+ # metacharacters that are still active within double-quoted strings.
6600
+ Xsed='sed -e 1s/^X//'
6601
+ sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6602
+
6603
+ # Same as above, but do not quote variable references.
6604
+ double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6605
+
6606
+ # Sed substitution to delay expansion of an escaped shell variable in a
6607
+ # double_quote_subst'ed string.
6608
+ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6609
+
6610
+ # Sed substitution to avoid accidental globbing in evaled expressions
6611
+ no_glob_subst='s/\*/\\\*/g'
6612
+
6613
+ # Constants:
6614
+ rm="rm -f"
6615
+
6616
+ # Global variables:
6617
+ default_ofile=libtool
6618
+ can_build_shared=yes
6619
+
6620
+ # All known linkers require a `.a' archive for static linking (except MSVC,
6621
+ # which needs '.lib').
6622
+ libext=a
6623
+ ltmain="$ac_aux_dir/ltmain.sh"
6624
+ ofile="$default_ofile"
6625
+ with_gnu_ld="$lt_cv_prog_gnu_ld"
6626
+
6627
+ if test -n "$ac_tool_prefix"; then
6628
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6629
+ set dummy ${ac_tool_prefix}ar; ac_word=$2
6630
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631
+ $as_echo_n "checking for $ac_word... " >&6; }
6632
+ if ${ac_cv_prog_AR+:} false; then :
6633
+ $as_echo_n "(cached) " >&6
6634
+ else
6635
+ if test -n "$AR"; then
6636
+ ac_cv_prog_AR="$AR" # Let the user override the test.
6637
+ else
6638
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639
+ for as_dir in $PATH
6640
+ do
6641
+ IFS=$as_save_IFS
6642
+ test -z "$as_dir" && as_dir=.
6643
+ for ac_exec_ext in '' $ac_executable_extensions; do
6644
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6645
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
6646
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647
+ break 2
6648
+ fi
6649
+ done
6650
+ done
6651
+ IFS=$as_save_IFS
6652
+
6653
+ fi
6654
+ fi
6655
+ AR=$ac_cv_prog_AR
6656
+ if test -n "$AR"; then
6657
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6658
+ $as_echo "$AR" >&6; }
6659
+ else
6660
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661
+ $as_echo "no" >&6; }
6662
+ fi
6663
+
6664
+
6665
+ fi
6666
+ if test -z "$ac_cv_prog_AR"; then
6667
+ ac_ct_AR=$AR
6668
+ # Extract the first word of "ar", so it can be a program name with args.
6669
+ set dummy ar; ac_word=$2
6670
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671
+ $as_echo_n "checking for $ac_word... " >&6; }
6672
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
6673
+ $as_echo_n "(cached) " >&6
6674
+ else
6675
+ if test -n "$ac_ct_AR"; then
6676
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6677
+ else
6678
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679
+ for as_dir in $PATH
6680
+ do
6681
+ IFS=$as_save_IFS
6682
+ test -z "$as_dir" && as_dir=.
6683
+ for ac_exec_ext in '' $ac_executable_extensions; do
6684
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6685
+ ac_cv_prog_ac_ct_AR="ar"
6686
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687
+ break 2
6688
+ fi
6689
+ done
6690
+ done
6691
+ IFS=$as_save_IFS
6692
+
6693
+ fi
6694
+ fi
6695
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
6696
+ if test -n "$ac_ct_AR"; then
6697
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6698
+ $as_echo "$ac_ct_AR" >&6; }
6699
+ else
6700
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701
+ $as_echo "no" >&6; }
6702
+ fi
6703
+
6704
+ if test "x$ac_ct_AR" = x; then
6705
+ AR="false"
6706
+ else
6707
+ case $cross_compiling:$ac_tool_warned in
6708
+ yes:)
6709
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6710
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6711
+ ac_tool_warned=yes ;;
6712
+ esac
6713
+ AR=$ac_ct_AR
6714
+ fi
6715
+ else
6716
+ AR="$ac_cv_prog_AR"
6717
+ fi
6718
+
6719
+ if test -n "$ac_tool_prefix"; then
6720
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6721
+ set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6722
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6723
+ $as_echo_n "checking for $ac_word... " >&6; }
6724
+ if ${ac_cv_prog_RANLIB+:} false; then :
6725
+ $as_echo_n "(cached) " >&6
6726
+ else
6727
+ if test -n "$RANLIB"; then
6728
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6729
+ else
6730
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731
+ for as_dir in $PATH
6732
+ do
6733
+ IFS=$as_save_IFS
6734
+ test -z "$as_dir" && as_dir=.
6735
+ for ac_exec_ext in '' $ac_executable_extensions; do
6736
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6737
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6738
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739
+ break 2
6740
+ fi
6741
+ done
6742
+ done
6743
+ IFS=$as_save_IFS
6744
+
6745
+ fi
6746
+ fi
6747
+ RANLIB=$ac_cv_prog_RANLIB
6748
+ if test -n "$RANLIB"; then
6749
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6750
+ $as_echo "$RANLIB" >&6; }
6751
+ else
6752
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753
+ $as_echo "no" >&6; }
6754
+ fi
6755
+
6756
+
6757
+ fi
6758
+ if test -z "$ac_cv_prog_RANLIB"; then
6759
+ ac_ct_RANLIB=$RANLIB
6760
+ # Extract the first word of "ranlib", so it can be a program name with args.
6761
+ set dummy ranlib; ac_word=$2
6762
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763
+ $as_echo_n "checking for $ac_word... " >&6; }
6764
+ if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6765
+ $as_echo_n "(cached) " >&6
6766
+ else
6767
+ if test -n "$ac_ct_RANLIB"; then
6768
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6769
+ else
6770
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6771
+ for as_dir in $PATH
6772
+ do
6773
+ IFS=$as_save_IFS
6774
+ test -z "$as_dir" && as_dir=.
6775
+ for ac_exec_ext in '' $ac_executable_extensions; do
6776
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6777
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
6778
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6779
+ break 2
6780
+ fi
6781
+ done
6782
+ done
6783
+ IFS=$as_save_IFS
6784
+
6785
+ fi
6786
+ fi
6787
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6788
+ if test -n "$ac_ct_RANLIB"; then
6789
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6790
+ $as_echo "$ac_ct_RANLIB" >&6; }
6791
+ else
6792
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793
+ $as_echo "no" >&6; }
6794
+ fi
6795
+
6796
+ if test "x$ac_ct_RANLIB" = x; then
6797
+ RANLIB=":"
6798
+ else
6799
+ case $cross_compiling:$ac_tool_warned in
6800
+ yes:)
6801
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6802
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6803
+ ac_tool_warned=yes ;;
6804
+ esac
6805
+ RANLIB=$ac_ct_RANLIB
6806
+ fi
6807
+ else
6808
+ RANLIB="$ac_cv_prog_RANLIB"
6809
+ fi
6810
+
6811
+ if test -n "$ac_tool_prefix"; then
6812
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6813
+ set dummy ${ac_tool_prefix}strip; ac_word=$2
6814
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6815
+ $as_echo_n "checking for $ac_word... " >&6; }
6816
+ if ${ac_cv_prog_STRIP+:} false; then :
6817
+ $as_echo_n "(cached) " >&6
6818
+ else
6819
+ if test -n "$STRIP"; then
6820
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6821
+ else
6822
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823
+ for as_dir in $PATH
6824
+ do
6825
+ IFS=$as_save_IFS
6826
+ test -z "$as_dir" && as_dir=.
6827
+ for ac_exec_ext in '' $ac_executable_extensions; do
6828
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6829
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6830
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6831
+ break 2
6832
+ fi
6833
+ done
6834
+ done
6835
+ IFS=$as_save_IFS
6836
+
6837
+ fi
6838
+ fi
6839
+ STRIP=$ac_cv_prog_STRIP
6840
+ if test -n "$STRIP"; then
6841
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6842
+ $as_echo "$STRIP" >&6; }
6843
+ else
6844
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6845
+ $as_echo "no" >&6; }
6846
+ fi
6847
+
6848
+
6849
+ fi
6850
+ if test -z "$ac_cv_prog_STRIP"; then
6851
+ ac_ct_STRIP=$STRIP
6852
+ # Extract the first word of "strip", so it can be a program name with args.
6853
+ set dummy strip; ac_word=$2
6854
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6855
+ $as_echo_n "checking for $ac_word... " >&6; }
6856
+ if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6857
+ $as_echo_n "(cached) " >&6
6858
+ else
6859
+ if test -n "$ac_ct_STRIP"; then
6860
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6861
+ else
6862
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6863
+ for as_dir in $PATH
6864
+ do
6865
+ IFS=$as_save_IFS
6866
+ test -z "$as_dir" && as_dir=.
6867
+ for ac_exec_ext in '' $ac_executable_extensions; do
6868
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6869
+ ac_cv_prog_ac_ct_STRIP="strip"
6870
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6871
+ break 2
6872
+ fi
6873
+ done
6874
+ done
6875
+ IFS=$as_save_IFS
6876
+
6877
+ fi
6878
+ fi
6879
+ ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6880
+ if test -n "$ac_ct_STRIP"; then
6881
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6882
+ $as_echo "$ac_ct_STRIP" >&6; }
6883
+ else
6884
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6885
+ $as_echo "no" >&6; }
6886
+ fi
6887
+
6888
+ if test "x$ac_ct_STRIP" = x; then
6889
+ STRIP=":"
6890
+ else
6891
+ case $cross_compiling:$ac_tool_warned in
6892
+ yes:)
6893
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6894
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6895
+ ac_tool_warned=yes ;;
6896
+ esac
6897
+ STRIP=$ac_ct_STRIP
6898
+ fi
6899
+ else
6900
+ STRIP="$ac_cv_prog_STRIP"
6901
+ fi
6902
+
6903
+
6904
+ old_CC="$CC"
6905
+ old_CFLAGS="$CFLAGS"
6906
+
6907
+ # Set sane defaults for various variables
6908
+ test -z "$AR" && AR=ar
6909
+ test -z "$AR_FLAGS" && AR_FLAGS=cru
6910
+ test -z "$AS" && AS=as
6911
+ test -z "$CC" && CC=cc
6912
+ test -z "$LTCC" && LTCC=$CC
6913
+ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6914
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
6915
+ test -z "$LD" && LD=ld
6916
+ test -z "$LN_S" && LN_S="ln -s"
6917
+ test -z "$MAGIC_CMD" && MAGIC_CMD=file
6918
+ test -z "$NM" && NM=nm
6919
+ test -z "$SED" && SED=sed
6920
+ test -z "$OBJDUMP" && OBJDUMP=objdump
6921
+ test -z "$RANLIB" && RANLIB=:
6922
+ test -z "$STRIP" && STRIP=:
6923
+ test -z "$ac_objext" && ac_objext=o
6924
+
6925
+ # Determine commands to create old-style static archives.
6926
+ old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6927
+ old_postinstall_cmds='chmod 644 $oldlib'
6928
+ old_postuninstall_cmds=
6929
+
6930
+ if test -n "$RANLIB"; then
6931
+ case $host_os in
6932
+ openbsd*)
6933
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6934
+ ;;
6935
+ *)
6936
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6937
+ ;;
6938
+ esac
6939
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6940
+ fi
6941
+
6942
+ for cc_temp in $compiler""; do
6943
+ case $cc_temp in
6944
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
6945
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
6946
+ \-*) ;;
6947
+ *) break;;
6948
+ esac
6949
+ done
6950
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6951
+
6952
+
6953
+ # Only perform the check for file, if the check method requires it
6954
+ case $deplibs_check_method in
6955
+ file_magic*)
6956
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6957
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
6958
+ $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
6959
+ if ${lt_cv_path_MAGIC_CMD+:} false; then :
6960
+ $as_echo_n "(cached) " >&6
6961
+ else
6962
+ case $MAGIC_CMD in
6963
+ [\\/*] | ?:[\\/]*)
6964
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6965
+ ;;
6966
+ *)
6967
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
6968
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6969
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6970
+ for ac_dir in $ac_dummy; do
6971
+ IFS="$lt_save_ifs"
6972
+ test -z "$ac_dir" && ac_dir=.
6973
+ if test -f $ac_dir/${ac_tool_prefix}file; then
6974
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
6975
+ if test -n "$file_magic_test_file"; then
6976
+ case $deplibs_check_method in
6977
+ "file_magic "*)
6978
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6979
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6980
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6981
+ $EGREP "$file_magic_regex" > /dev/null; then
6982
+ :
6983
+ else
6984
+ cat <<EOF 1>&2
6985
+
6986
+ *** Warning: the command libtool uses to detect shared libraries,
6987
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
6988
+ *** The result is that libtool may fail to recognize shared libraries
6989
+ *** as such. This will affect the creation of libtool libraries that
6990
+ *** depend on shared libraries, but programs linked with such libtool
6991
+ *** libraries will work regardless of this problem. Nevertheless, you
6992
+ *** may want to report the problem to your system manager and/or to
6993
+ *** bug-libtool@gnu.org
6994
+
6995
+ EOF
6996
+ fi ;;
6997
+ esac
6998
+ fi
6999
+ break
7000
+ fi
7001
+ done
7002
+ IFS="$lt_save_ifs"
7003
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
7004
+ ;;
7005
+ esac
7006
+ fi
7007
+
7008
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7009
+ if test -n "$MAGIC_CMD"; then
7010
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7011
+ $as_echo "$MAGIC_CMD" >&6; }
7012
+ else
7013
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7014
+ $as_echo "no" >&6; }
7015
+ fi
7016
+
7017
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
7018
+ if test -n "$ac_tool_prefix"; then
7019
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
7020
+ $as_echo_n "checking for file... " >&6; }
7021
+ if ${lt_cv_path_MAGIC_CMD+:} false; then :
7022
+ $as_echo_n "(cached) " >&6
7023
+ else
7024
+ case $MAGIC_CMD in
7025
+ [\\/*] | ?:[\\/]*)
7026
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7027
+ ;;
7028
+ *)
7029
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
7030
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7031
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7032
+ for ac_dir in $ac_dummy; do
7033
+ IFS="$lt_save_ifs"
7034
+ test -z "$ac_dir" && ac_dir=.
7035
+ if test -f $ac_dir/file; then
7036
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
7037
+ if test -n "$file_magic_test_file"; then
7038
+ case $deplibs_check_method in
7039
+ "file_magic "*)
7040
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7041
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7042
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7043
+ $EGREP "$file_magic_regex" > /dev/null; then
7044
+ :
7045
+ else
7046
+ cat <<EOF 1>&2
7047
+
7048
+ *** Warning: the command libtool uses to detect shared libraries,
7049
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
7050
+ *** The result is that libtool may fail to recognize shared libraries
7051
+ *** as such. This will affect the creation of libtool libraries that
7052
+ *** depend on shared libraries, but programs linked with such libtool
7053
+ *** libraries will work regardless of this problem. Nevertheless, you
7054
+ *** may want to report the problem to your system manager and/or to
7055
+ *** bug-libtool@gnu.org
7056
+
7057
+ EOF
7058
+ fi ;;
7059
+ esac
7060
+ fi
7061
+ break
7062
+ fi
7063
+ done
7064
+ IFS="$lt_save_ifs"
7065
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
7066
+ ;;
7067
+ esac
7068
+ fi
7069
+
7070
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7071
+ if test -n "$MAGIC_CMD"; then
7072
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7073
+ $as_echo "$MAGIC_CMD" >&6; }
7074
+ else
7075
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7076
+ $as_echo "no" >&6; }
7077
+ fi
7078
+
7079
+ else
7080
+ MAGIC_CMD=:
7081
+ fi
7082
+ fi
7083
+
7084
+ fi
7085
+ ;;
7086
+ esac
7087
+
7088
+
7089
+ case $host_os in
7090
+ rhapsody* | darwin*)
7091
+ if test -n "$ac_tool_prefix"; then
7092
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7093
+ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7094
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095
+ $as_echo_n "checking for $ac_word... " >&6; }
7096
+ if ${ac_cv_prog_DSYMUTIL+:} false; then :
7097
+ $as_echo_n "(cached) " >&6
7098
+ else
7099
+ if test -n "$DSYMUTIL"; then
7100
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7101
+ else
7102
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103
+ for as_dir in $PATH
7104
+ do
7105
+ IFS=$as_save_IFS
7106
+ test -z "$as_dir" && as_dir=.
7107
+ for ac_exec_ext in '' $ac_executable_extensions; do
7108
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7109
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7110
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111
+ break 2
7112
+ fi
7113
+ done
7114
+ done
7115
+ IFS=$as_save_IFS
7116
+
7117
+ fi
7118
+ fi
7119
+ DSYMUTIL=$ac_cv_prog_DSYMUTIL
7120
+ if test -n "$DSYMUTIL"; then
7121
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7122
+ $as_echo "$DSYMUTIL" >&6; }
7123
+ else
7124
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7125
+ $as_echo "no" >&6; }
7126
+ fi
7127
+
7128
+
7129
+ fi
7130
+ if test -z "$ac_cv_prog_DSYMUTIL"; then
7131
+ ac_ct_DSYMUTIL=$DSYMUTIL
7132
+ # Extract the first word of "dsymutil", so it can be a program name with args.
7133
+ set dummy dsymutil; ac_word=$2
7134
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135
+ $as_echo_n "checking for $ac_word... " >&6; }
7136
+ if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
7137
+ $as_echo_n "(cached) " >&6
7138
+ else
7139
+ if test -n "$ac_ct_DSYMUTIL"; then
7140
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7141
+ else
7142
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143
+ for as_dir in $PATH
7144
+ do
7145
+ IFS=$as_save_IFS
7146
+ test -z "$as_dir" && as_dir=.
7147
+ for ac_exec_ext in '' $ac_executable_extensions; do
7148
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7149
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7150
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151
+ break 2
7152
+ fi
7153
+ done
7154
+ done
7155
+ IFS=$as_save_IFS
7156
+
7157
+ fi
7158
+ fi
7159
+ ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7160
+ if test -n "$ac_ct_DSYMUTIL"; then
7161
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7162
+ $as_echo "$ac_ct_DSYMUTIL" >&6; }
7163
+ else
7164
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165
+ $as_echo "no" >&6; }
7166
+ fi
7167
+
7168
+ if test "x$ac_ct_DSYMUTIL" = x; then
7169
+ DSYMUTIL=":"
7170
+ else
7171
+ case $cross_compiling:$ac_tool_warned in
7172
+ yes:)
7173
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7174
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7175
+ ac_tool_warned=yes ;;
7176
+ esac
7177
+ DSYMUTIL=$ac_ct_DSYMUTIL
7178
+ fi
7179
+ else
7180
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7181
+ fi
7182
+
7183
+ if test -n "$ac_tool_prefix"; then
7184
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7185
+ set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7186
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187
+ $as_echo_n "checking for $ac_word... " >&6; }
7188
+ if ${ac_cv_prog_NMEDIT+:} false; then :
7189
+ $as_echo_n "(cached) " >&6
7190
+ else
7191
+ if test -n "$NMEDIT"; then
7192
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7193
+ else
7194
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195
+ for as_dir in $PATH
7196
+ do
7197
+ IFS=$as_save_IFS
7198
+ test -z "$as_dir" && as_dir=.
7199
+ for ac_exec_ext in '' $ac_executable_extensions; do
7200
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7201
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7202
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7203
+ break 2
7204
+ fi
7205
+ done
7206
+ done
7207
+ IFS=$as_save_IFS
7208
+
7209
+ fi
7210
+ fi
7211
+ NMEDIT=$ac_cv_prog_NMEDIT
7212
+ if test -n "$NMEDIT"; then
7213
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7214
+ $as_echo "$NMEDIT" >&6; }
7215
+ else
7216
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217
+ $as_echo "no" >&6; }
7218
+ fi
7219
+
7220
+
7221
+ fi
7222
+ if test -z "$ac_cv_prog_NMEDIT"; then
7223
+ ac_ct_NMEDIT=$NMEDIT
7224
+ # Extract the first word of "nmedit", so it can be a program name with args.
7225
+ set dummy nmedit; ac_word=$2
7226
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7227
+ $as_echo_n "checking for $ac_word... " >&6; }
7228
+ if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7229
+ $as_echo_n "(cached) " >&6
7230
+ else
7231
+ if test -n "$ac_ct_NMEDIT"; then
7232
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7233
+ else
7234
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7235
+ for as_dir in $PATH
7236
+ do
7237
+ IFS=$as_save_IFS
7238
+ test -z "$as_dir" && as_dir=.
7239
+ for ac_exec_ext in '' $ac_executable_extensions; do
7240
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7241
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
7242
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7243
+ break 2
7244
+ fi
7245
+ done
7246
+ done
7247
+ IFS=$as_save_IFS
7248
+
7249
+ fi
7250
+ fi
7251
+ ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7252
+ if test -n "$ac_ct_NMEDIT"; then
7253
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7254
+ $as_echo "$ac_ct_NMEDIT" >&6; }
7255
+ else
7256
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257
+ $as_echo "no" >&6; }
7258
+ fi
7259
+
7260
+ if test "x$ac_ct_NMEDIT" = x; then
7261
+ NMEDIT=":"
7262
+ else
7263
+ case $cross_compiling:$ac_tool_warned in
7264
+ yes:)
7265
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7266
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7267
+ ac_tool_warned=yes ;;
7268
+ esac
7269
+ NMEDIT=$ac_ct_NMEDIT
7270
+ fi
7271
+ else
7272
+ NMEDIT="$ac_cv_prog_NMEDIT"
7273
+ fi
7274
+
7275
+
7276
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
7277
+ $as_echo_n "checking for -single_module linker flag... " >&6; }
7278
+ if ${lt_cv_apple_cc_single_mod+:} false; then :
7279
+ $as_echo_n "(cached) " >&6
7280
+ else
7281
+ lt_cv_apple_cc_single_mod=no
7282
+ if test -z "${LT_MULTI_MODULE}"; then
7283
+ # By default we will add the -single_module flag. You can override
7284
+ # by either setting the environment variable LT_MULTI_MODULE
7285
+ # non-empty at configure time, or by adding -multi_module to the
7286
+ # link flags.
7287
+ echo "int foo(void){return 1;}" > conftest.c
7288
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7289
+ -dynamiclib ${wl}-single_module conftest.c
7290
+ if test -f libconftest.dylib; then
7291
+ lt_cv_apple_cc_single_mod=yes
7292
+ rm -rf libconftest.dylib*
7293
+ fi
7294
+ rm conftest.c
7295
+ fi
7296
+ fi
7297
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
7298
+ $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
7299
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
7300
+ $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
7301
+ if ${lt_cv_ld_exported_symbols_list+:} false; then :
7302
+ $as_echo_n "(cached) " >&6
7303
+ else
7304
+ lt_cv_ld_exported_symbols_list=no
7305
+ save_LDFLAGS=$LDFLAGS
7306
+ echo "_main" > conftest.sym
7307
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
7308
+
7309
+ cat > conftest.$ac_ext <<EOF
7310
+ #line __oline__ "configure"
7311
+ #include "confdefs.h"
7312
+ int main() {
7313
+ ; return 0; }
7314
+ EOF
7315
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7316
+ (eval $ac_link) 2>&5
7317
+ ac_status=$?
7318
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7319
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7320
+ lt_cv_ld_exported_symbols_list=yes
7321
+ rm -rf conftest*
7322
+ else
7323
+ echo "configure: failed program was:" >&5
7324
+ cat conftest.$ac_ext >&6
7325
+ lt_cv_ld_exported_symbols_list=no
7326
+ rm -rf conftest*
7327
+ fi
7328
+ rm -f conftest*
7329
+ LDFLAGS="$save_LDFLAGS"
7330
+
7331
+ fi
7332
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
7333
+ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
7334
+ case $host_os in
7335
+ rhapsody* | darwin1.[0123])
7336
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
7337
+ darwin1.*)
7338
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7339
+ darwin*)
7340
+ # if running on 10.5 or later, the deployment target defaults
7341
+ # to the OS version, if on x86, and 10.4, the deployment
7342
+ # target defaults to 10.4. Don't you love it?
7343
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
7344
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
7345
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7346
+ 10.[012]*)
7347
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7348
+ 10.*)
7349
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7350
+ esac
7351
+ ;;
7352
+ esac
7353
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
7354
+ _lt_dar_single_mod='$single_module'
7355
+ fi
7356
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
7357
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
7358
+ else
7359
+ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
7360
+ fi
7361
+ if test "$DSYMUTIL" != ":"; then
7362
+ _lt_dsymutil="~$DSYMUTIL \$lib || :"
7363
+ else
7364
+ _lt_dsymutil=
7365
+ fi
7366
+ ;;
7367
+ esac
7368
+
7369
+
7370
+ enable_dlopen=no
7371
+ enable_win32_dll=no
7372
+
7373
+ @%:@ Check whether --enable-libtool-lock was given.
7374
+ if test "${enable_libtool_lock+set}" = set; then :
7375
+ enableval=$enable_libtool_lock;
7376
+ fi
7377
+
7378
+ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7379
+
7380
+
7381
+ @%:@ Check whether --with-pic was given.
7382
+ if test "${with_pic+set}" = set; then :
7383
+ withval=$with_pic; pic_mode="$withval"
7384
+ else
7385
+ pic_mode=default
7386
+ fi
7387
+
7388
+ test -z "$pic_mode" && pic_mode=default
7389
+
7390
+ # Use C for the default configuration in the libtool script
7391
+ tagname=
7392
+ lt_save_CC="$CC"
7393
+
7394
+ ac_ext=c
7395
+ ac_cpp='$CPP $CPPFLAGS'
7396
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7397
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7398
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
7399
+
7400
+
7401
+ # Source file extension for C test sources.
7402
+ ac_ext=c
7403
+
7404
+ # Object file extension for compiled C test sources.
7405
+ objext=o
7406
+ objext=$objext
7407
+
7408
+ # Code to be used in simple compile tests
7409
+ lt_simple_compile_test_code="int some_variable = 0;"
7410
+
7411
+ # Code to be used in simple link tests
7412
+ lt_simple_link_test_code='int main(){return(0);}'
7413
+
7414
+
7415
+ # If no C compiler was specified, use CC.
7416
+ LTCC=${LTCC-"$CC"}
7417
+
7418
+ # If no C compiler flags were specified, use CFLAGS.
7419
+ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7420
+
7421
+ # Allow CC to be a program name with arguments.
7422
+ compiler=$CC
7423
+
7424
+
7425
+ # save warnings/boilerplate of simple test code
7426
+ ac_outfile=conftest.$ac_objext
7427
+ echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7428
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7429
+ _lt_compiler_boilerplate=`cat conftest.err`
7430
+ $rm conftest*
7431
+
7432
+ ac_outfile=conftest.$ac_objext
7433
+ echo "$lt_simple_link_test_code" >conftest.$ac_ext
7434
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7435
+ _lt_linker_boilerplate=`cat conftest.err`
7436
+ $rm -r conftest*
7437
+
7438
+
7439
+ ## CAVEAT EMPTOR:
7440
+ ## There is no encapsulation within the following macros, do not change
7441
+ ## the running order or otherwise move them around unless you know exactly
7442
+ ## what you are doing...
7443
+
7444
+ lt_prog_compiler_no_builtin_flag=
7445
+
7446
+ if test "$GCC" = yes; then
7447
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7448
+
7449
+
7450
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7451
+ $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7452
+ if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
7453
+ $as_echo_n "(cached) " >&6
7454
+ else
7455
+ lt_cv_prog_compiler_rtti_exceptions=no
7456
+ ac_outfile=conftest.$ac_objext
7457
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7458
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
7459
+ # Insert the option either (1) after the last *FLAGS variable, or
7460
+ # (2) before a word containing "conftest.", or (3) at the end.
7461
+ # Note that $ac_compile itself does not contain backslashes and begins
7462
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
7463
+ # The option is referenced via a variable to avoid confusing sed.
7464
+ lt_compile=`echo "$ac_compile" | $SED \
7465
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7466
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7467
+ -e 's:$: $lt_compiler_flag:'`
7468
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
7469
+ (eval "$lt_compile" 2>conftest.err)
7470
+ ac_status=$?
7471
+ cat conftest.err >&5
7472
+ echo "configure:__oline__: \$? = $ac_status" >&5
7473
+ if (exit $ac_status) && test -s "$ac_outfile"; then
7474
+ # The compiler can only warn and ignore the option if not recognized
7475
+ # So say no if there are warnings other than the usual output.
7476
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7477
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7478
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7479
+ lt_cv_prog_compiler_rtti_exceptions=yes
7480
+ fi
7481
+ fi
7482
+ $rm conftest*
7483
+
7484
+ fi
7485
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7486
+ $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7487
+
7488
+ if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7489
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7490
+ else
7491
+ :
7492
+ fi
7493
+
7494
+ fi
7495
+
7496
+ lt_prog_compiler_wl=
7497
+ lt_prog_compiler_pic=
7498
+ lt_prog_compiler_static=
7499
+
7500
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7501
+ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7502
+
7503
+ if test "$GCC" = yes; then
7504
+ lt_prog_compiler_wl='-Wl,'
7505
+ lt_prog_compiler_static='-static'
7506
+
7507
+ case $host_os in
7508
+ aix*)
7509
+ # All AIX code is PIC.
7510
+ if test "$host_cpu" = ia64; then
7511
+ # AIX 5 now supports IA64 processor
7512
+ lt_prog_compiler_static='-Bstatic'
7513
+ fi
7514
+ ;;
7515
+
7516
+ amigaos*)
7517
+ # FIXME: we need at least 68020 code to build shared libraries, but
7518
+ # adding the `-m68020' flag to GCC prevents building anything better,
7519
+ # like `-m68040'.
7520
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7521
+ ;;
7522
+
7523
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7524
+ # PIC is the default for these OSes.
7525
+ ;;
7526
+
7527
+ mingw* | cygwin* | pw32* | os2*)
7528
+ # This hack is so that the source file can tell whether it is being
7529
+ # built for inclusion in a dll (and should export symbols for example).
7530
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
7531
+ # (--disable-auto-import) libraries
7532
+ lt_prog_compiler_pic='-DDLL_EXPORT'
7533
+ ;;
7534
+
7535
+ darwin* | rhapsody*)
7536
+ # PIC is the default on this platform
7537
+ # Common symbols not allowed in MH_DYLIB files
7538
+ lt_prog_compiler_pic='-fno-common'
7539
+ ;;
7540
+
7541
+ interix[3-9]*)
7542
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7543
+ # Instead, we relocate shared libraries at runtime.
7544
+ ;;
7545
+
7546
+ msdosdjgpp*)
7547
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
7548
+ # on systems that don't support them.
7549
+ lt_prog_compiler_can_build_shared=no
7550
+ enable_shared=no
7551
+ ;;
7552
+
7553
+ sysv4*MP*)
7554
+ if test -d /usr/nec; then
7555
+ lt_prog_compiler_pic=-Kconform_pic
7556
+ fi
7557
+ ;;
7558
+
7559
+ hpux*)
7560
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7561
+ # not for PA HP-UX.
7562
+ case $host_cpu in
7563
+ hppa*64*|ia64*)
7564
+ # +Z the default
7565
+ ;;
7566
+ *)
7567
+ lt_prog_compiler_pic='-fPIC'
7568
+ ;;
7569
+ esac
7570
+ ;;
7571
+
7572
+ *)
7573
+ lt_prog_compiler_pic='-fPIC'
7574
+ ;;
7575
+ esac
7576
+ else
7577
+ # PORTME Check for flag to pass linker flags through the system compiler.
7578
+ case $host_os in
7579
+ aix*)
7580
+ lt_prog_compiler_wl='-Wl,'
7581
+ if test "$host_cpu" = ia64; then
7582
+ # AIX 5 now supports IA64 processor
7583
+ lt_prog_compiler_static='-Bstatic'
7584
+ else
7585
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7586
+ fi
7587
+ ;;
7588
+ darwin*)
7589
+ # PIC is the default on this platform
7590
+ # Common symbols not allowed in MH_DYLIB files
7591
+ case $cc_basename in
7592
+ xlc*)
7593
+ lt_prog_compiler_pic='-qnocommon'
7594
+ lt_prog_compiler_wl='-Wl,'
7595
+ ;;
7596
+ esac
7597
+ ;;
7598
+
7599
+ mingw* | cygwin* | pw32* | os2*)
7600
+ # This hack is so that the source file can tell whether it is being
7601
+ # built for inclusion in a dll (and should export symbols for example).
7602
+ lt_prog_compiler_pic='-DDLL_EXPORT'
7603
+ ;;
7604
+
7605
+ hpux9* | hpux10* | hpux11*)
7606
+ lt_prog_compiler_wl='-Wl,'
7607
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7608
+ # not for PA HP-UX.
7609
+ case $host_cpu in
7610
+ hppa*64*|ia64*)
7611
+ # +Z the default
7612
+ ;;
7613
+ *)
7614
+ lt_prog_compiler_pic='+Z'
7615
+ ;;
7616
+ esac
7617
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
7618
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
7619
+ ;;
7620
+
7621
+ irix5* | irix6* | nonstopux*)
7622
+ lt_prog_compiler_wl='-Wl,'
7623
+ # PIC (with -KPIC) is the default.
7624
+ lt_prog_compiler_static='-non_shared'
7625
+ ;;
7626
+
7627
+ newsos6)
7628
+ lt_prog_compiler_pic='-KPIC'
7629
+ lt_prog_compiler_static='-Bstatic'
7630
+ ;;
7631
+
7632
+ linux* | k*bsd*-gnu)
7633
+ case $cc_basename in
7634
+ # old Intel for x86_64 which still supported -KPIC.
7635
+ ecc*)
7636
+ lt_prog_compiler_wl='-Wl,'
7637
+ lt_prog_compiler_pic='-KPIC'
7638
+ lt_prog_compiler_static='-static'
7639
+ ;;
7640
+ # icc used to be incompatible with GCC.
7641
+ # ICC 10 doesn't accept -KPIC any more.
7642
+ icc*)
7643
+ lt_prog_compiler_wl='-Wl,'
7644
+ lt_prog_compiler_pic='-fPIC'
7645
+ lt_prog_compiler_static='-static'
7646
+ ;;
7647
+ pgcc* | pgf77* | pgf90* | pgf95*)
7648
+ # Portland Group compilers (*not* the Pentium gcc compiler,
7649
+ # which looks to be a dead project)
7650
+ lt_prog_compiler_wl='-Wl,'
7651
+ lt_prog_compiler_pic='-fpic'
7652
+ lt_prog_compiler_static='-Bstatic'
7653
+ ;;
7654
+ ccc*)
7655
+ lt_prog_compiler_wl='-Wl,'
7656
+ # All Alpha code is PIC.
7657
+ lt_prog_compiler_static='-non_shared'
7658
+ ;;
7659
+ *)
7660
+ case `$CC -V 2>&1 | sed 5q` in
7661
+ *Sun\ C*)
7662
+ # Sun C 5.9
7663
+ lt_prog_compiler_pic='-KPIC'
7664
+ lt_prog_compiler_static='-Bstatic'
7665
+ lt_prog_compiler_wl='-Wl,'
7666
+ ;;
7667
+ *Sun\ F*)
7668
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
7669
+ lt_prog_compiler_pic='-KPIC'
7670
+ lt_prog_compiler_static='-Bstatic'
7671
+ lt_prog_compiler_wl=''
7672
+ ;;
7673
+ esac
7674
+ ;;
7675
+ esac
7676
+ ;;
7677
+
7678
+ osf3* | osf4* | osf5*)
7679
+ lt_prog_compiler_wl='-Wl,'
7680
+ # All OSF/1 code is PIC.
7681
+ lt_prog_compiler_static='-non_shared'
7682
+ ;;
7683
+
7684
+ rdos*)
7685
+ lt_prog_compiler_static='-non_shared'
7686
+ ;;
7687
+
7688
+ solaris*)
7689
+ lt_prog_compiler_pic='-KPIC'
7690
+ lt_prog_compiler_static='-Bstatic'
7691
+ case $cc_basename in
7692
+ f77* | f90* | f95*)
7693
+ lt_prog_compiler_wl='-Qoption ld ';;
7694
+ *)
7695
+ lt_prog_compiler_wl='-Wl,';;
7696
+ esac
7697
+ ;;
7698
+
7699
+ sunos4*)
7700
+ lt_prog_compiler_wl='-Qoption ld '
7701
+ lt_prog_compiler_pic='-PIC'
7702
+ lt_prog_compiler_static='-Bstatic'
7703
+ ;;
7704
+
7705
+ sysv4 | sysv4.2uw2* | sysv4.3*)
7706
+ lt_prog_compiler_wl='-Wl,'
7707
+ lt_prog_compiler_pic='-KPIC'
7708
+ lt_prog_compiler_static='-Bstatic'
7709
+ ;;
7710
+
7711
+ sysv4*MP*)
7712
+ if test -d /usr/nec ;then
7713
+ lt_prog_compiler_pic='-Kconform_pic'
7714
+ lt_prog_compiler_static='-Bstatic'
7715
+ fi
7716
+ ;;
7717
+
7718
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7719
+ lt_prog_compiler_wl='-Wl,'
7720
+ lt_prog_compiler_pic='-KPIC'
7721
+ lt_prog_compiler_static='-Bstatic'
7722
+ ;;
7723
+
7724
+ unicos*)
7725
+ lt_prog_compiler_wl='-Wl,'
7726
+ lt_prog_compiler_can_build_shared=no
7727
+ ;;
7728
+
7729
+ uts4*)
7730
+ lt_prog_compiler_pic='-pic'
7731
+ lt_prog_compiler_static='-Bstatic'
7732
+ ;;
7733
+
7734
+ *)
7735
+ lt_prog_compiler_can_build_shared=no
7736
+ ;;
7737
+ esac
7738
+ fi
7739
+
7740
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7741
+ $as_echo "$lt_prog_compiler_pic" >&6; }
7742
+
7743
+ #
7744
+ # Check to make sure the PIC flag actually works.
7745
+ #
7746
+ if test -n "$lt_prog_compiler_pic"; then
7747
+
7748
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7749
+ $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7750
+ if ${lt_cv_prog_compiler_pic_works+:} false; then :
7751
+ $as_echo_n "(cached) " >&6
7752
+ else
7753
+ lt_cv_prog_compiler_pic_works=no
7754
+ ac_outfile=conftest.$ac_objext
7755
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7756
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7757
+ # Insert the option either (1) after the last *FLAGS variable, or
7758
+ # (2) before a word containing "conftest.", or (3) at the end.
7759
+ # Note that $ac_compile itself does not contain backslashes and begins
7760
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
7761
+ # The option is referenced via a variable to avoid confusing sed.
7762
+ lt_compile=`echo "$ac_compile" | $SED \
7763
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7764
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7765
+ -e 's:$: $lt_compiler_flag:'`
7766
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
7767
+ (eval "$lt_compile" 2>conftest.err)
7768
+ ac_status=$?
7769
+ cat conftest.err >&5
7770
+ echo "configure:__oline__: \$? = $ac_status" >&5
7771
+ if (exit $ac_status) && test -s "$ac_outfile"; then
7772
+ # The compiler can only warn and ignore the option if not recognized
7773
+ # So say no if there are warnings other than the usual output.
7774
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7775
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7776
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7777
+ lt_cv_prog_compiler_pic_works=yes
7778
+ fi
7779
+ fi
7780
+ $rm conftest*
7781
+
7782
+ fi
7783
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
7784
+ $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
7785
+
7786
+ if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
7787
+ case $lt_prog_compiler_pic in
7788
+ "" | " "*) ;;
7789
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7790
+ esac
7791
+ else
7792
+ lt_prog_compiler_pic=
7793
+ lt_prog_compiler_can_build_shared=no
7794
+ fi
7795
+
7796
+ fi
7797
+ case $host_os in
7798
+ # For platforms which do not support PIC, -DPIC is meaningless:
7799
+ *djgpp*)
7800
+ lt_prog_compiler_pic=
7801
+ ;;
7802
+ *)
7803
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7804
+ ;;
7805
+ esac
7806
+
7807
+ #
7808
+ # Check to make sure the static flag actually works.
7809
+ #
7810
+ wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
7811
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
7812
+ $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
7813
+ if ${lt_cv_prog_compiler_static_works+:} false; then :
7814
+ $as_echo_n "(cached) " >&6
7815
+ else
7816
+ lt_cv_prog_compiler_static_works=no
7817
+ save_LDFLAGS="$LDFLAGS"
7818
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
7819
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
7820
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7821
+ # The linker can only warn and ignore the option if not recognized
7822
+ # So say no if there are warnings
7823
+ if test -s conftest.err; then
7824
+ # Append any errors to the config.log.
7825
+ cat conftest.err 1>&5
7826
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7827
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7828
+ if diff conftest.exp conftest.er2 >/dev/null; then
7829
+ lt_cv_prog_compiler_static_works=yes
7830
+ fi
7831
+ else
7832
+ lt_cv_prog_compiler_static_works=yes
7833
+ fi
7834
+ fi
7835
+ $rm -r conftest*
7836
+ LDFLAGS="$save_LDFLAGS"
7837
+
7838
+ fi
7839
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
7840
+ $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
7841
+
7842
+ if test x"$lt_cv_prog_compiler_static_works" = xyes; then
7843
+ :
7844
+ else
7845
+ lt_prog_compiler_static=
7846
+ fi
7847
+
7848
+
7849
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
7850
+ $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
7851
+ if ${lt_cv_prog_compiler_c_o+:} false; then :
7852
+ $as_echo_n "(cached) " >&6
7853
+ else
7854
+ lt_cv_prog_compiler_c_o=no
7855
+ $rm -r conftest 2>/dev/null
7856
+ mkdir conftest
7857
+ cd conftest
7858
+ mkdir out
7859
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7860
+
7861
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
7862
+ # Insert the option either (1) after the last *FLAGS variable, or
7863
+ # (2) before a word containing "conftest.", or (3) at the end.
7864
+ # Note that $ac_compile itself does not contain backslashes and begins
7865
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
7866
+ lt_compile=`echo "$ac_compile" | $SED \
7867
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7868
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7869
+ -e 's:$: $lt_compiler_flag:'`
7870
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
7871
+ (eval "$lt_compile" 2>out/conftest.err)
7872
+ ac_status=$?
7873
+ cat out/conftest.err >&5
7874
+ echo "configure:__oline__: \$? = $ac_status" >&5
7875
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
7876
+ then
7877
+ # The compiler can only warn and ignore the option if not recognized
7878
+ # So say no if there are warnings
7879
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7880
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7881
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7882
+ lt_cv_prog_compiler_c_o=yes
7883
+ fi
7884
+ fi
7885
+ chmod u+w . 2>&5
7886
+ $rm conftest*
7887
+ # SGI C++ compiler will create directory out/ii_files/ for
7888
+ # template instantiation
7889
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7890
+ $rm out/* && rmdir out
7891
+ cd ..
7892
+ rmdir conftest
7893
+ $rm conftest*
7894
+
7895
+ fi
7896
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
7897
+ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
7898
+
7899
+
7900
+ hard_links="nottested"
7901
+ if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7902
+ # do not overwrite the value of need_locks provided by the user
7903
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
7904
+ $as_echo_n "checking if we can lock with hard links... " >&6; }
7905
+ hard_links=yes
7906
+ $rm conftest*
7907
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
7908
+ touch conftest.a
7909
+ ln conftest.a conftest.b 2>&5 || hard_links=no
7910
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
7911
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
7912
+ $as_echo "$hard_links" >&6; }
7913
+ if test "$hard_links" = no; then
7914
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7915
+ $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7916
+ need_locks=warn
7917
+ fi
7918
+ else
7919
+ need_locks=no
7920
+ fi
7921
+
7922
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7923
+ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
7924
+
7925
+ runpath_var=
7926
+ allow_undefined_flag=
7927
+ enable_shared_with_static_runtimes=no
7928
+ archive_cmds=
7929
+ archive_expsym_cmds=
7930
+ old_archive_From_new_cmds=
7931
+ old_archive_from_expsyms_cmds=
7932
+ export_dynamic_flag_spec=
7933
+ whole_archive_flag_spec=
7934
+ thread_safe_flag_spec=
7935
+ hardcode_libdir_flag_spec=
7936
+ hardcode_libdir_flag_spec_ld=
7937
+ hardcode_libdir_separator=
7938
+ hardcode_direct=no
7939
+ hardcode_minus_L=no
7940
+ hardcode_shlibpath_var=unsupported
7941
+ link_all_deplibs=unknown
7942
+ hardcode_automatic=no
7943
+ module_cmds=
7944
+ module_expsym_cmds=
7945
+ always_export_symbols=no
7946
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7947
+ # include_expsyms should be a list of space-separated symbols to be *always*
7948
+ # included in the symbol list
7949
+ include_expsyms=
7950
+ # exclude_expsyms can be an extended regexp of symbols to exclude
7951
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
7952
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7953
+ # as well as any symbol that contains `d'.
7954
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
7955
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7956
+ # platforms (ab)use it in PIC code, but their linkers get confused if
7957
+ # the symbol is explicitly referenced. Since portable code cannot
7958
+ # rely on this symbol name, it's probably fine to never include it in
7959
+ # preloaded symbol tables.
7960
+ # Exclude shared library initialization/finalization symbols.
7961
+ extract_expsyms_cmds=
7962
+ # Just being paranoid about ensuring that cc_basename is set.
7963
+ for cc_temp in $compiler""; do
7964
+ case $cc_temp in
7965
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7966
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7967
+ \-*) ;;
7968
+ *) break;;
7969
+ esac
7970
+ done
7971
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7972
+
7973
+ case $host_os in
7974
+ cygwin* | mingw* | pw32*)
7975
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
7976
+ # When not using gcc, we currently assume that we are using
7977
+ # Microsoft Visual C++.
7978
+ if test "$GCC" != yes; then
7979
+ with_gnu_ld=no
7980
+ fi
7981
+ ;;
7982
+ interix*)
7983
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
7984
+ with_gnu_ld=yes
7985
+ ;;
7986
+ openbsd*)
7987
+ with_gnu_ld=no
7988
+ ;;
7989
+ esac
7990
+
7991
+ ld_shlibs=yes
7992
+ if test "$with_gnu_ld" = yes; then
7993
+ # If archive_cmds runs LD, not CC, wlarc should be empty
7994
+ wlarc='${wl}'
7995
+
7996
+ # Set some defaults for GNU ld with shared library support. These
7997
+ # are reset later if shared libraries are not supported. Putting them
7998
+ # here allows them to be overridden if necessary.
7999
+ runpath_var=LD_RUN_PATH
8000
+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8001
+ export_dynamic_flag_spec='${wl}--export-dynamic'
8002
+ # ancient GNU ld didn't support --whole-archive et. al.
8003
+ if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8004
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8005
+ else
8006
+ whole_archive_flag_spec=
8007
+ fi
8008
+ supports_anon_versioning=no
8009
+ case `$LD -v 2>/dev/null` in
8010
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8011
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8012
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8013
+ *\ 2.11.*) ;; # other 2.11 versions
8014
+ *) supports_anon_versioning=yes ;;
8015
+ esac
8016
+
8017
+ # See if GNU ld supports shared libraries.
8018
+ case $host_os in
8019
+ aix[3-9]*)
8020
+ # On AIX/PPC, the GNU linker is very broken
8021
+ if test "$host_cpu" != ia64; then
8022
+ ld_shlibs=no
8023
+ cat <<EOF 1>&2
8024
+
8025
+ *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8026
+ *** to be unable to reliably create shared libraries on AIX.
8027
+ *** Therefore, libtool is disabling shared libraries support. If you
8028
+ *** really care for shared libraries, you may want to modify your PATH
8029
+ *** so that a non-GNU linker is found, and then restart.
8030
+
8031
+ EOF
8032
+ fi
8033
+ ;;
8034
+
8035
+ amigaos*)
8036
+ archive_cmds='$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)'
8037
+ hardcode_libdir_flag_spec='-L$libdir'
8038
+ hardcode_minus_L=yes
8039
+
8040
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8041
+ # that the semantics of dynamic libraries on AmigaOS, at least up
8042
+ # to version 4, is to share data among multiple programs linked
8043
+ # with the same dynamic library. Since this doesn't match the
8044
+ # behavior of shared libraries on other platforms, we can't use
8045
+ # them.
8046
+ ld_shlibs=no
8047
+ ;;
8048
+
8049
+ beos*)
8050
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8051
+ allow_undefined_flag=unsupported
8052
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8053
+ # support --undefined. This deserves some investigation. FIXME
8054
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8055
+ else
8056
+ ld_shlibs=no
8057
+ fi
8058
+ ;;
8059
+
8060
+ cygwin* | mingw* | pw32*)
8061
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8062
+ # as there is no search path for DLLs.
8063
+ hardcode_libdir_flag_spec='-L$libdir'
8064
+ allow_undefined_flag=unsupported
8065
+ always_export_symbols=no
8066
+ enable_shared_with_static_runtimes=yes
8067
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8068
+
8069
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8070
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8071
+ # If the export-symbols file already is a .def file (1st line
8072
+ # is EXPORTS), use it as is; otherwise, prepend...
8073
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8074
+ cp $export_symbols $output_objdir/$soname.def;
8075
+ else
8076
+ echo EXPORTS > $output_objdir/$soname.def;
8077
+ cat $export_symbols >> $output_objdir/$soname.def;
8078
+ fi~
8079
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8080
+ else
8081
+ ld_shlibs=no
8082
+ fi
8083
+ ;;
8084
+
8085
+ interix[3-9]*)
8086
+ hardcode_direct=no
8087
+ hardcode_shlibpath_var=no
8088
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8089
+ export_dynamic_flag_spec='${wl}-E'
8090
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8091
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
8092
+ # default) and relocated if they conflict, which is a slow very memory
8093
+ # consuming and fragmenting process. To avoid this, we pick a random,
8094
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8095
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8096
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8097
+ archive_expsym_cmds='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'
8098
+ ;;
8099
+
8100
+ gnu* | linux* | k*bsd*-gnu)
8101
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8102
+ tmp_addflag=
8103
+ case $cc_basename,$host_cpu in
8104
+ pgcc*) # Portland Group C compiler
8105
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8106
+ tmp_addflag=' $pic_flag'
8107
+ ;;
8108
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8109
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8110
+ tmp_addflag=' $pic_flag -Mnomain' ;;
8111
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8112
+ tmp_addflag=' -i_dynamic' ;;
8113
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8114
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
8115
+ ifc* | ifort*) # Intel Fortran compiler
8116
+ tmp_addflag=' -nofor_main' ;;
8117
+ esac
8118
+ case `$CC -V 2>&1 | sed 5q` in
8119
+ *Sun\ C*) # Sun C 5.9
8120
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8121
+ tmp_sharedflag='-G' ;;
8122
+ *Sun\ F*) # Sun Fortran 8.3
8123
+ tmp_sharedflag='-G' ;;
8124
+ *)
8125
+ tmp_sharedflag='-shared' ;;
8126
+ esac
8127
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8128
+
8129
+ if test $supports_anon_versioning = yes; then
8130
+ archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8131
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8132
+ $echo "local: *; };" >> $output_objdir/$libname.ver~
8133
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8134
+ fi
8135
+ else
8136
+ ld_shlibs=no
8137
+ fi
8138
+ ;;
8139
+
8140
+ netbsd*)
8141
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8142
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8143
+ wlarc=
8144
+ else
8145
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8146
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8147
+ fi
8148
+ ;;
8149
+
8150
+ solaris*)
8151
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8152
+ ld_shlibs=no
8153
+ cat <<EOF 1>&2
8154
+
8155
+ *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8156
+ *** create shared libraries on Solaris systems. Therefore, libtool
8157
+ *** is disabling shared libraries support. We urge you to upgrade GNU
8158
+ *** binutils to release 2.9.1 or newer. Another option is to modify
8159
+ *** your PATH or compiler configuration so that the native linker is
8160
+ *** used, and then restart.
8161
+
8162
+ EOF
8163
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8164
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8165
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8166
+ else
8167
+ ld_shlibs=no
8168
+ fi
8169
+ ;;
8170
+
8171
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8172
+ case `$LD -v 2>&1` in
8173
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8174
+ ld_shlibs=no
8175
+ cat <<_LT_EOF 1>&2
8176
+
8177
+ *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8178
+ *** reliably create shared libraries on SCO systems. Therefore, libtool
8179
+ *** is disabling shared libraries support. We urge you to upgrade GNU
8180
+ *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8181
+ *** your PATH or compiler configuration so that the native linker is
8182
+ *** used, and then restart.
8183
+
8184
+ _LT_EOF
8185
+ ;;
8186
+ *)
8187
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8188
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
8189
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
8190
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
8191
+ else
8192
+ ld_shlibs=no
8193
+ fi
8194
+ ;;
8195
+ esac
8196
+ ;;
8197
+
8198
+ sunos4*)
8199
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8200
+ wlarc=
8201
+ hardcode_direct=yes
8202
+ hardcode_shlibpath_var=no
8203
+ ;;
8204
+
8205
+ *)
8206
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8207
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8208
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8209
+ else
8210
+ ld_shlibs=no
8211
+ fi
8212
+ ;;
8213
+ esac
8214
+
8215
+ if test "$ld_shlibs" = no; then
8216
+ runpath_var=
8217
+ hardcode_libdir_flag_spec=
8218
+ export_dynamic_flag_spec=
8219
+ whole_archive_flag_spec=
8220
+ fi
8221
+ else
8222
+ # PORTME fill in a description of your system's linker (not GNU ld)
8223
+ case $host_os in
8224
+ aix3*)
8225
+ allow_undefined_flag=unsupported
8226
+ always_export_symbols=yes
8227
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8228
+ # Note: this linker hardcodes the directories in LIBPATH if there
8229
+ # are no directories specified by -L.
8230
+ hardcode_minus_L=yes
8231
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8232
+ # Neither direct hardcoding nor static linking is supported with a
8233
+ # broken collect2.
8234
+ hardcode_direct=unsupported
8235
+ fi
8236
+ ;;
8237
+
8238
+ aix[4-9]*)
8239
+ if test "$host_cpu" = ia64; then
8240
+ # On IA64, the linker does run time linking by default, so we don't
8241
+ # have to do anything special.
8242
+ aix_use_runtimelinking=no
8243
+ exp_sym_flag='-Bexport'
8244
+ no_entry_flag=""
8245
+ else
8246
+ # If we're using GNU nm, then we don't want the "-C" option.
8247
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
8248
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8249
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8250
+ else
8251
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8252
+ fi
8253
+ aix_use_runtimelinking=no
8254
+
8255
+ # Test if we are trying to use run time linking or normal
8256
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8257
+ # need to do runtime linking.
8258
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8259
+ for ld_flag in $LDFLAGS; do
8260
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8261
+ aix_use_runtimelinking=yes
8262
+ break
8263
+ fi
8264
+ done
8265
+ ;;
8266
+ esac
8267
+
8268
+ exp_sym_flag='-bexport'
8269
+ no_entry_flag='-bnoentry'
8270
+ fi
8271
+
8272
+ # When large executables or shared objects are built, AIX ld can
8273
+ # have problems creating the table of contents. If linking a library
8274
+ # or program results in "error TOC overflow" add -mminimal-toc to
8275
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8276
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8277
+
8278
+ archive_cmds=''
8279
+ hardcode_direct=yes
8280
+ hardcode_libdir_separator=':'
8281
+ link_all_deplibs=yes
8282
+
8283
+ if test "$GCC" = yes; then
8284
+ case $host_os in aix4.[012]|aix4.[012].*)
8285
+ # We only want to do this on AIX 4.2 and lower, the check
8286
+ # below for broken collect2 doesn't work under 4.3+
8287
+ collect2name=`${CC} -print-prog-name=collect2`
8288
+ if test -f "$collect2name" && \
8289
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
8290
+ then
8291
+ # We have reworked collect2
8292
+ :
8293
+ else
8294
+ # We have old collect2
8295
+ hardcode_direct=unsupported
8296
+ # It fails to find uninstalled libraries when the uninstalled
8297
+ # path is not listed in the libpath. Setting hardcode_minus_L
8298
+ # to unsupported forces relinking
8299
+ hardcode_minus_L=yes
8300
+ hardcode_libdir_flag_spec='-L$libdir'
8301
+ hardcode_libdir_separator=
8302
+ fi
8303
+ ;;
8304
+ esac
8305
+ shared_flag='-shared'
8306
+ if test "$aix_use_runtimelinking" = yes; then
8307
+ shared_flag="$shared_flag "'${wl}-G'
8308
+ fi
8309
+ else
8310
+ # not using gcc
8311
+ if test "$host_cpu" = ia64; then
8312
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8313
+ # chokes on -Wl,-G. The following line is correct:
8314
+ shared_flag='-G'
8315
+ else
8316
+ if test "$aix_use_runtimelinking" = yes; then
8317
+ shared_flag='${wl}-G'
8318
+ else
8319
+ shared_flag='${wl}-bM:SRE'
8320
+ fi
8321
+ fi
8322
+ fi
8323
+
8324
+ # It seems that -bexpall does not export symbols beginning with
8325
+ # underscore (_), so it is better to generate a list of symbols to export.
8326
+ always_export_symbols=yes
8327
+ if test "$aix_use_runtimelinking" = yes; then
8328
+ # Warning - without using the other runtime loading flags (-brtl),
8329
+ # -berok will link without error, but may produce a broken library.
8330
+ allow_undefined_flag='-berok'
8331
+ # Determine the default libpath from the value encoded in an empty executable.
8332
+
8333
+ cat > conftest.$ac_ext <<EOF
8334
+ #line __oline__ "configure"
8335
+ #include "confdefs.h"
8336
+ int main() {
8337
+ ; return 0; }
8338
+ EOF
8339
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8340
+ (eval $ac_link) 2>&5
8341
+ ac_status=$?
8342
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8343
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
8344
+
8345
+ lt_aix_libpath_sed='
8346
+ /Import File Strings/,/^$/ {
8347
+ /^0/ {
8348
+ s/^0 *\(.*\)$/\1/
8349
+ p
8350
+ }
8351
+ }'
8352
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8353
+ # Check for a 64-bit object if we didn't find anything.
8354
+ if test -z "$aix_libpath"; then
8355
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8356
+ fi
8357
+ rm -rf conftest*
8358
+ else
8359
+ echo "configure: failed program was:" >&5
8360
+ cat conftest.$ac_ext >&6
8361
+ fi
8362
+ rm -f conftest*
8363
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8364
+
8365
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8366
+ archive_expsym_cmds="\$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"
8367
+ else
8368
+ if test "$host_cpu" = ia64; then
8369
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8370
+ allow_undefined_flag="-z nodefs"
8371
+ archive_expsym_cmds="\$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"
8372
+ else
8373
+ # Determine the default libpath from the value encoded in an empty executable.
8374
+
8375
+ cat > conftest.$ac_ext <<EOF
8376
+ #line __oline__ "configure"
8377
+ #include "confdefs.h"
8378
+ int main() {
8379
+ ; return 0; }
8380
+ EOF
8381
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8382
+ (eval $ac_link) 2>&5
8383
+ ac_status=$?
8384
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8385
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
8386
+
8387
+ lt_aix_libpath_sed='
8388
+ /Import File Strings/,/^$/ {
8389
+ /^0/ {
8390
+ s/^0 *\(.*\)$/\1/
8391
+ p
8392
+ }
8393
+ }'
8394
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8395
+ # Check for a 64-bit object if we didn't find anything.
8396
+ if test -z "$aix_libpath"; then
8397
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8398
+ fi
8399
+ rm -rf conftest*
8400
+ else
8401
+ echo "configure: failed program was:" >&5
8402
+ cat conftest.$ac_ext >&6
8403
+ fi
8404
+ rm -f conftest*
8405
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8406
+
8407
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8408
+ # Warning - without using the other run time loading flags,
8409
+ # -berok will link without error, but may produce a broken library.
8410
+ no_undefined_flag=' ${wl}-bernotok'
8411
+ allow_undefined_flag=' ${wl}-berok'
8412
+ # Exported symbols can be pulled into shared objects from archives
8413
+ whole_archive_flag_spec='$convenience'
8414
+ archive_cmds_need_lc=yes
8415
+ # This is similar to how AIX traditionally builds its shared libraries.
8416
+ archive_expsym_cmds="\$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'
8417
+ fi
8418
+ fi
8419
+ ;;
8420
+
8421
+ amigaos*)
8422
+ archive_cmds='$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)'
8423
+ hardcode_libdir_flag_spec='-L$libdir'
8424
+ hardcode_minus_L=yes
8425
+ # see comment about different semantics on the GNU ld section
8426
+ ld_shlibs=no
8427
+ ;;
8428
+
8429
+ bsdi[45]*)
8430
+ export_dynamic_flag_spec=-rdynamic
8431
+ ;;
8432
+
8433
+ cygwin* | mingw* | pw32*)
8434
+ # When not using gcc, we currently assume that we are using
8435
+ # Microsoft Visual C++.
8436
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
8437
+ # no search path for DLLs.
8438
+ hardcode_libdir_flag_spec=' '
8439
+ allow_undefined_flag=unsupported
8440
+ # Tell ltmain to make .lib files, not .a files.
8441
+ libext=lib
8442
+ # Tell ltmain to make .dll files, not .so files.
8443
+ shrext_cmds=".dll"
8444
+ # FIXME: Setting linknames here is a bad hack.
8445
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8446
+ # The linker will automatically build a .lib file if we build a DLL.
8447
+ old_archive_From_new_cmds='true'
8448
+ # FIXME: Should let the user specify the lib program.
8449
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8450
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
8451
+ enable_shared_with_static_runtimes=yes
8452
+ ;;
8453
+
8454
+ darwin* | rhapsody*)
8455
+ case $host_os in
8456
+ rhapsody* | darwin1.[012])
8457
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
8458
+ ;;
8459
+ *) # Darwin 1.3 on
8460
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8461
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8462
+ else
8463
+ case ${MACOSX_DEPLOYMENT_TARGET} in
8464
+ 10.[012])
8465
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8466
+ ;;
8467
+ 10.*)
8468
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8469
+ ;;
8470
+ esac
8471
+ fi
8472
+ ;;
8473
+ esac
8474
+ archive_cmds_need_lc=no
8475
+ hardcode_direct=no
8476
+ hardcode_automatic=yes
8477
+ hardcode_shlibpath_var=unsupported
8478
+ whole_archive_flag_spec=''
8479
+ link_all_deplibs=yes
8480
+ if test "$GCC" = yes ; then
8481
+ output_verbose_link_cmd='echo'
8482
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8483
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8484
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
8485
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
8486
+ else
8487
+ case $cc_basename in
8488
+ xlc*)
8489
+ output_verbose_link_cmd='echo'
8490
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
8491
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8492
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8493
+ archive_expsym_cmds='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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8494
+ module_expsym_cmds='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}'
8495
+ ;;
8496
+ *)
8497
+ ld_shlibs=no
8498
+ ;;
8499
+ esac
8500
+ fi
8501
+ ;;
8502
+
8503
+ dgux*)
8504
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8505
+ hardcode_libdir_flag_spec='-L$libdir'
8506
+ hardcode_shlibpath_var=no
8507
+ ;;
8508
+
8509
+ freebsd1*)
8510
+ ld_shlibs=no
8511
+ ;;
8512
+
8513
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8514
+ # support. Future versions do this automatically, but an explicit c++rt0.o
8515
+ # does not break anything, and helps significantly (at the cost of a little
8516
+ # extra space).
8517
+ freebsd2.2*)
8518
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8519
+ hardcode_libdir_flag_spec='-R$libdir'
8520
+ hardcode_direct=yes
8521
+ hardcode_shlibpath_var=no
8522
+ ;;
8523
+
8524
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8525
+ freebsd2*)
8526
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8527
+ hardcode_direct=yes
8528
+ hardcode_minus_L=yes
8529
+ hardcode_shlibpath_var=no
8530
+ ;;
8531
+
8532
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8533
+ freebsd* | dragonfly*)
8534
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8535
+ hardcode_libdir_flag_spec='-R$libdir'
8536
+ hardcode_direct=yes
8537
+ hardcode_shlibpath_var=no
8538
+ ;;
8539
+
8540
+ hpux9*)
8541
+ if test "$GCC" = yes; then
8542
+ archive_cmds='$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'
8543
+ else
8544
+ archive_cmds='$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'
8545
+ fi
8546
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8547
+ hardcode_libdir_separator=:
8548
+ hardcode_direct=yes
8549
+
8550
+ # hardcode_minus_L: Not really in the search PATH,
8551
+ # but as the default location of the library.
8552
+ hardcode_minus_L=yes
8553
+ export_dynamic_flag_spec='${wl}-E'
8554
+ ;;
8555
+
8556
+ hpux10*)
8557
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8558
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8559
+ else
8560
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8561
+ fi
8562
+ if test "$with_gnu_ld" = no; then
8563
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8564
+ hardcode_libdir_separator=:
8565
+
8566
+ hardcode_direct=yes
8567
+ export_dynamic_flag_spec='${wl}-E'
8568
+
8569
+ # hardcode_minus_L: Not really in the search PATH,
8570
+ # but as the default location of the library.
8571
+ hardcode_minus_L=yes
8572
+ fi
8573
+ ;;
8574
+
8575
+ hpux11*)
8576
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8577
+ case $host_cpu in
8578
+ hppa*64*)
8579
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8580
+ ;;
8581
+ ia64*)
8582
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8583
+ ;;
8584
+ *)
8585
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8586
+ ;;
8587
+ esac
8588
+ else
8589
+ case $host_cpu in
8590
+ hppa*64*)
8591
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8592
+ ;;
8593
+ ia64*)
8594
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8595
+ ;;
8596
+ *)
8597
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8598
+ ;;
8599
+ esac
8600
+ fi
8601
+ if test "$with_gnu_ld" = no; then
8602
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8603
+ hardcode_libdir_separator=:
8604
+
8605
+ case $host_cpu in
8606
+ hppa*64*|ia64*)
8607
+ hardcode_libdir_flag_spec_ld='+b $libdir'
8608
+ hardcode_direct=no
8609
+ hardcode_shlibpath_var=no
8610
+ ;;
8611
+ *)
8612
+ hardcode_direct=yes
8613
+ export_dynamic_flag_spec='${wl}-E'
8614
+
8615
+ # hardcode_minus_L: Not really in the search PATH,
8616
+ # but as the default location of the library.
8617
+ hardcode_minus_L=yes
8618
+ ;;
8619
+ esac
8620
+ fi
8621
+ ;;
8622
+
8623
+ irix5* | irix6* | nonstopux*)
8624
+ if test "$GCC" = yes; then
8625
+ archive_cmds='$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'
8626
+ else
8627
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8628
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
8629
+ fi
8630
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8631
+ hardcode_libdir_separator=:
8632
+ link_all_deplibs=yes
8633
+ ;;
8634
+
8635
+ netbsd*)
8636
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8637
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8638
+ else
8639
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8640
+ fi
8641
+ hardcode_libdir_flag_spec='-R$libdir'
8642
+ hardcode_direct=yes
8643
+ hardcode_shlibpath_var=no
8644
+ ;;
8645
+
8646
+ newsos6)
8647
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8648
+ hardcode_direct=yes
8649
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8650
+ hardcode_libdir_separator=:
8651
+ hardcode_shlibpath_var=no
8652
+ ;;
8653
+
8654
+ openbsd*)
8655
+ if test -f /usr/libexec/ld.so; then
8656
+ hardcode_direct=yes
8657
+ hardcode_shlibpath_var=no
8658
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8659
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8660
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8661
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8662
+ export_dynamic_flag_spec='${wl}-E'
8663
+ else
8664
+ case $host_os in
8665
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8666
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8667
+ hardcode_libdir_flag_spec='-R$libdir'
8668
+ ;;
8669
+ *)
8670
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8671
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8672
+ ;;
8673
+ esac
8674
+ fi
8675
+ else
8676
+ ld_shlibs=no
8677
+ fi
8678
+ ;;
8679
+
8680
+ os2*)
8681
+ hardcode_libdir_flag_spec='-L$libdir'
8682
+ hardcode_minus_L=yes
8683
+ allow_undefined_flag=unsupported
8684
+ archive_cmds='$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'
8685
+ old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8686
+ ;;
8687
+
8688
+ osf3*)
8689
+ if test "$GCC" = yes; then
8690
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8691
+ archive_cmds='$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'
8692
+ else
8693
+ allow_undefined_flag=' -expect_unresolved \*'
8694
+ archive_cmds='$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'
8695
+ fi
8696
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8697
+ hardcode_libdir_separator=:
8698
+ ;;
8699
+
8700
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
8701
+ if test "$GCC" = yes; then
8702
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8703
+ archive_cmds='$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'
8704
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8705
+ else
8706
+ allow_undefined_flag=' -expect_unresolved \*'
8707
+ archive_cmds='$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'
8708
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8709
+ $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'
8710
+
8711
+ # Both c and cxx compiler support -rpath directly
8712
+ hardcode_libdir_flag_spec='-rpath $libdir'
8713
+ fi
8714
+ hardcode_libdir_separator=:
8715
+ ;;
8716
+
8717
+ solaris*)
8718
+ no_undefined_flag=' -z text'
8719
+ if test "$GCC" = yes; then
8720
+ wlarc='${wl}'
8721
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8722
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8723
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8724
+ else
8725
+ wlarc=''
8726
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8727
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8728
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8729
+ fi
8730
+ hardcode_libdir_flag_spec='-R$libdir'
8731
+ hardcode_shlibpath_var=no
8732
+ case $host_os in
8733
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
8734
+ *)
8735
+ # The compiler driver will combine and reorder linker options,
8736
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
8737
+ # but is careful enough not to reorder.
8738
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
8739
+ if test "$GCC" = yes; then
8740
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8741
+ else
8742
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
8743
+ fi
8744
+ ;;
8745
+ esac
8746
+ link_all_deplibs=yes
8747
+ ;;
8748
+
8749
+ sunos4*)
8750
+ if test "x$host_vendor" = xsequent; then
8751
+ # Use $CC to link under sequent, because it throws in some extra .o
8752
+ # files that make .init and .fini sections work.
8753
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8754
+ else
8755
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8756
+ fi
8757
+ hardcode_libdir_flag_spec='-L$libdir'
8758
+ hardcode_direct=yes
8759
+ hardcode_minus_L=yes
8760
+ hardcode_shlibpath_var=no
8761
+ ;;
8762
+
8763
+ sysv4)
8764
+ case $host_vendor in
8765
+ sni)
8766
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8767
+ hardcode_direct=yes # is this really true???
8768
+ ;;
8769
+ siemens)
8770
+ ## LD is ld it makes a PLAMLIB
8771
+ ## CC just makes a GrossModule.
8772
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8773
+ reload_cmds='$CC -r -o $output$reload_objs'
8774
+ hardcode_direct=no
8775
+ ;;
8776
+ motorola)
8777
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8778
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8779
+ ;;
8780
+ esac
8781
+ runpath_var='LD_RUN_PATH'
8782
+ hardcode_shlibpath_var=no
8783
+ ;;
8784
+
8785
+ sysv4.3*)
8786
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8787
+ hardcode_shlibpath_var=no
8788
+ export_dynamic_flag_spec='-Bexport'
8789
+ ;;
8790
+
8791
+ sysv4*MP*)
8792
+ if test -d /usr/nec; then
8793
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8794
+ hardcode_shlibpath_var=no
8795
+ runpath_var=LD_RUN_PATH
8796
+ hardcode_runpath_var=yes
8797
+ ld_shlibs=yes
8798
+ fi
8799
+ ;;
8800
+
8801
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
8802
+ no_undefined_flag='${wl}-z,text'
8803
+ archive_cmds_need_lc=no
8804
+ hardcode_shlibpath_var=no
8805
+ runpath_var='LD_RUN_PATH'
8806
+
8807
+ if test "$GCC" = yes; then
8808
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8809
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8810
+ else
8811
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8812
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8813
+ fi
8814
+ ;;
8815
+
8816
+ sysv5* | sco3.2v5* | sco5v6*)
8817
+ # Note: We can NOT use -z defs as we might desire, because we do not
8818
+ # link with -lc, and that would cause any symbols used from libc to
8819
+ # always be unresolved, which means just about no library would
8820
+ # ever link correctly. If we're not using GNU ld we use -z text
8821
+ # though, which does catch some bad symbols but isn't as heavy-handed
8822
+ # as -z defs.
8823
+ no_undefined_flag='${wl}-z,text'
8824
+ allow_undefined_flag='${wl}-z,nodefs'
8825
+ archive_cmds_need_lc=no
8826
+ hardcode_shlibpath_var=no
8827
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8828
+ hardcode_libdir_separator=':'
8829
+ link_all_deplibs=yes
8830
+ export_dynamic_flag_spec='${wl}-Bexport'
8831
+ runpath_var='LD_RUN_PATH'
8832
+
8833
+ if test "$GCC" = yes; then
8834
+ archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8835
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8836
+ else
8837
+ archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8838
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8839
+ fi
8840
+ ;;
8841
+
8842
+ uts4*)
8843
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8844
+ hardcode_libdir_flag_spec='-L$libdir'
8845
+ hardcode_shlibpath_var=no
8846
+ ;;
8847
+
8848
+ *)
8849
+ ld_shlibs=no
8850
+ ;;
8851
+ esac
8852
+ fi
8853
+
8854
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
8855
+ $as_echo "$ld_shlibs" >&6; }
8856
+ test "$ld_shlibs" = no && can_build_shared=no
8857
+
8858
+ #
8859
+ # Do we need to explicitly link libc?
8860
+ #
8861
+ case "x$archive_cmds_need_lc" in
8862
+ x|xyes)
8863
+ # Assume -lc should be added
8864
+ archive_cmds_need_lc=yes
8865
+
8866
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
8867
+ case $archive_cmds in
8868
+ *'~'*)
8869
+ # FIXME: we may have to deal with multi-command sequences.
8870
+ ;;
8871
+ '$CC '*)
8872
+ # Test whether the compiler implicitly links with -lc since on some
8873
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
8874
+ # to ld, don't add -lc before -lgcc.
8875
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
8876
+ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
8877
+ $rm conftest*
8878
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8879
+
8880
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8881
+ (eval $ac_compile) 2>&5
8882
+ ac_status=$?
8883
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8884
+ test $ac_status = 0; } 2>conftest.err; then
8885
+ soname=conftest
8886
+ lib=conftest
8887
+ libobjs=conftest.$ac_objext
8888
+ deplibs=
8889
+ wl=$lt_prog_compiler_wl
8890
+ pic_flag=$lt_prog_compiler_pic
8891
+ compiler_flags=-v
8892
+ linker_flags=-v
8893
+ verstring=
8894
+ output_objdir=.
8895
+ libname=conftest
8896
+ lt_save_allow_undefined_flag=$allow_undefined_flag
8897
+ allow_undefined_flag=
8898
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
8899
+ (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8900
+ ac_status=$?
8901
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8902
+ test $ac_status = 0; }
8903
+ then
8904
+ archive_cmds_need_lc=no
8905
+ else
8906
+ archive_cmds_need_lc=yes
8907
+ fi
8908
+ allow_undefined_flag=$lt_save_allow_undefined_flag
8909
+ else
8910
+ cat conftest.err 1>&5
8911
+ fi
8912
+ $rm conftest*
8913
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
8914
+ $as_echo "$archive_cmds_need_lc" >&6; }
8915
+ ;;
8916
+ esac
8917
+ fi
8918
+ ;;
8919
+ esac
8920
+
8921
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
8922
+ $as_echo_n "checking dynamic linker characteristics... " >&6; }
8923
+ library_names_spec=
8924
+ libname_spec='lib$name'
8925
+ soname_spec=
8926
+ shrext_cmds=".so"
8927
+ postinstall_cmds=
8928
+ postuninstall_cmds=
8929
+ finish_cmds=
8930
+ finish_eval=
8931
+ shlibpath_var=
8932
+ shlibpath_overrides_runpath=unknown
8933
+ version_type=none
8934
+ dynamic_linker="$host_os ld.so"
8935
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
8936
+
8937
+ if test "$GCC" = yes; then
8938
+ case $host_os in
8939
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
8940
+ *) lt_awk_arg="/^libraries:/" ;;
8941
+ esac
8942
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8943
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
8944
+ # if the path contains ";" then we assume it to be the separator
8945
+ # otherwise default to the standard path separator (i.e. ":") - it is
8946
+ # assumed that no part of a normal pathname contains ";" but that should
8947
+ # okay in the real world where ";" in dirpaths is itself problematic.
8948
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
8949
+ else
8950
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8951
+ fi
8952
+ # Ok, now we have the path, separated by spaces, we can step through it
8953
+ # and add multilib dir if necessary.
8954
+ lt_tmp_lt_search_path_spec=
8955
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
8956
+ for lt_sys_path in $lt_search_path_spec; do
8957
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
8958
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
8959
+ else
8960
+ test -d "$lt_sys_path" && \
8961
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
8962
+ fi
8963
+ done
8964
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
8965
+ BEGIN {RS=" "; FS="/|\n";} {
8966
+ lt_foo="";
8967
+ lt_count=0;
8968
+ for (lt_i = NF; lt_i > 0; lt_i--) {
8969
+ if ($lt_i != "" && $lt_i != ".") {
8970
+ if ($lt_i == "..") {
8971
+ lt_count++;
8972
+ } else {
8973
+ if (lt_count == 0) {
8974
+ lt_foo="/" $lt_i lt_foo;
8975
+ } else {
8976
+ lt_count--;
8977
+ }
8978
+ }
8979
+ }
8980
+ }
8981
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
8982
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
8983
+ }'`
8984
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
8985
+ else
8986
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8987
+ fi
8988
+ need_lib_prefix=unknown
8989
+ hardcode_into_libs=no
8990
+
8991
+ # when you set need_version to no, make sure it does not cause -set_version
8992
+ # flags to be left without arguments
8993
+ need_version=unknown
8994
+
8995
+ case $host_os in
8996
+ aix3*)
8997
+ version_type=linux
8998
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
8999
+ shlibpath_var=LIBPATH
9000
+
9001
+ # AIX 3 has no versioning support, so we append a major version to the name.
9002
+ soname_spec='${libname}${release}${shared_ext}$major'
9003
+ ;;
9004
+
9005
+ aix[4-9]*)
9006
+ version_type=linux
9007
+ need_lib_prefix=no
9008
+ need_version=no
9009
+ hardcode_into_libs=yes
9010
+ if test "$host_cpu" = ia64; then
9011
+ # AIX 5 supports IA64
9012
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9013
+ shlibpath_var=LD_LIBRARY_PATH
9014
+ else
9015
+ # With GCC up to 2.95.x, collect2 would create an import file
9016
+ # for dependence libraries. The import file would start with
9017
+ # the line `#! .'. This would cause the generated library to
9018
+ # depend on `.', always an invalid library. This was fixed in
9019
+ # development snapshots of GCC prior to 3.0.
9020
+ case $host_os in
9021
+ aix4 | aix4.[01] | aix4.[01].*)
9022
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9023
+ echo ' yes '
9024
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9025
+ :
9026
+ else
9027
+ can_build_shared=no
9028
+ fi
9029
+ ;;
9030
+ esac
9031
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9032
+ # soname into executable. Probably we can add versioning support to
9033
+ # collect2, so additional links can be useful in future.
9034
+ if test "$aix_use_runtimelinking" = yes; then
9035
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9036
+ # instead of lib<name>.a to let people know that these are not
9037
+ # typical AIX shared libraries.
9038
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9039
+ else
9040
+ # We preserve .a as extension for shared libraries through AIX4.2
9041
+ # and later when we are not doing run time linking.
9042
+ library_names_spec='${libname}${release}.a $libname.a'
9043
+ soname_spec='${libname}${release}${shared_ext}$major'
9044
+ fi
9045
+ shlibpath_var=LIBPATH
9046
+ fi
9047
+ ;;
9048
+
9049
+ amigaos*)
9050
+ library_names_spec='$libname.ixlibrary $libname.a'
9051
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
9052
+ 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'
9053
+ ;;
9054
+
9055
+ beos*)
9056
+ library_names_spec='${libname}${shared_ext}'
9057
+ dynamic_linker="$host_os ld.so"
9058
+ shlibpath_var=LIBRARY_PATH
9059
+ ;;
9060
+
9061
+ bsdi[45]*)
9062
+ version_type=linux
9063
+ need_version=no
9064
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9065
+ soname_spec='${libname}${release}${shared_ext}$major'
9066
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9067
+ shlibpath_var=LD_LIBRARY_PATH
9068
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9069
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9070
+ # the default ld.so.conf also contains /usr/contrib/lib and
9071
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9072
+ # libtool to hard-code these into programs
9073
+ ;;
9074
+
9075
+ cygwin* | mingw* | pw32*)
9076
+ version_type=windows
9077
+ shrext_cmds=".dll"
9078
+ need_version=no
9079
+ need_lib_prefix=no
9080
+
9081
+ case $GCC,$host_os in
9082
+ yes,cygwin* | yes,mingw* | yes,pw32*)
9083
+ library_names_spec='$libname.dll.a'
9084
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
9085
+ postinstall_cmds='base_file=`basename \${file}`~
9086
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9087
+ dldir=$destdir/`dirname \$dlpath`~
9088
+ test -d \$dldir || mkdir -p \$dldir~
9089
+ $install_prog $dir/$dlname \$dldir/$dlname~
9090
+ chmod a+x \$dldir/$dlname'
9091
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9092
+ dlpath=$dir/\$dldll~
9093
+ $rm \$dlpath'
9094
+ shlibpath_overrides_runpath=yes
9095
+
9096
+ case $host_os in
9097
+ cygwin*)
9098
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9099
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9100
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9101
+ ;;
9102
+ mingw*)
9103
+ # MinGW DLLs use traditional 'lib' prefix
9104
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9105
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9106
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9107
+ # It is most probably a Windows format PATH printed by
9108
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
9109
+ # path with ; separators, and with drive letters. We can handle the
9110
+ # drive letters (cygwin fileutils understands them), so leave them,
9111
+ # especially as we might pass files found there to a mingw objdump,
9112
+ # which wouldn't understand a cygwinified path. Ahh.
9113
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9114
+ else
9115
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9116
+ fi
9117
+ ;;
9118
+ pw32*)
9119
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
9120
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9121
+ ;;
9122
+ esac
9123
+ ;;
9124
+
9125
+ *)
9126
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9127
+ ;;
9128
+ esac
9129
+ dynamic_linker='Win32 ld.exe'
9130
+ # FIXME: first we should search . and the directory the executable is in
9131
+ shlibpath_var=PATH
9132
+ ;;
9133
+
9134
+ darwin* | rhapsody*)
9135
+ dynamic_linker="$host_os dyld"
9136
+ version_type=darwin
9137
+ need_lib_prefix=no
9138
+ need_version=no
9139
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9140
+ soname_spec='${libname}${release}${major}$shared_ext'
9141
+ shlibpath_overrides_runpath=yes
9142
+ shlibpath_var=DYLD_LIBRARY_PATH
9143
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9144
+
9145
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
9146
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9147
+ ;;
9148
+
9149
+ dgux*)
9150
+ version_type=linux
9151
+ need_lib_prefix=no
9152
+ need_version=no
9153
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9154
+ soname_spec='${libname}${release}${shared_ext}$major'
9155
+ shlibpath_var=LD_LIBRARY_PATH
9156
+ ;;
9157
+
9158
+ freebsd1*)
9159
+ dynamic_linker=no
9160
+ ;;
9161
+
9162
+ freebsd* | dragonfly*)
9163
+ # DragonFly does not have aout. When/if they implement a new
9164
+ # versioning mechanism, adjust this.
9165
+ if test -x /usr/bin/objformat; then
9166
+ objformat=`/usr/bin/objformat`
9167
+ else
9168
+ case $host_os in
9169
+ freebsd[123]*) objformat=aout ;;
9170
+ *) objformat=elf ;;
9171
+ esac
9172
+ fi
9173
+ version_type=freebsd-$objformat
9174
+ case $version_type in
9175
+ freebsd-elf*)
9176
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9177
+ need_version=no
9178
+ need_lib_prefix=no
9179
+ ;;
9180
+ freebsd-*)
9181
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9182
+ need_version=yes
9183
+ ;;
9184
+ esac
9185
+ shlibpath_var=LD_LIBRARY_PATH
9186
+ case $host_os in
9187
+ freebsd2*)
9188
+ shlibpath_overrides_runpath=yes
9189
+ ;;
9190
+ freebsd3.[01]* | freebsdelf3.[01]*)
9191
+ shlibpath_overrides_runpath=yes
9192
+ hardcode_into_libs=yes
9193
+ ;;
9194
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
9195
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
9196
+ shlibpath_overrides_runpath=no
9197
+ hardcode_into_libs=yes
9198
+ ;;
9199
+ *) # from 4.6 on, and DragonFly
9200
+ shlibpath_overrides_runpath=yes
9201
+ hardcode_into_libs=yes
9202
+ ;;
9203
+ esac
9204
+ ;;
9205
+
9206
+ gnu*)
9207
+ version_type=linux
9208
+ need_lib_prefix=no
9209
+ need_version=no
9210
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9211
+ soname_spec='${libname}${release}${shared_ext}$major'
9212
+ shlibpath_var=LD_LIBRARY_PATH
9213
+ hardcode_into_libs=yes
9214
+ ;;
9215
+
9216
+ hpux9* | hpux10* | hpux11*)
9217
+ # Give a soname corresponding to the major version so that dld.sl refuses to
9218
+ # link against other versions.
9219
+ version_type=sunos
9220
+ need_lib_prefix=no
9221
+ need_version=no
9222
+ case $host_cpu in
9223
+ ia64*)
9224
+ shrext_cmds='.so'
9225
+ hardcode_into_libs=yes
9226
+ dynamic_linker="$host_os dld.so"
9227
+ shlibpath_var=LD_LIBRARY_PATH
9228
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9229
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9230
+ soname_spec='${libname}${release}${shared_ext}$major'
9231
+ if test "X$HPUX_IA64_MODE" = X32; then
9232
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9233
+ else
9234
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9235
+ fi
9236
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9237
+ ;;
9238
+ hppa*64*)
9239
+ shrext_cmds='.sl'
9240
+ hardcode_into_libs=yes
9241
+ dynamic_linker="$host_os dld.sl"
9242
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9243
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9244
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9245
+ soname_spec='${libname}${release}${shared_ext}$major'
9246
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9247
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9248
+ ;;
9249
+ *)
9250
+ shrext_cmds='.sl'
9251
+ dynamic_linker="$host_os dld.sl"
9252
+ shlibpath_var=SHLIB_PATH
9253
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9254
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9255
+ soname_spec='${libname}${release}${shared_ext}$major'
9256
+ ;;
9257
+ esac
9258
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
9259
+ postinstall_cmds='chmod 555 $lib'
9260
+ ;;
9261
+
9262
+ interix[3-9]*)
9263
+ version_type=linux
9264
+ need_lib_prefix=no
9265
+ need_version=no
9266
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9267
+ soname_spec='${libname}${release}${shared_ext}$major'
9268
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
9269
+ shlibpath_var=LD_LIBRARY_PATH
9270
+ shlibpath_overrides_runpath=no
9271
+ hardcode_into_libs=yes
9272
+ ;;
9273
+
9274
+ irix5* | irix6* | nonstopux*)
9275
+ case $host_os in
9276
+ nonstopux*) version_type=nonstopux ;;
9277
+ *)
9278
+ if test "$lt_cv_prog_gnu_ld" = yes; then
9279
+ version_type=linux
9280
+ else
9281
+ version_type=irix
9282
+ fi ;;
9283
+ esac
9284
+ need_lib_prefix=no
9285
+ need_version=no
9286
+ soname_spec='${libname}${release}${shared_ext}$major'
9287
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9288
+ case $host_os in
9289
+ irix5* | nonstopux*)
9290
+ libsuff= shlibsuff=
9291
+ ;;
9292
+ *)
9293
+ case $LD in # libtool.m4 will add one of these switches to LD
9294
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9295
+ libsuff= shlibsuff= libmagic=32-bit;;
9296
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9297
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
9298
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9299
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
9300
+ *) libsuff= shlibsuff= libmagic=never-match;;
9301
+ esac
9302
+ ;;
9303
+ esac
9304
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9305
+ shlibpath_overrides_runpath=no
9306
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9307
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9308
+ hardcode_into_libs=yes
9309
+ ;;
9310
+
9311
+ # No shared lib support for Linux oldld, aout, or coff.
9312
+ linux*oldld* | linux*aout* | linux*coff*)
9313
+ dynamic_linker=no
9314
+ ;;
9315
+
9316
+ # This must be Linux ELF.
9317
+ linux* | k*bsd*-gnu)
9318
+ version_type=linux
9319
+ need_lib_prefix=no
9320
+ need_version=no
9321
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9322
+ soname_spec='${libname}${release}${shared_ext}$major'
9323
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9324
+ shlibpath_var=LD_LIBRARY_PATH
9325
+ shlibpath_overrides_runpath=no
9326
+ # This implies no fast_install, which is unacceptable.
9327
+ # Some rework will be needed to allow for fast_install
9328
+ # before this can be enabled.
9329
+ hardcode_into_libs=yes
9330
+
9331
+ # Append ld.so.conf contents to the search path
9332
+ if test -f /etc/ld.so.conf; then
9333
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
9334
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9335
+ fi
9336
+
9337
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
9338
+ # powerpc, because MkLinux only supported shared libraries with the
9339
+ # GNU dynamic linker. Since this was broken with cross compilers,
9340
+ # most powerpc-linux boxes support dynamic linking these days and
9341
+ # people can always --disable-shared, the test was removed, and we
9342
+ # assume the GNU/Linux dynamic linker is in use.
9343
+ dynamic_linker='GNU/Linux ld.so'
9344
+ ;;
9345
+
9346
+ netbsd*)
9347
+ version_type=sunos
9348
+ need_lib_prefix=no
9349
+ need_version=no
9350
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9351
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9352
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9353
+ dynamic_linker='NetBSD (a.out) ld.so'
9354
+ else
9355
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9356
+ soname_spec='${libname}${release}${shared_ext}$major'
9357
+ dynamic_linker='NetBSD ld.elf_so'
9358
+ fi
9359
+ shlibpath_var=LD_LIBRARY_PATH
9360
+ shlibpath_overrides_runpath=yes
9361
+ hardcode_into_libs=yes
9362
+ ;;
9363
+
9364
+ newsos6)
9365
+ version_type=linux
9366
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9367
+ shlibpath_var=LD_LIBRARY_PATH
9368
+ shlibpath_overrides_runpath=yes
9369
+ ;;
9370
+
9371
+ nto-qnx*)
9372
+ version_type=linux
9373
+ need_lib_prefix=no
9374
+ need_version=no
9375
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9376
+ soname_spec='${libname}${release}${shared_ext}$major'
9377
+ shlibpath_var=LD_LIBRARY_PATH
9378
+ shlibpath_overrides_runpath=yes
9379
+ ;;
9380
+
9381
+ openbsd*)
9382
+ version_type=sunos
9383
+ sys_lib_dlsearch_path_spec="/usr/lib"
9384
+ need_lib_prefix=no
9385
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9386
+ case $host_os in
9387
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9388
+ *) need_version=no ;;
9389
+ esac
9390
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9391
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9392
+ shlibpath_var=LD_LIBRARY_PATH
9393
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9394
+ case $host_os in
9395
+ openbsd2.[89] | openbsd2.[89].*)
9396
+ shlibpath_overrides_runpath=no
9397
+ ;;
9398
+ *)
9399
+ shlibpath_overrides_runpath=yes
9400
+ ;;
9401
+ esac
9402
+ else
9403
+ shlibpath_overrides_runpath=yes
9404
+ fi
9405
+ ;;
9406
+
9407
+ os2*)
9408
+ libname_spec='$name'
9409
+ shrext_cmds=".dll"
9410
+ need_lib_prefix=no
9411
+ library_names_spec='$libname${shared_ext} $libname.a'
9412
+ dynamic_linker='OS/2 ld.exe'
9413
+ shlibpath_var=LIBPATH
9414
+ ;;
9415
+
9416
+ osf3* | osf4* | osf5*)
9417
+ version_type=osf
9418
+ need_lib_prefix=no
9419
+ need_version=no
9420
+ soname_spec='${libname}${release}${shared_ext}$major'
9421
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9422
+ shlibpath_var=LD_LIBRARY_PATH
9423
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9424
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9425
+ ;;
9426
+
9427
+ rdos*)
9428
+ dynamic_linker=no
9429
+ ;;
9430
+
9431
+ solaris*)
9432
+ version_type=linux
9433
+ need_lib_prefix=no
9434
+ need_version=no
9435
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9436
+ soname_spec='${libname}${release}${shared_ext}$major'
9437
+ shlibpath_var=LD_LIBRARY_PATH
9438
+ shlibpath_overrides_runpath=yes
9439
+ hardcode_into_libs=yes
9440
+ # ldd complains unless libraries are executable
9441
+ postinstall_cmds='chmod +x $lib'
9442
+ ;;
9443
+
9444
+ sunos4*)
9445
+ version_type=sunos
9446
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9447
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9448
+ shlibpath_var=LD_LIBRARY_PATH
9449
+ shlibpath_overrides_runpath=yes
9450
+ if test "$with_gnu_ld" = yes; then
9451
+ need_lib_prefix=no
9452
+ fi
9453
+ need_version=yes
9454
+ ;;
9455
+
9456
+ sysv4 | sysv4.3*)
9457
+ version_type=linux
9458
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9459
+ soname_spec='${libname}${release}${shared_ext}$major'
9460
+ shlibpath_var=LD_LIBRARY_PATH
9461
+ case $host_vendor in
9462
+ sni)
9463
+ shlibpath_overrides_runpath=no
9464
+ need_lib_prefix=no
9465
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
9466
+ runpath_var=LD_RUN_PATH
9467
+ ;;
9468
+ siemens)
9469
+ need_lib_prefix=no
9470
+ ;;
9471
+ motorola)
9472
+ need_lib_prefix=no
9473
+ need_version=no
9474
+ shlibpath_overrides_runpath=no
9475
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9476
+ ;;
9477
+ esac
9478
+ ;;
9479
+
9480
+ sysv4*MP*)
9481
+ if test -d /usr/nec ;then
9482
+ version_type=linux
9483
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9484
+ soname_spec='$libname${shared_ext}.$major'
9485
+ shlibpath_var=LD_LIBRARY_PATH
9486
+ fi
9487
+ ;;
9488
+
9489
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9490
+ version_type=freebsd-elf
9491
+ need_lib_prefix=no
9492
+ need_version=no
9493
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9494
+ soname_spec='${libname}${release}${shared_ext}$major'
9495
+ shlibpath_var=LD_LIBRARY_PATH
9496
+ hardcode_into_libs=yes
9497
+ if test "$with_gnu_ld" = yes; then
9498
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
9499
+ shlibpath_overrides_runpath=no
9500
+ else
9501
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
9502
+ shlibpath_overrides_runpath=yes
9503
+ case $host_os in
9504
+ sco3.2v5*)
9505
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
9506
+ ;;
9507
+ esac
9508
+ fi
9509
+ sys_lib_dlsearch_path_spec='/usr/lib'
9510
+ ;;
9511
+
9512
+ uts4*)
9513
+ version_type=linux
9514
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9515
+ soname_spec='${libname}${release}${shared_ext}$major'
9516
+ shlibpath_var=LD_LIBRARY_PATH
9517
+ ;;
9518
+
9519
+ *)
9520
+ dynamic_linker=no
9521
+ ;;
9522
+ esac
9523
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
9524
+ $as_echo "$dynamic_linker" >&6; }
9525
+ test "$dynamic_linker" = no && can_build_shared=no
9526
+
9527
+ if ${lt_cv_sys_lib_search_path_spec+:} false; then :
9528
+ $as_echo_n "(cached) " >&6
9529
+ else
9530
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
9531
+ fi
9532
+
9533
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
9534
+ if ${lt_cv_sys_lib_dlsearch_path_spec+:} false; then :
9535
+ $as_echo_n "(cached) " >&6
9536
+ else
9537
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
9538
+ fi
9539
+
9540
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
9541
+
9542
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9543
+ if test "$GCC" = yes; then
9544
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9545
+ fi
9546
+
9547
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
9548
+ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
9549
+ hardcode_action=
9550
+ if test -n "$hardcode_libdir_flag_spec" || \
9551
+ test -n "$runpath_var" || \
9552
+ test "X$hardcode_automatic" = "Xyes" ; then
9553
+
9554
+ # We can hardcode non-existant directories.
9555
+ if test "$hardcode_direct" != no &&
9556
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
9557
+ # have to relink, otherwise we might link with an installed library
9558
+ # when we should be linking with a yet-to-be-installed one
9559
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9560
+ test "$hardcode_minus_L" != no; then
9561
+ # Linking always hardcodes the temporary library directory.
9562
+ hardcode_action=relink
9563
+ else
9564
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
9565
+ hardcode_action=immediate
9566
+ fi
9567
+ else
9568
+ # We cannot hardcode anything, or else we can only hardcode existing
9569
+ # directories.
9570
+ hardcode_action=unsupported
9571
+ fi
9572
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
9573
+ $as_echo "$hardcode_action" >&6; }
9574
+
9575
+ if test "$hardcode_action" = relink; then
9576
+ # Fast installation is not supported
9577
+ enable_fast_install=no
9578
+ elif test "$shlibpath_overrides_runpath" = yes ||
9579
+ test "$enable_shared" = no; then
9580
+ # Fast installation is not necessary
9581
+ enable_fast_install=needless
9582
+ fi
9583
+
9584
+ striplib=
9585
+ old_striplib=
9586
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
9587
+ $as_echo_n "checking whether stripping libraries is possible... " >&6; }
9588
+ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9589
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9590
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9591
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9592
+ $as_echo "yes" >&6; }
9593
+ else
9594
+ # FIXME - insert some real tests, host_os isn't really good enough
9595
+ case $host_os in
9596
+ darwin*)
9597
+ if test -n "$STRIP" ; then
9598
+ striplib="$STRIP -x"
9599
+ old_striplib="$STRIP -S"
9600
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9601
+ $as_echo "yes" >&6; }
9602
+ else
9603
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604
+ $as_echo "no" >&6; }
9605
+ fi
9606
+ ;;
9607
+ *)
9608
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609
+ $as_echo "no" >&6; }
9610
+ ;;
9611
+ esac
9612
+ fi
9613
+
9614
+ if test "x$enable_dlopen" != xyes; then
9615
+ enable_dlopen=unknown
9616
+ enable_dlopen_self=unknown
9617
+ enable_dlopen_self_static=unknown
9618
+ else
9619
+ lt_cv_dlopen=no
9620
+ lt_cv_dlopen_libs=
9621
+
9622
+ case $host_os in
9623
+ beos*)
9624
+ lt_cv_dlopen="load_add_on"
9625
+ lt_cv_dlopen_libs=
9626
+ lt_cv_dlopen_self=yes
9627
+ ;;
9628
+
9629
+ mingw* | pw32*)
9630
+ lt_cv_dlopen="LoadLibrary"
9631
+ lt_cv_dlopen_libs=
9632
+ ;;
9633
+
9634
+ cygwin*)
9635
+ lt_cv_dlopen="dlopen"
9636
+ lt_cv_dlopen_libs=
9637
+ ;;
9638
+
9639
+ darwin*)
9640
+ # if libdl is installed we need to link against it
9641
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9642
+ $as_echo_n "checking for dlopen in -ldl... " >&6; }
9643
+ if ${ac_cv_lib_dl_dlopen+:} false; then :
9644
+ $as_echo_n "(cached) " >&6
9645
+ else
9646
+ ac_check_lib_save_LIBS=$LIBS
9647
+ LIBS="-ldl $LIBS"
9648
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9649
+ /* end confdefs.h. */
9650
+
9651
+ /* Override any GCC internal prototype to avoid an error.
9652
+ Use char because int might match the return type of a GCC
9653
+ builtin and then its argument prototype would still apply. */
9654
+ #ifdef __cplusplus
9655
+ extern "C"
9656
+ #endif
9657
+ char dlopen ();
9658
+ int
9659
+ main ()
9660
+ {
9661
+ return dlopen ();
9662
+ ;
9663
+ return 0;
9664
+ }
9665
+ _ACEOF
9666
+ if ac_fn_c_try_link "$LINENO"; then :
9667
+ ac_cv_lib_dl_dlopen=yes
9668
+ else
9669
+ ac_cv_lib_dl_dlopen=no
9670
+ fi
9671
+ rm -f core conftest.err conftest.$ac_objext \
9672
+ conftest$ac_exeext conftest.$ac_ext
9673
+ LIBS=$ac_check_lib_save_LIBS
9674
+ fi
9675
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9676
+ $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9677
+ if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9678
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9679
+ else
9680
+
9681
+ lt_cv_dlopen="dyld"
9682
+ lt_cv_dlopen_libs=
9683
+ lt_cv_dlopen_self=yes
9684
+
9685
+ fi
9686
+
9687
+ ;;
9688
+
9689
+ *)
9690
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
9691
+ if test "x$ac_cv_func_shl_load" = xyes; then :
9692
+ lt_cv_dlopen="shl_load"
9693
+ else
9694
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9695
+ $as_echo_n "checking for shl_load in -ldld... " >&6; }
9696
+ if ${ac_cv_lib_dld_shl_load+:} false; then :
9697
+ $as_echo_n "(cached) " >&6
9698
+ else
9699
+ ac_check_lib_save_LIBS=$LIBS
9700
+ LIBS="-ldld $LIBS"
9701
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9702
+ /* end confdefs.h. */
9703
+
9704
+ /* Override any GCC internal prototype to avoid an error.
9705
+ Use char because int might match the return type of a GCC
9706
+ builtin and then its argument prototype would still apply. */
9707
+ #ifdef __cplusplus
9708
+ extern "C"
9709
+ #endif
9710
+ char shl_load ();
9711
+ int
9712
+ main ()
9713
+ {
9714
+ return shl_load ();
9715
+ ;
9716
+ return 0;
9717
+ }
9718
+ _ACEOF
9719
+ if ac_fn_c_try_link "$LINENO"; then :
9720
+ ac_cv_lib_dld_shl_load=yes
9721
+ else
9722
+ ac_cv_lib_dld_shl_load=no
9723
+ fi
9724
+ rm -f core conftest.err conftest.$ac_objext \
9725
+ conftest$ac_exeext conftest.$ac_ext
9726
+ LIBS=$ac_check_lib_save_LIBS
9727
+ fi
9728
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9729
+ $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9730
+ if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9731
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
9732
+ else
9733
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9734
+ if test "x$ac_cv_func_dlopen" = xyes; then :
9735
+ lt_cv_dlopen="dlopen"
9736
+ else
9737
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9738
+ $as_echo_n "checking for dlopen in -ldl... " >&6; }
9739
+ if ${ac_cv_lib_dl_dlopen+:} false; then :
9740
+ $as_echo_n "(cached) " >&6
9741
+ else
9742
+ ac_check_lib_save_LIBS=$LIBS
9743
+ LIBS="-ldl $LIBS"
9744
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745
+ /* end confdefs.h. */
9746
+
9747
+ /* Override any GCC internal prototype to avoid an error.
9748
+ Use char because int might match the return type of a GCC
9749
+ builtin and then its argument prototype would still apply. */
9750
+ #ifdef __cplusplus
9751
+ extern "C"
9752
+ #endif
9753
+ char dlopen ();
9754
+ int
9755
+ main ()
9756
+ {
9757
+ return dlopen ();
9758
+ ;
9759
+ return 0;
9760
+ }
9761
+ _ACEOF
9762
+ if ac_fn_c_try_link "$LINENO"; then :
9763
+ ac_cv_lib_dl_dlopen=yes
9764
+ else
9765
+ ac_cv_lib_dl_dlopen=no
9766
+ fi
9767
+ rm -f core conftest.err conftest.$ac_objext \
9768
+ conftest$ac_exeext conftest.$ac_ext
9769
+ LIBS=$ac_check_lib_save_LIBS
9770
+ fi
9771
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9772
+ $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9773
+ if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9774
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9775
+ else
9776
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
9777
+ $as_echo_n "checking for dlopen in -lsvld... " >&6; }
9778
+ if ${ac_cv_lib_svld_dlopen+:} false; then :
9779
+ $as_echo_n "(cached) " >&6
9780
+ else
9781
+ ac_check_lib_save_LIBS=$LIBS
9782
+ LIBS="-lsvld $LIBS"
9783
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784
+ /* end confdefs.h. */
9785
+
9786
+ /* Override any GCC internal prototype to avoid an error.
9787
+ Use char because int might match the return type of a GCC
9788
+ builtin and then its argument prototype would still apply. */
9789
+ #ifdef __cplusplus
9790
+ extern "C"
9791
+ #endif
9792
+ char dlopen ();
9793
+ int
9794
+ main ()
9795
+ {
9796
+ return dlopen ();
9797
+ ;
9798
+ return 0;
9799
+ }
9800
+ _ACEOF
9801
+ if ac_fn_c_try_link "$LINENO"; then :
9802
+ ac_cv_lib_svld_dlopen=yes
9803
+ else
9804
+ ac_cv_lib_svld_dlopen=no
9805
+ fi
9806
+ rm -f core conftest.err conftest.$ac_objext \
9807
+ conftest$ac_exeext conftest.$ac_ext
9808
+ LIBS=$ac_check_lib_save_LIBS
9809
+ fi
9810
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
9811
+ $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
9812
+ if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
9813
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
9814
+ else
9815
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
9816
+ $as_echo_n "checking for dld_link in -ldld... " >&6; }
9817
+ if ${ac_cv_lib_dld_dld_link+:} false; then :
9818
+ $as_echo_n "(cached) " >&6
9819
+ else
9820
+ ac_check_lib_save_LIBS=$LIBS
9821
+ LIBS="-ldld $LIBS"
9822
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823
+ /* end confdefs.h. */
9824
+
9825
+ /* Override any GCC internal prototype to avoid an error.
9826
+ Use char because int might match the return type of a GCC
9827
+ builtin and then its argument prototype would still apply. */
9828
+ #ifdef __cplusplus
9829
+ extern "C"
9830
+ #endif
9831
+ char dld_link ();
9832
+ int
9833
+ main ()
9834
+ {
9835
+ return dld_link ();
9836
+ ;
9837
+ return 0;
9838
+ }
9839
+ _ACEOF
9840
+ if ac_fn_c_try_link "$LINENO"; then :
9841
+ ac_cv_lib_dld_dld_link=yes
9842
+ else
9843
+ ac_cv_lib_dld_dld_link=no
9844
+ fi
9845
+ rm -f core conftest.err conftest.$ac_objext \
9846
+ conftest$ac_exeext conftest.$ac_ext
9847
+ LIBS=$ac_check_lib_save_LIBS
9848
+ fi
9849
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
9850
+ $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
9851
+ if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
9852
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
9853
+ fi
9854
+
9855
+
9856
+ fi
9857
+
9858
+
9859
+ fi
9860
+
9861
+
9862
+ fi
9863
+
9864
+
9865
+ fi
9866
+
9867
+
9868
+ fi
9869
+
9870
+ ;;
9871
+ esac
9872
+
9873
+ if test "x$lt_cv_dlopen" != xno; then
9874
+ enable_dlopen=yes
9875
+ else
9876
+ enable_dlopen=no
9877
+ fi
9878
+
9879
+ case $lt_cv_dlopen in
9880
+ dlopen)
9881
+ save_CPPFLAGS="$CPPFLAGS"
9882
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9883
+
9884
+ save_LDFLAGS="$LDFLAGS"
9885
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9886
+
9887
+ save_LIBS="$LIBS"
9888
+ LIBS="$lt_cv_dlopen_libs $LIBS"
9889
+
9890
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
9891
+ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
9892
+ if ${lt_cv_dlopen_self+:} false; then :
9893
+ $as_echo_n "(cached) " >&6
9894
+ else
9895
+ if test "$cross_compiling" = yes; then :
9896
+ lt_cv_dlopen_self=cross
9897
+ else
9898
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9899
+ lt_status=$lt_dlunknown
9900
+ cat > conftest.$ac_ext <<EOF
9901
+ #line __oline__ "configure"
9902
+ #include "confdefs.h"
9903
+
9904
+ #if HAVE_DLFCN_H
9905
+ #include <dlfcn.h>
9906
+ #endif
9907
+
9908
+ #include <stdio.h>
9909
+
9910
+ #ifdef RTLD_GLOBAL
9911
+ # define LT_DLGLOBAL RTLD_GLOBAL
9912
+ #else
9913
+ # ifdef DL_GLOBAL
9914
+ # define LT_DLGLOBAL DL_GLOBAL
9915
+ # else
9916
+ # define LT_DLGLOBAL 0
9917
+ # endif
9918
+ #endif
9919
+
9920
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9921
+ find out it does not work in some platform. */
9922
+ #ifndef LT_DLLAZY_OR_NOW
9923
+ # ifdef RTLD_LAZY
9924
+ # define LT_DLLAZY_OR_NOW RTLD_LAZY
9925
+ # else
9926
+ # ifdef DL_LAZY
9927
+ # define LT_DLLAZY_OR_NOW DL_LAZY
9928
+ # else
9929
+ # ifdef RTLD_NOW
9930
+ # define LT_DLLAZY_OR_NOW RTLD_NOW
9931
+ # else
9932
+ # ifdef DL_NOW
9933
+ # define LT_DLLAZY_OR_NOW DL_NOW
9934
+ # else
9935
+ # define LT_DLLAZY_OR_NOW 0
9936
+ # endif
9937
+ # endif
9938
+ # endif
9939
+ # endif
9940
+ #endif
9941
+
9942
+ #ifdef __cplusplus
9943
+ extern "C" void exit (int);
9944
+ #endif
9945
+
9946
+ void fnord() { int i=42;}
9947
+ int main ()
9948
+ {
9949
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9950
+ int status = $lt_dlunknown;
9951
+
9952
+ if (self)
9953
+ {
9954
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
9955
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9956
+ /* dlclose (self); */
9957
+ }
9958
+ else
9959
+ puts (dlerror ());
9960
+
9961
+ exit (status);
9962
+ }
9963
+ EOF
9964
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9965
+ (eval $ac_link) 2>&5
9966
+ ac_status=$?
9967
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9968
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
9969
+ (./conftest; exit; ) >&5 2>/dev/null
9970
+ lt_status=$?
9971
+ case x$lt_status in
9972
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
9973
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
9974
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
9975
+ esac
9976
+ else :
9977
+ # compilation failed
9978
+ lt_cv_dlopen_self=no
9979
+ fi
9980
+ fi
9981
+ rm -fr conftest*
9982
+
9983
+
9984
+ fi
9985
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
9986
+ $as_echo "$lt_cv_dlopen_self" >&6; }
9987
+
9988
+ if test "x$lt_cv_dlopen_self" = xyes; then
9989
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
9990
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
9991
+ $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
9992
+ if ${lt_cv_dlopen_self_static+:} false; then :
9993
+ $as_echo_n "(cached) " >&6
9994
+ else
9995
+ if test "$cross_compiling" = yes; then :
9996
+ lt_cv_dlopen_self_static=cross
9997
+ else
9998
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9999
+ lt_status=$lt_dlunknown
10000
+ cat > conftest.$ac_ext <<EOF
10001
+ #line __oline__ "configure"
10002
+ #include "confdefs.h"
10003
+
10004
+ #if HAVE_DLFCN_H
10005
+ #include <dlfcn.h>
10006
+ #endif
10007
+
10008
+ #include <stdio.h>
10009
+
10010
+ #ifdef RTLD_GLOBAL
10011
+ # define LT_DLGLOBAL RTLD_GLOBAL
10012
+ #else
10013
+ # ifdef DL_GLOBAL
10014
+ # define LT_DLGLOBAL DL_GLOBAL
10015
+ # else
10016
+ # define LT_DLGLOBAL 0
10017
+ # endif
10018
+ #endif
10019
+
10020
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10021
+ find out it does not work in some platform. */
10022
+ #ifndef LT_DLLAZY_OR_NOW
10023
+ # ifdef RTLD_LAZY
10024
+ # define LT_DLLAZY_OR_NOW RTLD_LAZY
10025
+ # else
10026
+ # ifdef DL_LAZY
10027
+ # define LT_DLLAZY_OR_NOW DL_LAZY
10028
+ # else
10029
+ # ifdef RTLD_NOW
10030
+ # define LT_DLLAZY_OR_NOW RTLD_NOW
10031
+ # else
10032
+ # ifdef DL_NOW
10033
+ # define LT_DLLAZY_OR_NOW DL_NOW
10034
+ # else
10035
+ # define LT_DLLAZY_OR_NOW 0
10036
+ # endif
10037
+ # endif
10038
+ # endif
10039
+ # endif
10040
+ #endif
10041
+
10042
+ #ifdef __cplusplus
10043
+ extern "C" void exit (int);
10044
+ #endif
10045
+
10046
+ void fnord() { int i=42;}
10047
+ int main ()
10048
+ {
10049
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10050
+ int status = $lt_dlunknown;
10051
+
10052
+ if (self)
10053
+ {
10054
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10055
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10056
+ /* dlclose (self); */
10057
+ }
10058
+ else
10059
+ puts (dlerror ());
10060
+
10061
+ exit (status);
10062
+ }
10063
+ EOF
10064
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10065
+ (eval $ac_link) 2>&5
10066
+ ac_status=$?
10067
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10068
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10069
+ (./conftest; exit; ) >&5 2>/dev/null
10070
+ lt_status=$?
10071
+ case x$lt_status in
10072
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10073
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10074
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
10075
+ esac
10076
+ else :
10077
+ # compilation failed
10078
+ lt_cv_dlopen_self_static=no
10079
+ fi
10080
+ fi
10081
+ rm -fr conftest*
10082
+
10083
+
10084
+ fi
10085
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10086
+ $as_echo "$lt_cv_dlopen_self_static" >&6; }
10087
+ fi
10088
+
10089
+ CPPFLAGS="$save_CPPFLAGS"
10090
+ LDFLAGS="$save_LDFLAGS"
10091
+ LIBS="$save_LIBS"
10092
+ ;;
10093
+ esac
10094
+
10095
+ case $lt_cv_dlopen_self in
10096
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10097
+ *) enable_dlopen_self=unknown ;;
10098
+ esac
10099
+
10100
+ case $lt_cv_dlopen_self_static in
10101
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10102
+ *) enable_dlopen_self_static=unknown ;;
10103
+ esac
10104
+ fi
10105
+
10106
+
10107
+ # Report which library types will actually be built
10108
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10109
+ $as_echo_n "checking if libtool supports shared libraries... " >&6; }
10110
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10111
+ $as_echo "$can_build_shared" >&6; }
10112
+
10113
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10114
+ $as_echo_n "checking whether to build shared libraries... " >&6; }
10115
+ test "$can_build_shared" = "no" && enable_shared=no
10116
+
10117
+ # On AIX, shared libraries and static libraries use the same namespace, and
10118
+ # are all built from PIC.
10119
+ case $host_os in
10120
+ aix3*)
10121
+ test "$enable_shared" = yes && enable_static=no
10122
+ if test -n "$RANLIB"; then
10123
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
10124
+ postinstall_cmds='$RANLIB $lib'
10125
+ fi
10126
+ ;;
10127
+
10128
+ aix[4-9]*)
10129
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10130
+ test "$enable_shared" = yes && enable_static=no
10131
+ fi
10132
+ ;;
10133
+ esac
10134
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
10135
+ $as_echo "$enable_shared" >&6; }
10136
+
10137
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
10138
+ $as_echo_n "checking whether to build static libraries... " >&6; }
10139
+ # Make sure either enable_shared or enable_static is yes.
10140
+ test "$enable_shared" = yes || enable_static=yes
10141
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
10142
+ $as_echo "$enable_static" >&6; }
10143
+
10144
+ # The else clause should only fire when bootstrapping the
10145
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
10146
+ # with your package, and you will get complaints that there are
10147
+ # no rules to generate ltmain.sh.
10148
+ if test -f "$ltmain"; then
10149
+ # See if we are running on zsh, and set the options which allow our commands through
10150
+ # without removal of \ escapes.
10151
+ if test -n "${ZSH_VERSION+set}" ; then
10152
+ setopt NO_GLOB_SUBST
10153
+ fi
10154
+ # Now quote all the things that may contain metacharacters while being
10155
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
10156
+ # variables and quote the copies for generation of the libtool script.
10157
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10158
+ SED SHELL STRIP \
10159
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10160
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10161
+ deplibs_check_method reload_flag reload_cmds need_locks \
10162
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10163
+ lt_cv_sys_global_symbol_to_c_name_address \
10164
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10165
+ old_postinstall_cmds old_postuninstall_cmds \
10166
+ compiler \
10167
+ CC \
10168
+ LD \
10169
+ lt_prog_compiler_wl \
10170
+ lt_prog_compiler_pic \
10171
+ lt_prog_compiler_static \
10172
+ lt_prog_compiler_no_builtin_flag \
10173
+ export_dynamic_flag_spec \
10174
+ thread_safe_flag_spec \
10175
+ whole_archive_flag_spec \
10176
+ enable_shared_with_static_runtimes \
10177
+ old_archive_cmds \
10178
+ old_archive_from_new_cmds \
10179
+ predep_objects \
10180
+ postdep_objects \
10181
+ predeps \
10182
+ postdeps \
10183
+ compiler_lib_search_path \
10184
+ compiler_lib_search_dirs \
10185
+ archive_cmds \
10186
+ archive_expsym_cmds \
10187
+ postinstall_cmds \
10188
+ postuninstall_cmds \
10189
+ old_archive_from_expsyms_cmds \
10190
+ allow_undefined_flag \
10191
+ no_undefined_flag \
10192
+ export_symbols_cmds \
10193
+ hardcode_libdir_flag_spec \
10194
+ hardcode_libdir_flag_spec_ld \
10195
+ hardcode_libdir_separator \
10196
+ hardcode_automatic \
10197
+ module_cmds \
10198
+ module_expsym_cmds \
10199
+ lt_cv_prog_compiler_c_o \
10200
+ fix_srcfile_path \
10201
+ exclude_expsyms \
10202
+ include_expsyms; do
10203
+
10204
+ case $var in
10205
+ old_archive_cmds | \
10206
+ old_archive_from_new_cmds | \
10207
+ archive_cmds | \
10208
+ archive_expsym_cmds | \
10209
+ module_cmds | \
10210
+ module_expsym_cmds | \
10211
+ old_archive_from_expsyms_cmds | \
10212
+ export_symbols_cmds | \
10213
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
10214
+ postinstall_cmds | postuninstall_cmds | \
10215
+ old_postinstall_cmds | old_postuninstall_cmds | \
10216
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10217
+ # Double-quote double-evaled strings.
10218
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10219
+ ;;
10220
+ *)
10221
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10222
+ ;;
10223
+ esac
10224
+ done
10225
+
10226
+ case $lt_echo in
10227
+ *'\$0 --fallback-echo"')
10228
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10229
+ ;;
10230
+ esac
10231
+
10232
+ cfgfile="${ofile}T"
10233
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10234
+ $rm -f "$cfgfile"
10235
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result:
10236
+ creating $ofile" >&5
10237
+ $as_echo "
10238
+ creating $ofile" >&6; }
10239
+
10240
+ cat <<__EOF__ >> "$cfgfile"
10241
+ #! $SHELL
10242
+
10243
+ # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10244
+ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10245
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10246
+ #
10247
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
10248
+ # Free Software Foundation, Inc.
10249
+ #
10250
+ # This file is part of GNU Libtool:
10251
+ # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10252
+ #
10253
+ # This program is free software; you can redistribute it and/or modify
10254
+ # it under the terms of the GNU General Public License as published by
10255
+ # the Free Software Foundation; either version 2 of the License, or
10256
+ # (at your option) any later version.
10257
+ #
10258
+ # This program is distributed in the hope that it will be useful, but
10259
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
10260
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10261
+ # General Public License for more details.
10262
+ #
10263
+ # You should have received a copy of the GNU General Public License
10264
+ # along with this program; if not, write to the Free Software
10265
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10266
+ #
10267
+ # As a special exception to the GNU General Public License, if you
10268
+ # distribute this file as part of a program that contains a
10269
+ # configuration script generated by Autoconf, you may include it under
10270
+ # the same distribution terms that you use for the rest of that program.
10271
+
10272
+ # A sed program that does not truncate output.
10273
+ SED=$lt_SED
10274
+
10275
+ # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10276
+ Xsed="$SED -e 1s/^X//"
10277
+
10278
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
10279
+ # if CDPATH is set.
10280
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10281
+
10282
+ # The names of the tagged configurations supported by this script.
10283
+ available_tags=
10284
+
10285
+ # ### BEGIN LIBTOOL CONFIG
10286
+
10287
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10288
+
10289
+ # Shell to use when invoking shell scripts.
10290
+ SHELL=$lt_SHELL
10291
+
10292
+ # Whether or not to build shared libraries.
10293
+ build_libtool_libs=$enable_shared
10294
+
10295
+ # Whether or not to build static libraries.
10296
+ build_old_libs=$enable_static
10297
+
10298
+ # Whether or not to add -lc for building shared libraries.
10299
+ build_libtool_need_lc=$archive_cmds_need_lc
10300
+
10301
+ # Whether or not to disallow shared libs when runtime libs are static
10302
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10303
+
10304
+ # Whether or not to optimize for fast installation.
10305
+ fast_install=$enable_fast_install
10306
+
10307
+ # The host system.
10308
+ host_alias=$host_alias
10309
+ host=$host
10310
+ host_os=$host_os
10311
+
10312
+ # The build system.
10313
+ build_alias=$build_alias
10314
+ build=$build
10315
+ build_os=$build_os
10316
+
10317
+ # An echo program that does not interpret backslashes.
10318
+ echo=$lt_echo
10319
+
10320
+ # The archiver.
10321
+ AR=$lt_AR
10322
+ AR_FLAGS=$lt_AR_FLAGS
10323
+
10324
+ # A C compiler.
10325
+ LTCC=$lt_LTCC
10326
+
10327
+ # LTCC compiler flags.
10328
+ LTCFLAGS=$lt_LTCFLAGS
10329
+
10330
+ # A language-specific compiler.
10331
+ CC=$lt_compiler
10332
+
10333
+ # Is the compiler the GNU C compiler?
10334
+ with_gcc=$GCC
10335
+
10336
+ # An ERE matcher.
10337
+ EGREP=$lt_EGREP
10338
+
10339
+ # The linker used to build libraries.
10340
+ LD=$lt_LD
10341
+
10342
+ # Whether we need hard or soft links.
10343
+ LN_S=$lt_LN_S
10344
+
10345
+ # A BSD-compatible nm program.
10346
+ NM=$lt_NM
10347
+
10348
+ # A symbol stripping program
10349
+ STRIP=$lt_STRIP
10350
+
10351
+ # Used to examine libraries when file_magic_cmd begins "file"
10352
+ MAGIC_CMD=$MAGIC_CMD
10353
+
10354
+ # Used on cygwin: DLL creation program.
10355
+ DLLTOOL="$DLLTOOL"
10356
+
10357
+ # Used on cygwin: object dumper.
10358
+ OBJDUMP="$OBJDUMP"
10359
+
10360
+ # Used on cygwin: assembler.
10361
+ AS="$AS"
10362
+
10363
+ # The name of the directory that contains temporary libtool files.
10364
+ objdir=$objdir
10365
+
10366
+ # How to create reloadable object files.
10367
+ reload_flag=$lt_reload_flag
10368
+ reload_cmds=$lt_reload_cmds
10369
+
10370
+ # How to pass a linker flag through the compiler.
10371
+ wl=$lt_lt_prog_compiler_wl
10372
+
10373
+ # Object file suffix (normally "o").
10374
+ objext="$ac_objext"
10375
+
10376
+ # Old archive suffix (normally "a").
10377
+ libext="$libext"
10378
+
10379
+ # Shared library suffix (normally ".so").
10380
+ shrext_cmds='$shrext_cmds'
10381
+
10382
+ # Executable file suffix (normally "").
10383
+ exeext="$exeext"
10384
+
10385
+ # Additional compiler flags for building library objects.
10386
+ pic_flag=$lt_lt_prog_compiler_pic
10387
+ pic_mode=$pic_mode
10388
+
10389
+ # What is the maximum length of a command?
10390
+ max_cmd_len=$lt_cv_sys_max_cmd_len
10391
+
10392
+ # Does compiler simultaneously support -c and -o options?
10393
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10394
+
10395
+ # Must we lock files when doing compilation?
10396
+ need_locks=$lt_need_locks
10397
+
10398
+ # Do we need the lib prefix for modules?
10399
+ need_lib_prefix=$need_lib_prefix
10400
+
10401
+ # Do we need a version for libraries?
10402
+ need_version=$need_version
10403
+
10404
+ # Whether dlopen is supported.
10405
+ dlopen_support=$enable_dlopen
10406
+
10407
+ # Whether dlopen of programs is supported.
10408
+ dlopen_self=$enable_dlopen_self
10409
+
10410
+ # Whether dlopen of statically linked programs is supported.
10411
+ dlopen_self_static=$enable_dlopen_self_static
10412
+
10413
+ # Compiler flag to prevent dynamic linking.
10414
+ link_static_flag=$lt_lt_prog_compiler_static
10415
+
10416
+ # Compiler flag to turn off builtin functions.
10417
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10418
+
10419
+ # Compiler flag to allow reflexive dlopens.
10420
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10421
+
10422
+ # Compiler flag to generate shared objects directly from archives.
10423
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec
10424
+
10425
+ # Compiler flag to generate thread-safe objects.
10426
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec
10427
+
10428
+ # Library versioning type.
10429
+ version_type=$version_type
10430
+
10431
+ # Format of library name prefix.
10432
+ libname_spec=$lt_libname_spec
10433
+
10434
+ # List of archive names. First name is the real one, the rest are links.
10435
+ # The last name is the one that the linker finds with -lNAME.
10436
+ library_names_spec=$lt_library_names_spec
10437
+
10438
+ # The coded name of the library, if different from the real name.
10439
+ soname_spec=$lt_soname_spec
10440
+
10441
+ # Commands used to build and install an old-style archive.
10442
+ RANLIB=$lt_RANLIB
10443
+ old_archive_cmds=$lt_old_archive_cmds
10444
+ old_postinstall_cmds=$lt_old_postinstall_cmds
10445
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
10446
+
10447
+ # Create an old-style archive from a shared archive.
10448
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10449
+
10450
+ # Create a temporary old-style archive to link instead of a shared archive.
10451
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10452
+
10453
+ # Commands used to build and install a shared archive.
10454
+ archive_cmds=$lt_archive_cmds
10455
+ archive_expsym_cmds=$lt_archive_expsym_cmds
10456
+ postinstall_cmds=$lt_postinstall_cmds
10457
+ postuninstall_cmds=$lt_postuninstall_cmds
10458
+
10459
+ # Commands used to build a loadable module (assumed same as above if empty)
10460
+ module_cmds=$lt_module_cmds
10461
+ module_expsym_cmds=$lt_module_expsym_cmds
10462
+
10463
+ # Commands to strip libraries.
10464
+ old_striplib=$lt_old_striplib
10465
+ striplib=$lt_striplib
10466
+
10467
+ # Dependencies to place before the objects being linked to create a
10468
+ # shared library.
10469
+ predep_objects=$lt_predep_objects
10470
+
10471
+ # Dependencies to place after the objects being linked to create a
10472
+ # shared library.
10473
+ postdep_objects=$lt_postdep_objects
10474
+
10475
+ # Dependencies to place before the objects being linked to create a
10476
+ # shared library.
10477
+ predeps=$lt_predeps
10478
+
10479
+ # Dependencies to place after the objects being linked to create a
10480
+ # shared library.
10481
+ postdeps=$lt_postdeps
10482
+
10483
+ # The directories searched by this compiler when creating a shared
10484
+ # library
10485
+ compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
10486
+
10487
+ # The library search path used internally by the compiler when linking
10488
+ # a shared library.
10489
+ compiler_lib_search_path=$lt_compiler_lib_search_path
10490
+
10491
+ # Method to check whether dependent libraries are shared objects.
10492
+ deplibs_check_method=$lt_deplibs_check_method
10493
+
10494
+ # Command to use when deplibs_check_method == file_magic.
10495
+ file_magic_cmd=$lt_file_magic_cmd
10496
+
10497
+ # Flag that allows shared libraries with undefined symbols to be built.
10498
+ allow_undefined_flag=$lt_allow_undefined_flag
10499
+
10500
+ # Flag that forces no undefined symbols.
10501
+ no_undefined_flag=$lt_no_undefined_flag
10502
+
10503
+ # Commands used to finish a libtool library installation in a directory.
10504
+ finish_cmds=$lt_finish_cmds
10505
+
10506
+ # Same as above, but a single script fragment to be evaled but not shown.
10507
+ finish_eval=$lt_finish_eval
10508
+
10509
+ # Take the output of nm and produce a listing of raw symbols and C names.
10510
+ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10511
+
10512
+ # Transform the output of nm in a proper C declaration
10513
+ global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10514
+
10515
+ # Transform the output of nm in a C name address pair
10516
+ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10517
+
10518
+ # This is the shared library runtime path variable.
10519
+ runpath_var=$runpath_var
10520
+
10521
+ # This is the shared library path variable.
10522
+ shlibpath_var=$shlibpath_var
10523
+
10524
+ # Is shlibpath searched before the hard-coded library search path?
10525
+ shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10526
+
10527
+ # How to hardcode a shared library path into an executable.
10528
+ hardcode_action=$hardcode_action
10529
+
10530
+ # Whether we should hardcode library paths into libraries.
10531
+ hardcode_into_libs=$hardcode_into_libs
10532
+
10533
+ # Flag to hardcode \$libdir into a binary during linking.
10534
+ # This must work even if \$libdir does not exist.
10535
+ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10536
+
10537
+ # If ld is used when linking, flag to hardcode \$libdir into
10538
+ # a binary during linking. This must work even if \$libdir does
10539
+ # not exist.
10540
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10541
+
10542
+ # Whether we need a single -rpath flag with a separated argument.
10543
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator
10544
+
10545
+ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10546
+ # resulting binary.
10547
+ hardcode_direct=$hardcode_direct
10548
+
10549
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10550
+ # resulting binary.
10551
+ hardcode_minus_L=$hardcode_minus_L
10552
+
10553
+ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10554
+ # the resulting binary.
10555
+ hardcode_shlibpath_var=$hardcode_shlibpath_var
10556
+
10557
+ # Set to yes if building a shared library automatically hardcodes DIR into the library
10558
+ # and all subsequent libraries and executables linked against it.
10559
+ hardcode_automatic=$hardcode_automatic
10560
+
10561
+ # Variables whose values should be saved in libtool wrapper scripts and
10562
+ # restored at relink time.
10563
+ variables_saved_for_relink="$variables_saved_for_relink"
10564
+
10565
+ # Whether libtool must link a program against all its dependency libraries.
10566
+ link_all_deplibs=$link_all_deplibs
10567
+
10568
+ # Compile-time system search path for libraries
10569
+ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10570
+
10571
+ # Run-time system search path for libraries
10572
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10573
+
10574
+ # Fix the shell variable \$srcfile for the compiler.
10575
+ fix_srcfile_path=$lt_fix_srcfile_path
10576
+
10577
+ # Set to yes if exported symbols are required.
10578
+ always_export_symbols=$always_export_symbols
10579
+
10580
+ # The commands to list exported symbols.
10581
+ export_symbols_cmds=$lt_export_symbols_cmds
10582
+
10583
+ # The commands to extract the exported symbol list from a shared archive.
10584
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
10585
+
10586
+ # Symbols that should not be listed in the preloaded symbols.
10587
+ exclude_expsyms=$lt_exclude_expsyms
10588
+
10589
+ # Symbols that must always be exported.
10590
+ include_expsyms=$lt_include_expsyms
10591
+
10592
+ # ### END LIBTOOL CONFIG
10593
+
10594
+ __EOF__
10595
+
10596
+
10597
+ case $host_os in
10598
+ aix3*)
10599
+ cat <<\EOF >> "$cfgfile"
10600
+
10601
+ # AIX sometimes has problems with the GCC collect2 program. For some
10602
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
10603
+ # vanish in a puff of smoke.
10604
+ if test "X${COLLECT_NAMES+set}" != Xset; then
10605
+ COLLECT_NAMES=
10606
+ export COLLECT_NAMES
10607
+ fi
10608
+ EOF
10609
+ ;;
10610
+ esac
10611
+
10612
+ # We use sed instead of cat because bash on DJGPP gets confused if
10613
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
10614
+ # text mode, it properly converts lines to CR/LF. This bash problem
10615
+ # is reportedly fixed, but why not run on old versions too?
10616
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10617
+
10618
+ mv -f "$cfgfile" "$ofile" || \
10619
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10620
+ chmod +x "$ofile"
10621
+
10622
+ else
10623
+ # If there is no Makefile yet, we rely on a make rule to execute
10624
+ # `config.status --recheck' to rerun these tests and create the
10625
+ # libtool script then.
10626
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10627
+ if test -f "$ltmain_in"; then
10628
+ test -f Makefile && make "$ltmain"
10629
+ fi
10630
+ fi
10631
+
10632
+
10633
+ ac_ext=c
10634
+ ac_cpp='$CPP $CPPFLAGS'
10635
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10636
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10637
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
10638
+
10639
+ CC="$lt_save_CC"
10640
+
10641
+
10642
+ @%:@ Check whether --with-tags was given.
10643
+ if test "${with_tags+set}" = set; then :
10644
+ withval=$with_tags; tagnames="$withval"
10645
+ fi
10646
+
10647
+
10648
+ if test -f "$ltmain" && test -n "$tagnames"; then
10649
+ if test ! -f "${ofile}"; then
10650
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
10651
+ $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10652
+ fi
10653
+
10654
+ if test -z "$LTCC"; then
10655
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10656
+ if test -z "$LTCC"; then
10657
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10658
+ $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10659
+ else
10660
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10661
+ $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10662
+ fi
10663
+ fi
10664
+ if test -z "$LTCFLAGS"; then
10665
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
10666
+ fi
10667
+
10668
+ # Extract list of available tagged configurations in $ofile.
10669
+ # Note that this assumes the entire list is on one line.
10670
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10671
+
10672
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10673
+ for tagname in $tagnames; do
10674
+ IFS="$lt_save_ifs"
10675
+ # Check whether tagname contains only valid characters
10676
+ case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10677
+ "") ;;
10678
+ *) as_fn_error $? "invalid tag name: $tagname" "$LINENO" 5
10679
+ ;;
10680
+ esac
10681
+
10682
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10683
+ then
10684
+ as_fn_error $? "tag name \"$tagname\" already exists" "$LINENO" 5
10685
+ fi
10686
+
10687
+ # Update the list of available tags.
10688
+ if test -n "$tagname"; then
10689
+ echo appending configuration tag \"$tagname\" to $ofile
10690
+
10691
+ case $tagname in
10692
+ CXX)
10693
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10694
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10695
+ (test "X$CXX" != "Xg++"))) ; then
10696
+
10697
+ ac_ext=cpp
10698
+ ac_cpp='$CXXCPP $CPPFLAGS'
10699
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10700
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10701
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10702
+
10703
+
10704
+
10705
+
10706
+ archive_cmds_need_lc_CXX=no
10707
+ allow_undefined_flag_CXX=
10708
+ always_export_symbols_CXX=no
10709
+ archive_expsym_cmds_CXX=
10710
+ export_dynamic_flag_spec_CXX=
10711
+ hardcode_direct_CXX=no
10712
+ hardcode_libdir_flag_spec_CXX=
10713
+ hardcode_libdir_flag_spec_ld_CXX=
10714
+ hardcode_libdir_separator_CXX=
10715
+ hardcode_minus_L_CXX=no
10716
+ hardcode_shlibpath_var_CXX=unsupported
10717
+ hardcode_automatic_CXX=no
10718
+ module_cmds_CXX=
10719
+ module_expsym_cmds_CXX=
10720
+ link_all_deplibs_CXX=unknown
10721
+ old_archive_cmds_CXX=$old_archive_cmds
10722
+ no_undefined_flag_CXX=
10723
+ whole_archive_flag_spec_CXX=
10724
+ enable_shared_with_static_runtimes_CXX=no
10725
+
10726
+ # Dependencies to place before and after the object being linked:
10727
+ predep_objects_CXX=
10728
+ postdep_objects_CXX=
10729
+ predeps_CXX=
10730
+ postdeps_CXX=
10731
+ compiler_lib_search_path_CXX=
10732
+ compiler_lib_search_dirs_CXX=
10733
+
10734
+ # Source file extension for C++ test sources.
10735
+ ac_ext=cpp
10736
+
10737
+ # Object file extension for compiled C++ test sources.
10738
+ objext=o
10739
+ objext_CXX=$objext
10740
+
10741
+ # Code to be used in simple compile tests
10742
+ lt_simple_compile_test_code="int some_variable = 0;"
10743
+
10744
+ # Code to be used in simple link tests
10745
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
10746
+
10747
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10748
+
10749
+ # If no C compiler was specified, use CC.
10750
+ LTCC=${LTCC-"$CC"}
10751
+
10752
+ # If no C compiler flags were specified, use CFLAGS.
10753
+ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10754
+
10755
+ # Allow CC to be a program name with arguments.
10756
+ compiler=$CC
10757
+
10758
+
10759
+ # save warnings/boilerplate of simple test code
10760
+ ac_outfile=conftest.$ac_objext
10761
+ echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10762
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10763
+ _lt_compiler_boilerplate=`cat conftest.err`
10764
+ $rm conftest*
10765
+
10766
+ ac_outfile=conftest.$ac_objext
10767
+ echo "$lt_simple_link_test_code" >conftest.$ac_ext
10768
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10769
+ _lt_linker_boilerplate=`cat conftest.err`
10770
+ $rm -r conftest*
10771
+
10772
+
10773
+ # Allow CC to be a program name with arguments.
10774
+ lt_save_CC=$CC
10775
+ lt_save_LD=$LD
10776
+ lt_save_GCC=$GCC
10777
+ GCC=$GXX
10778
+ lt_save_with_gnu_ld=$with_gnu_ld
10779
+ lt_save_path_LD=$lt_cv_path_LD
10780
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10781
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10782
+ else
10783
+ unset lt_cv_prog_gnu_ld
10784
+ fi
10785
+ if test -n "${lt_cv_path_LDCXX+set}"; then
10786
+ lt_cv_path_LD=$lt_cv_path_LDCXX
10787
+ else
10788
+ unset lt_cv_path_LD
10789
+ fi
10790
+ test -z "${LDCXX+set}" || LD=$LDCXX
10791
+ CC=${CXX-"c++"}
10792
+ compiler=$CC
10793
+ compiler_CXX=$CC
10794
+ for cc_temp in $compiler""; do
10795
+ case $cc_temp in
10796
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10797
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10798
+ \-*) ;;
10799
+ *) break;;
10800
+ esac
10801
+ done
10802
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
10803
+
10804
+
10805
+ # We don't want -fno-exception wen compiling C++ code, so set the
10806
+ # no_builtin_flag separately
10807
+ if test "$GXX" = yes; then
10808
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
10809
+ else
10810
+ lt_prog_compiler_no_builtin_flag_CXX=
10811
+ fi
10812
+
10813
+ if test "$GXX" = yes; then
10814
+ # Set up default GNU C++ configuration
10815
+
10816
+
10817
+ @%:@ Check whether --with-gnu-ld was given.
10818
+ if test "${with_gnu_ld+set}" = set; then :
10819
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
10820
+ else
10821
+ with_gnu_ld=no
10822
+ fi
10823
+
10824
+ ac_prog=ld
10825
+ if test "$GCC" = yes; then
10826
+ # Check if gcc -print-prog-name=ld gives a path.
10827
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
10828
+ $as_echo_n "checking for ld used by $CC... " >&6; }
10829
+ case $host in
10830
+ *-*-mingw*)
10831
+ # gcc leaves a trailing carriage return which upsets mingw
10832
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10833
+ *)
10834
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10835
+ esac
10836
+ case $ac_prog in
10837
+ # Accept absolute paths.
10838
+ [\\/]* | ?:[\\/]*)
10839
+ re_direlt='/[^/][^/]*/\.\./'
10840
+ # Canonicalize the pathname of ld
10841
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
10842
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10843
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
10844
+ done
10845
+ test -z "$LD" && LD="$ac_prog"
10846
+ ;;
10847
+ "")
10848
+ # If it fails, then pretend we aren't using GCC.
10849
+ ac_prog=ld
10850
+ ;;
10851
+ *)
10852
+ # If it is relative, then search for the first ld in PATH.
10853
+ with_gnu_ld=unknown
10854
+ ;;
10855
+ esac
10856
+ elif test "$with_gnu_ld" = yes; then
10857
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10858
+ $as_echo_n "checking for GNU ld... " >&6; }
10859
+ else
10860
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10861
+ $as_echo_n "checking for non-GNU ld... " >&6; }
10862
+ fi
10863
+ if ${lt_cv_path_LD+:} false; then :
10864
+ $as_echo_n "(cached) " >&6
10865
+ else
10866
+ if test -z "$LD"; then
10867
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10868
+ for ac_dir in $PATH; do
10869
+ IFS="$lt_save_ifs"
10870
+ test -z "$ac_dir" && ac_dir=.
10871
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10872
+ lt_cv_path_LD="$ac_dir/$ac_prog"
10873
+ # Check to see if the program is GNU ld. I'd rather use --version,
10874
+ # but apparently some variants of GNU ld only accept -v.
10875
+ # Break only if it was the GNU/non-GNU ld that we prefer.
10876
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
10877
+ *GNU* | *'with BFD'*)
10878
+ test "$with_gnu_ld" != no && break
10879
+ ;;
10880
+ *)
10881
+ test "$with_gnu_ld" != yes && break
10882
+ ;;
10883
+ esac
10884
+ fi
10885
+ done
10886
+ IFS="$lt_save_ifs"
10887
+ else
10888
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
10889
+ fi
10890
+ fi
10891
+
10892
+ LD="$lt_cv_path_LD"
10893
+ if test -n "$LD"; then
10894
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10895
+ $as_echo "$LD" >&6; }
10896
+ else
10897
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898
+ $as_echo "no" >&6; }
10899
+ fi
10900
+ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
10901
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10902
+ $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10903
+ if ${lt_cv_prog_gnu_ld+:} false; then :
10904
+ $as_echo_n "(cached) " >&6
10905
+ else
10906
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
10907
+ case `$LD -v 2>&1 </dev/null` in
10908
+ *GNU* | *'with BFD'*)
10909
+ lt_cv_prog_gnu_ld=yes
10910
+ ;;
10911
+ *)
10912
+ lt_cv_prog_gnu_ld=no
10913
+ ;;
10914
+ esac
10915
+ fi
10916
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
10917
+ $as_echo "$lt_cv_prog_gnu_ld" >&6; }
10918
+ with_gnu_ld=$lt_cv_prog_gnu_ld
10919
+
10920
+
10921
+
10922
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
10923
+ # archiving commands below assume that GNU ld is being used.
10924
+ if test "$with_gnu_ld" = yes; then
10925
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
10926
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10927
+
10928
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
10929
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
10930
+
10931
+ # If archive_cmds runs LD, not CC, wlarc should be empty
10932
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
10933
+ # investigate it a little bit more. (MM)
10934
+ wlarc='${wl}'
10935
+
10936
+ # ancient GNU ld didn't support --whole-archive et. al.
10937
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
10938
+ grep 'no-whole-archive' > /dev/null; then
10939
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10940
+ else
10941
+ whole_archive_flag_spec_CXX=
10942
+ fi
10943
+ else
10944
+ with_gnu_ld=no
10945
+ wlarc=
10946
+
10947
+ # A generic and very simple default shared library creation
10948
+ # command for GNU C++ for the case where it uses the native
10949
+ # linker, instead of GNU ld. If possible, this setting should
10950
+ # overridden to take advantage of the native linker features on
10951
+ # the platform it is being used on.
10952
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10953
+ fi
10954
+
10955
+ # Commands to make compiler produce verbose output that lists
10956
+ # what "hidden" libraries, object files and flags are used when
10957
+ # linking a shared library.
10958
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
10959
+
10960
+ else
10961
+ GXX=no
10962
+ with_gnu_ld=no
10963
+ wlarc=
10964
+ fi
10965
+
10966
+ # PORTME: fill in a description of your system's C++ link characteristics
10967
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10968
+ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10969
+ ld_shlibs_CXX=yes
10970
+ case $host_os in
10971
+ aix3*)
10972
+ # FIXME: insert proper C++ library support
10973
+ ld_shlibs_CXX=no
10974
+ ;;
10975
+ aix[4-9]*)
10976
+ if test "$host_cpu" = ia64; then
10977
+ # On IA64, the linker does run time linking by default, so we don't
10978
+ # have to do anything special.
10979
+ aix_use_runtimelinking=no
10980
+ exp_sym_flag='-Bexport'
10981
+ no_entry_flag=""
10982
+ else
10983
+ aix_use_runtimelinking=no
10984
+
10985
+ # Test if we are trying to use run time linking or normal
10986
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10987
+ # need to do runtime linking.
10988
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
10989
+ for ld_flag in $LDFLAGS; do
10990
+ case $ld_flag in
10991
+ *-brtl*)
10992
+ aix_use_runtimelinking=yes
10993
+ break
10994
+ ;;
10995
+ esac
10996
+ done
10997
+ ;;
10998
+ esac
10999
+
11000
+ exp_sym_flag='-bexport'
11001
+ no_entry_flag='-bnoentry'
11002
+ fi
11003
+
11004
+ # When large executables or shared objects are built, AIX ld can
11005
+ # have problems creating the table of contents. If linking a library
11006
+ # or program results in "error TOC overflow" add -mminimal-toc to
11007
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11008
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11009
+
11010
+ archive_cmds_CXX=''
11011
+ hardcode_direct_CXX=yes
11012
+ hardcode_libdir_separator_CXX=':'
11013
+ link_all_deplibs_CXX=yes
11014
+
11015
+ if test "$GXX" = yes; then
11016
+ case $host_os in aix4.[012]|aix4.[012].*)
11017
+ # We only want to do this on AIX 4.2 and lower, the check
11018
+ # below for broken collect2 doesn't work under 4.3+
11019
+ collect2name=`${CC} -print-prog-name=collect2`
11020
+ if test -f "$collect2name" && \
11021
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
11022
+ then
11023
+ # We have reworked collect2
11024
+ :
11025
+ else
11026
+ # We have old collect2
11027
+ hardcode_direct_CXX=unsupported
11028
+ # It fails to find uninstalled libraries when the uninstalled
11029
+ # path is not listed in the libpath. Setting hardcode_minus_L
11030
+ # to unsupported forces relinking
11031
+ hardcode_minus_L_CXX=yes
11032
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
11033
+ hardcode_libdir_separator_CXX=
11034
+ fi
11035
+ ;;
11036
+ esac
11037
+ shared_flag='-shared'
11038
+ if test "$aix_use_runtimelinking" = yes; then
11039
+ shared_flag="$shared_flag "'${wl}-G'
11040
+ fi
11041
+ else
11042
+ # not using gcc
11043
+ if test "$host_cpu" = ia64; then
11044
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11045
+ # chokes on -Wl,-G. The following line is correct:
11046
+ shared_flag='-G'
11047
+ else
11048
+ if test "$aix_use_runtimelinking" = yes; then
11049
+ shared_flag='${wl}-G'
11050
+ else
11051
+ shared_flag='${wl}-bM:SRE'
11052
+ fi
11053
+ fi
11054
+ fi
11055
+
11056
+ # It seems that -bexpall does not export symbols beginning with
11057
+ # underscore (_), so it is better to generate a list of symbols to export.
11058
+ always_export_symbols_CXX=yes
11059
+ if test "$aix_use_runtimelinking" = yes; then
11060
+ # Warning - without using the other runtime loading flags (-brtl),
11061
+ # -berok will link without error, but may produce a broken library.
11062
+ allow_undefined_flag_CXX='-berok'
11063
+ # Determine the default libpath from the value encoded in an empty executable.
11064
+
11065
+ cat > conftest.$ac_ext <<EOF
11066
+ #line __oline__ "configure"
11067
+ #include "confdefs.h"
11068
+ int main() {
11069
+ ; return 0; }
11070
+ EOF
11071
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11072
+ (eval $ac_link) 2>&5
11073
+ ac_status=$?
11074
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11075
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
11076
+
11077
+ lt_aix_libpath_sed='
11078
+ /Import File Strings/,/^$/ {
11079
+ /^0/ {
11080
+ s/^0 *\(.*\)$/\1/
11081
+ p
11082
+ }
11083
+ }'
11084
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11085
+ # Check for a 64-bit object if we didn't find anything.
11086
+ if test -z "$aix_libpath"; then
11087
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11088
+ fi
11089
+ rm -rf conftest*
11090
+ else
11091
+ echo "configure: failed program was:" >&5
11092
+ cat conftest.$ac_ext >&6
11093
+ fi
11094
+ rm -f conftest*
11095
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11096
+
11097
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11098
+
11099
+ archive_expsym_cmds_CXX="\$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"
11100
+ else
11101
+ if test "$host_cpu" = ia64; then
11102
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
11103
+ allow_undefined_flag_CXX="-z nodefs"
11104
+ archive_expsym_cmds_CXX="\$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"
11105
+ else
11106
+ # Determine the default libpath from the value encoded in an empty executable.
11107
+
11108
+ cat > conftest.$ac_ext <<EOF
11109
+ #line __oline__ "configure"
11110
+ #include "confdefs.h"
11111
+ int main() {
11112
+ ; return 0; }
11113
+ EOF
11114
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11115
+ (eval $ac_link) 2>&5
11116
+ ac_status=$?
11117
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11118
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
11119
+
11120
+ lt_aix_libpath_sed='
11121
+ /Import File Strings/,/^$/ {
11122
+ /^0/ {
11123
+ s/^0 *\(.*\)$/\1/
11124
+ p
11125
+ }
11126
+ }'
11127
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11128
+ # Check for a 64-bit object if we didn't find anything.
11129
+ if test -z "$aix_libpath"; then
11130
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11131
+ fi
11132
+ rm -rf conftest*
11133
+ else
11134
+ echo "configure: failed program was:" >&5
11135
+ cat conftest.$ac_ext >&6
11136
+ fi
11137
+ rm -f conftest*
11138
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11139
+
11140
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11141
+ # Warning - without using the other run time loading flags,
11142
+ # -berok will link without error, but may produce a broken library.
11143
+ no_undefined_flag_CXX=' ${wl}-bernotok'
11144
+ allow_undefined_flag_CXX=' ${wl}-berok'
11145
+ # Exported symbols can be pulled into shared objects from archives
11146
+ whole_archive_flag_spec_CXX='$convenience'
11147
+ archive_cmds_need_lc_CXX=yes
11148
+ # This is similar to how AIX traditionally builds its shared libraries.
11149
+ archive_expsym_cmds_CXX="\$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'
11150
+ fi
11151
+ fi
11152
+ ;;
11153
+
11154
+ beos*)
11155
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11156
+ allow_undefined_flag_CXX=unsupported
11157
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11158
+ # support --undefined. This deserves some investigation. FIXME
11159
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11160
+ else
11161
+ ld_shlibs_CXX=no
11162
+ fi
11163
+ ;;
11164
+
11165
+ chorus*)
11166
+ case $cc_basename in
11167
+ *)
11168
+ # FIXME: insert proper C++ library support
11169
+ ld_shlibs_CXX=no
11170
+ ;;
11171
+ esac
11172
+ ;;
11173
+
11174
+ cygwin* | mingw* | pw32*)
11175
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
11176
+ # as there is no search path for DLLs.
11177
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
11178
+ allow_undefined_flag_CXX=unsupported
11179
+ always_export_symbols_CXX=no
11180
+ enable_shared_with_static_runtimes_CXX=yes
11181
+
11182
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11183
+ archive_cmds_CXX='$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'
11184
+ # If the export-symbols file already is a .def file (1st line
11185
+ # is EXPORTS), use it as is; otherwise, prepend...
11186
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11187
+ cp $export_symbols $output_objdir/$soname.def;
11188
+ else
11189
+ echo EXPORTS > $output_objdir/$soname.def;
11190
+ cat $export_symbols >> $output_objdir/$soname.def;
11191
+ fi~
11192
+ $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'
11193
+ else
11194
+ ld_shlibs_CXX=no
11195
+ fi
11196
+ ;;
11197
+ darwin* | rhapsody*)
11198
+ archive_cmds_need_lc_CXX=no
11199
+ hardcode_direct_CXX=no
11200
+ hardcode_automatic_CXX=yes
11201
+ hardcode_shlibpath_var_CXX=unsupported
11202
+ whole_archive_flag_spec_CXX=''
11203
+ link_all_deplibs_CXX=yes
11204
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
11205
+ if test "$GXX" = yes ; then
11206
+ output_verbose_link_cmd='echo'
11207
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
11208
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11209
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
11210
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
11211
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
11212
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
11213
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
11214
+ fi
11215
+ else
11216
+ case $cc_basename in
11217
+ xlc*)
11218
+ output_verbose_link_cmd='echo'
11219
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
11220
+ module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11221
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11222
+ archive_expsym_cmds_CXX='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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11223
+ module_expsym_cmds_CXX='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}'
11224
+ ;;
11225
+ *)
11226
+ ld_shlibs_CXX=no
11227
+ ;;
11228
+ esac
11229
+ fi
11230
+ ;;
11231
+
11232
+ dgux*)
11233
+ case $cc_basename in
11234
+ ec++*)
11235
+ # FIXME: insert proper C++ library support
11236
+ ld_shlibs_CXX=no
11237
+ ;;
11238
+ ghcx*)
11239
+ # Green Hills C++ Compiler
11240
+ # FIXME: insert proper C++ library support
11241
+ ld_shlibs_CXX=no
11242
+ ;;
11243
+ *)
11244
+ # FIXME: insert proper C++ library support
11245
+ ld_shlibs_CXX=no
11246
+ ;;
11247
+ esac
11248
+ ;;
11249
+ freebsd[12]*)
11250
+ # C++ shared libraries reported to be fairly broken before switch to ELF
11251
+ ld_shlibs_CXX=no
11252
+ ;;
11253
+ freebsd-elf*)
11254
+ archive_cmds_need_lc_CXX=no
11255
+ ;;
11256
+ freebsd* | dragonfly*)
11257
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
11258
+ # conventions
11259
+ ld_shlibs_CXX=yes
11260
+ ;;
11261
+ gnu*)
11262
+ ;;
11263
+ hpux9*)
11264
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11265
+ hardcode_libdir_separator_CXX=:
11266
+ export_dynamic_flag_spec_CXX='${wl}-E'
11267
+ hardcode_direct_CXX=yes
11268
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
11269
+ # but as the default
11270
+ # location of the library.
11271
+
11272
+ case $cc_basename in
11273
+ CC*)
11274
+ # FIXME: insert proper C++ library support
11275
+ ld_shlibs_CXX=no
11276
+ ;;
11277
+ aCC*)
11278
+ archive_cmds_CXX='$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'
11279
+ # Commands to make compiler produce verbose output that lists
11280
+ # what "hidden" libraries, object files and flags are used when
11281
+ # linking a shared library.
11282
+ #
11283
+ # There doesn't appear to be a way to prevent this compiler from
11284
+ # explicitly linking system object files so we need to strip them
11285
+ # from the output so that they don't get included in the library
11286
+ # dependencies.
11287
+ 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'
11288
+ ;;
11289
+ *)
11290
+ if test "$GXX" = yes; then
11291
+ archive_cmds_CXX='$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'
11292
+ else
11293
+ # FIXME: insert proper C++ library support
11294
+ ld_shlibs_CXX=no
11295
+ fi
11296
+ ;;
11297
+ esac
11298
+ ;;
11299
+ hpux10*|hpux11*)
11300
+ if test $with_gnu_ld = no; then
11301
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11302
+ hardcode_libdir_separator_CXX=:
11303
+
11304
+ case $host_cpu in
11305
+ hppa*64*|ia64*) ;;
11306
+ *)
11307
+ export_dynamic_flag_spec_CXX='${wl}-E'
11308
+ ;;
11309
+ esac
11310
+ fi
11311
+ case $host_cpu in
11312
+ hppa*64*|ia64*)
11313
+ hardcode_direct_CXX=no
11314
+ hardcode_shlibpath_var_CXX=no
11315
+ ;;
11316
+ *)
11317
+ hardcode_direct_CXX=yes
11318
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
11319
+ # but as the default
11320
+ # location of the library.
11321
+ ;;
11322
+ esac
11323
+
11324
+ case $cc_basename in
11325
+ CC*)
11326
+ # FIXME: insert proper C++ library support
11327
+ ld_shlibs_CXX=no
11328
+ ;;
11329
+ aCC*)
11330
+ case $host_cpu in
11331
+ hppa*64*)
11332
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11333
+ ;;
11334
+ ia64*)
11335
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11336
+ ;;
11337
+ *)
11338
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11339
+ ;;
11340
+ esac
11341
+ # Commands to make compiler produce verbose output that lists
11342
+ # what "hidden" libraries, object files and flags are used when
11343
+ # linking a shared library.
11344
+ #
11345
+ # There doesn't appear to be a way to prevent this compiler from
11346
+ # explicitly linking system object files so we need to strip them
11347
+ # from the output so that they don't get included in the library
11348
+ # dependencies.
11349
+ 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'
11350
+ ;;
11351
+ *)
11352
+ if test "$GXX" = yes; then
11353
+ if test $with_gnu_ld = no; then
11354
+ case $host_cpu in
11355
+ hppa*64*)
11356
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11357
+ ;;
11358
+ ia64*)
11359
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11360
+ ;;
11361
+ *)
11362
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11363
+ ;;
11364
+ esac
11365
+ fi
11366
+ else
11367
+ # FIXME: insert proper C++ library support
11368
+ ld_shlibs_CXX=no
11369
+ fi
11370
+ ;;
11371
+ esac
11372
+ ;;
11373
+ interix[3-9]*)
11374
+ hardcode_direct_CXX=no
11375
+ hardcode_shlibpath_var_CXX=no
11376
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11377
+ export_dynamic_flag_spec_CXX='${wl}-E'
11378
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11379
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
11380
+ # default) and relocated if they conflict, which is a slow very memory
11381
+ # consuming and fragmenting process. To avoid this, we pick a random,
11382
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11383
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11384
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11385
+ archive_expsym_cmds_CXX='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'
11386
+ ;;
11387
+ irix5* | irix6*)
11388
+ case $cc_basename in
11389
+ CC*)
11390
+ # SGI C++
11391
+ archive_cmds_CXX='$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'
11392
+
11393
+ # Archives containing C++ object files must be created using
11394
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
11395
+ # necessary to make sure instantiated templates are included
11396
+ # in the archive.
11397
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
11398
+ ;;
11399
+ *)
11400
+ if test "$GXX" = yes; then
11401
+ if test "$with_gnu_ld" = no; then
11402
+ archive_cmds_CXX='$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'
11403
+ else
11404
+ archive_cmds_CXX='$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'
11405
+ fi
11406
+ fi
11407
+ link_all_deplibs_CXX=yes
11408
+ ;;
11409
+ esac
11410
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11411
+ hardcode_libdir_separator_CXX=:
11412
+ ;;
11413
+ linux* | k*bsd*-gnu)
11414
+ case $cc_basename in
11415
+ KCC*)
11416
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
11417
+
11418
+ # KCC will only create a shared library if the output file
11419
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
11420
+ # to its proper name (with version) after linking.
11421
+ archive_cmds_CXX='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'
11422
+ archive_expsym_cmds_CXX='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'
11423
+ # Commands to make compiler produce verbose output that lists
11424
+ # what "hidden" libraries, object files and flags are used when
11425
+ # linking a shared library.
11426
+ #
11427
+ # There doesn't appear to be a way to prevent this compiler from
11428
+ # explicitly linking system object files so we need to strip them
11429
+ # from the output so that they don't get included in the library
11430
+ # dependencies.
11431
+ 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'
11432
+
11433
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
11434
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11435
+
11436
+ # Archives containing C++ object files must be created using
11437
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11438
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11439
+ ;;
11440
+ icpc*)
11441
+ # Intel C++
11442
+ with_gnu_ld=yes
11443
+ # version 8.0 and above of icpc choke on multiply defined symbols
11444
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
11445
+ # earlier do not add the objects themselves.
11446
+ case `$CC -V 2>&1` in
11447
+ *"Version 7."*)
11448
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11449
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11450
+ ;;
11451
+ *) # Version 8.0 or newer
11452
+ tmp_idyn=
11453
+ case $host_cpu in
11454
+ ia64*) tmp_idyn=' -i_dynamic';;
11455
+ esac
11456
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11457
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11458
+ ;;
11459
+ esac
11460
+ archive_cmds_need_lc_CXX=no
11461
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11462
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11463
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11464
+ ;;
11465
+ pgCC* | pgcpp*)
11466
+ # Portland Group C++ compiler
11467
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
11468
+ archive_expsym_cmds_CXX='$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'
11469
+
11470
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11471
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11472
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11473
+ ;;
11474
+ cxx*)
11475
+ # Compaq C++
11476
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11477
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
11478
+
11479
+ runpath_var=LD_RUN_PATH
11480
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11481
+ hardcode_libdir_separator_CXX=:
11482
+
11483
+ # Commands to make compiler produce verbose output that lists
11484
+ # what "hidden" libraries, object files and flags are used when
11485
+ # linking a shared library.
11486
+ #
11487
+ # There doesn't appear to be a way to prevent this compiler from
11488
+ # explicitly linking system object files so we need to strip them
11489
+ # from the output so that they don't get included in the library
11490
+ # dependencies.
11491
+ 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'
11492
+ ;;
11493
+ *)
11494
+ case `$CC -V 2>&1 | sed 5q` in
11495
+ *Sun\ C*)
11496
+ # Sun C++ 5.9
11497
+ no_undefined_flag_CXX=' -zdefs'
11498
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11499
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
11500
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
11501
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11502
+
11503
+ # Not sure whether something based on
11504
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
11505
+ # would be better.
11506
+ output_verbose_link_cmd='echo'
11507
+
11508
+ # Archives containing C++ object files must be created using
11509
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
11510
+ # necessary to make sure instantiated templates are included
11511
+ # in the archive.
11512
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11513
+ ;;
11514
+ esac
11515
+ ;;
11516
+ esac
11517
+ ;;
11518
+ lynxos*)
11519
+ # FIXME: insert proper C++ library support
11520
+ ld_shlibs_CXX=no
11521
+ ;;
11522
+ m88k*)
11523
+ # FIXME: insert proper C++ library support
11524
+ ld_shlibs_CXX=no
11525
+ ;;
11526
+ mvs*)
11527
+ case $cc_basename in
11528
+ cxx*)
11529
+ # FIXME: insert proper C++ library support
11530
+ ld_shlibs_CXX=no
11531
+ ;;
11532
+ *)
11533
+ # FIXME: insert proper C++ library support
11534
+ ld_shlibs_CXX=no
11535
+ ;;
11536
+ esac
11537
+ ;;
11538
+ netbsd*)
11539
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11540
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11541
+ wlarc=
11542
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
11543
+ hardcode_direct_CXX=yes
11544
+ hardcode_shlibpath_var_CXX=no
11545
+ fi
11546
+ # Workaround some broken pre-1.5 toolchains
11547
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11548
+ ;;
11549
+ openbsd2*)
11550
+ # C++ shared libraries are fairly broken
11551
+ ld_shlibs_CXX=no
11552
+ ;;
11553
+ openbsd*)
11554
+ if test -f /usr/libexec/ld.so; then
11555
+ hardcode_direct_CXX=yes
11556
+ hardcode_shlibpath_var_CXX=no
11557
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11558
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11559
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11560
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
11561
+ export_dynamic_flag_spec_CXX='${wl}-E'
11562
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11563
+ fi
11564
+ output_verbose_link_cmd='echo'
11565
+ else
11566
+ ld_shlibs_CXX=no
11567
+ fi
11568
+ ;;
11569
+ osf3*)
11570
+ case $cc_basename in
11571
+ KCC*)
11572
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
11573
+
11574
+ # KCC will only create a shared library if the output file
11575
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
11576
+ # to its proper name (with version) after linking.
11577
+ archive_cmds_CXX='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'
11578
+
11579
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11580
+ hardcode_libdir_separator_CXX=:
11581
+
11582
+ # Archives containing C++ object files must be created using
11583
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11584
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11585
+
11586
+ ;;
11587
+ RCC*)
11588
+ # Rational C++ 2.4.1
11589
+ # FIXME: insert proper C++ library support
11590
+ ld_shlibs_CXX=no
11591
+ ;;
11592
+ cxx*)
11593
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11594
+ archive_cmds_CXX='$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'
11595
+
11596
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11597
+ hardcode_libdir_separator_CXX=:
11598
+
11599
+ # Commands to make compiler produce verbose output that lists
11600
+ # what "hidden" libraries, object files and flags are used when
11601
+ # linking a shared library.
11602
+ #
11603
+ # There doesn't appear to be a way to prevent this compiler from
11604
+ # explicitly linking system object files so we need to strip them
11605
+ # from the output so that they don't get included in the library
11606
+ # dependencies.
11607
+ 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'
11608
+ ;;
11609
+ *)
11610
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11611
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11612
+ archive_cmds_CXX='$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'
11613
+
11614
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11615
+ hardcode_libdir_separator_CXX=:
11616
+
11617
+ # Commands to make compiler produce verbose output that lists
11618
+ # what "hidden" libraries, object files and flags are used when
11619
+ # linking a shared library.
11620
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11621
+
11622
+ else
11623
+ # FIXME: insert proper C++ library support
11624
+ ld_shlibs_CXX=no
11625
+ fi
11626
+ ;;
11627
+ esac
11628
+ ;;
11629
+ osf4* | osf5*)
11630
+ case $cc_basename in
11631
+ KCC*)
11632
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
11633
+
11634
+ # KCC will only create a shared library if the output file
11635
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
11636
+ # to its proper name (with version) after linking.
11637
+ archive_cmds_CXX='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'
11638
+
11639
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11640
+ hardcode_libdir_separator_CXX=:
11641
+
11642
+ # Archives containing C++ object files must be created using
11643
+ # the KAI C++ compiler.
11644
+ old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
11645
+ ;;
11646
+ RCC*)
11647
+ # Rational C++ 2.4.1
11648
+ # FIXME: insert proper C++ library support
11649
+ ld_shlibs_CXX=no
11650
+ ;;
11651
+ cxx*)
11652
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
11653
+ archive_cmds_CXX='$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'
11654
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
11655
+ echo "-hidden">> $lib.exp~
11656
+ $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~
11657
+ $rm $lib.exp'
11658
+
11659
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11660
+ hardcode_libdir_separator_CXX=:
11661
+
11662
+ # Commands to make compiler produce verbose output that lists
11663
+ # what "hidden" libraries, object files and flags are used when
11664
+ # linking a shared library.
11665
+ #
11666
+ # There doesn't appear to be a way to prevent this compiler from
11667
+ # explicitly linking system object files so we need to strip them
11668
+ # from the output so that they don't get included in the library
11669
+ # dependencies.
11670
+ 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'
11671
+ ;;
11672
+ *)
11673
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11674
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11675
+ archive_cmds_CXX='$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'
11676
+
11677
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11678
+ hardcode_libdir_separator_CXX=:
11679
+
11680
+ # Commands to make compiler produce verbose output that lists
11681
+ # what "hidden" libraries, object files and flags are used when
11682
+ # linking a shared library.
11683
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11684
+
11685
+ else
11686
+ # FIXME: insert proper C++ library support
11687
+ ld_shlibs_CXX=no
11688
+ fi
11689
+ ;;
11690
+ esac
11691
+ ;;
11692
+ psos*)
11693
+ # FIXME: insert proper C++ library support
11694
+ ld_shlibs_CXX=no
11695
+ ;;
11696
+ sunos4*)
11697
+ case $cc_basename in
11698
+ CC*)
11699
+ # Sun C++ 4.x
11700
+ # FIXME: insert proper C++ library support
11701
+ ld_shlibs_CXX=no
11702
+ ;;
11703
+ lcc*)
11704
+ # Lucid
11705
+ # FIXME: insert proper C++ library support
11706
+ ld_shlibs_CXX=no
11707
+ ;;
11708
+ *)
11709
+ # FIXME: insert proper C++ library support
11710
+ ld_shlibs_CXX=no
11711
+ ;;
11712
+ esac
11713
+ ;;
11714
+ solaris*)
11715
+ case $cc_basename in
11716
+ CC*)
11717
+ # Sun C++ 4.2, 5.x and Centerline C++
11718
+ archive_cmds_need_lc_CXX=yes
11719
+ no_undefined_flag_CXX=' -zdefs'
11720
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11721
+ archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11722
+ $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'
11723
+
11724
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
11725
+ hardcode_shlibpath_var_CXX=no
11726
+ case $host_os in
11727
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
11728
+ *)
11729
+ # The compiler driver will combine and reorder linker options,
11730
+ # but understands `-z linker_flag'.
11731
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
11732
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
11733
+ ;;
11734
+ esac
11735
+ link_all_deplibs_CXX=yes
11736
+
11737
+ output_verbose_link_cmd='echo'
11738
+
11739
+ # Archives containing C++ object files must be created using
11740
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
11741
+ # necessary to make sure instantiated templates are included
11742
+ # in the archive.
11743
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11744
+ ;;
11745
+ gcx*)
11746
+ # Green Hills C++ Compiler
11747
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11748
+
11749
+ # The C++ compiler must be used to create the archive.
11750
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11751
+ ;;
11752
+ *)
11753
+ # GNU C++ compiler with Solaris linker
11754
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11755
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
11756
+ if $CC --version | grep -v '^2\.7' > /dev/null; then
11757
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11758
+ archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11759
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11760
+
11761
+ # Commands to make compiler produce verbose output that lists
11762
+ # what "hidden" libraries, object files and flags are used when
11763
+ # linking a shared library.
11764
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11765
+ else
11766
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
11767
+ # platform.
11768
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11769
+ archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11770
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11771
+
11772
+ # Commands to make compiler produce verbose output that lists
11773
+ # what "hidden" libraries, object files and flags are used when
11774
+ # linking a shared library.
11775
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11776
+ fi
11777
+
11778
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
11779
+ case $host_os in
11780
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
11781
+ *)
11782
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
11783
+ ;;
11784
+ esac
11785
+ fi
11786
+ ;;
11787
+ esac
11788
+ ;;
11789
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11790
+ no_undefined_flag_CXX='${wl}-z,text'
11791
+ archive_cmds_need_lc_CXX=no
11792
+ hardcode_shlibpath_var_CXX=no
11793
+ runpath_var='LD_RUN_PATH'
11794
+
11795
+ case $cc_basename in
11796
+ CC*)
11797
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11798
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11799
+ ;;
11800
+ *)
11801
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11802
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11803
+ ;;
11804
+ esac
11805
+ ;;
11806
+ sysv5* | sco3.2v5* | sco5v6*)
11807
+ # Note: We can NOT use -z defs as we might desire, because we do not
11808
+ # link with -lc, and that would cause any symbols used from libc to
11809
+ # always be unresolved, which means just about no library would
11810
+ # ever link correctly. If we're not using GNU ld we use -z text
11811
+ # though, which does catch some bad symbols but isn't as heavy-handed
11812
+ # as -z defs.
11813
+ # For security reasons, it is highly recommended that you always
11814
+ # use absolute paths for naming shared libraries, and exclude the
11815
+ # DT_RUNPATH tag from executables and libraries. But doing so
11816
+ # requires that you compile everything twice, which is a pain.
11817
+ # So that behaviour is only enabled if SCOABSPATH is set to a
11818
+ # non-empty value in the environment. Most likely only useful for
11819
+ # creating official distributions of packages.
11820
+ # This is a hack until libtool officially supports absolute path
11821
+ # names for shared libraries.
11822
+ no_undefined_flag_CXX='${wl}-z,text'
11823
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
11824
+ archive_cmds_need_lc_CXX=no
11825
+ hardcode_shlibpath_var_CXX=no
11826
+ hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
11827
+ hardcode_libdir_separator_CXX=':'
11828
+ link_all_deplibs_CXX=yes
11829
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
11830
+ runpath_var='LD_RUN_PATH'
11831
+
11832
+ case $cc_basename in
11833
+ CC*)
11834
+ archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11835
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11836
+ ;;
11837
+ *)
11838
+ archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11839
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11840
+ ;;
11841
+ esac
11842
+ ;;
11843
+ tandem*)
11844
+ case $cc_basename in
11845
+ NCC*)
11846
+ # NonStop-UX NCC 3.20
11847
+ # FIXME: insert proper C++ library support
11848
+ ld_shlibs_CXX=no
11849
+ ;;
11850
+ *)
11851
+ # FIXME: insert proper C++ library support
11852
+ ld_shlibs_CXX=no
11853
+ ;;
11854
+ esac
11855
+ ;;
11856
+ vxworks*)
11857
+ # FIXME: insert proper C++ library support
11858
+ ld_shlibs_CXX=no
11859
+ ;;
11860
+ *)
11861
+ # FIXME: insert proper C++ library support
11862
+ ld_shlibs_CXX=no
11863
+ ;;
11864
+ esac
11865
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
11866
+ $as_echo "$ld_shlibs_CXX" >&6; }
11867
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
11868
+
11869
+ GCC_CXX="$GXX"
11870
+ LD_CXX="$LD"
11871
+
11872
+ ## CAVEAT EMPTOR:
11873
+ ## There is no encapsulation within the following macros, do not change
11874
+ ## the running order or otherwise move them around unless you know exactly
11875
+ ## what you are doing...
11876
+ cat > conftest.$ac_ext <<EOF
11877
+ class Foo
11878
+ {
11879
+ public:
11880
+ Foo (void) { a = 0; }
11881
+ private:
11882
+ int a;
11883
+ };
11884
+ EOF
11885
+
11886
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11887
+ (eval $ac_compile) 2>&5
11888
+ ac_status=$?
11889
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11890
+ test $ac_status = 0; }; then
11891
+ # Parse the compiler output and extract the necessary
11892
+ # objects, libraries and library flags.
11893
+
11894
+ # Sentinel used to keep track of whether or not we are before
11895
+ # the conftest object file.
11896
+ pre_test_object_deps_done=no
11897
+
11898
+ # The `*' in the case matches for architectures that use `case' in
11899
+ # $output_verbose_cmd can trigger glob expansion during the loop
11900
+ # eval without this substitution.
11901
+ output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
11902
+
11903
+ for p in `eval $output_verbose_link_cmd`; do
11904
+ case $p in
11905
+
11906
+ -L* | -R* | -l*)
11907
+ # Some compilers place space between "-{L,R}" and the path.
11908
+ # Remove the space.
11909
+ if test $p = "-L" \
11910
+ || test $p = "-R"; then
11911
+ prev=$p
11912
+ continue
11913
+ else
11914
+ prev=
11915
+ fi
11916
+
11917
+ if test "$pre_test_object_deps_done" = no; then
11918
+ case $p in
11919
+ -L* | -R*)
11920
+ # Internal compiler library paths should come after those
11921
+ # provided the user. The postdeps already come after the
11922
+ # user supplied libs so there is no need to process them.
11923
+ if test -z "$compiler_lib_search_path_CXX"; then
11924
+ compiler_lib_search_path_CXX="${prev}${p}"
11925
+ else
11926
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
11927
+ fi
11928
+ ;;
11929
+ # The "-l" case would never come before the object being
11930
+ # linked, so don't bother handling this case.
11931
+ esac
11932
+ else
11933
+ if test -z "$postdeps_CXX"; then
11934
+ postdeps_CXX="${prev}${p}"
11935
+ else
11936
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
11937
+ fi
11938
+ fi
11939
+ ;;
11940
+
11941
+ *.$objext)
11942
+ # This assumes that the test object file only shows up
11943
+ # once in the compiler output.
11944
+ if test "$p" = "conftest.$objext"; then
11945
+ pre_test_object_deps_done=yes
11946
+ continue
11947
+ fi
11948
+
11949
+ if test "$pre_test_object_deps_done" = no; then
11950
+ if test -z "$predep_objects_CXX"; then
11951
+ predep_objects_CXX="$p"
11952
+ else
11953
+ predep_objects_CXX="$predep_objects_CXX $p"
11954
+ fi
11955
+ else
11956
+ if test -z "$postdep_objects_CXX"; then
11957
+ postdep_objects_CXX="$p"
11958
+ else
11959
+ postdep_objects_CXX="$postdep_objects_CXX $p"
11960
+ fi
11961
+ fi
11962
+ ;;
11963
+
11964
+ *) ;; # Ignore the rest.
11965
+
11966
+ esac
11967
+ done
11968
+
11969
+ # Clean up.
11970
+ rm -f a.out a.exe
11971
+ else
11972
+ echo "libtool.m4: error: problem compiling CXX test program"
11973
+ fi
11974
+
11975
+ $rm -f confest.$objext
11976
+
11977
+ compiler_lib_search_dirs_CXX=
11978
+ if test -n "$compiler_lib_search_path_CXX"; then
11979
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
11980
+ fi
11981
+
11982
+ # PORTME: override above test on systems where it is broken
11983
+ case $host_os in
11984
+ interix[3-9]*)
11985
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
11986
+ # hack all around it, let's just trust "g++" to DTRT.
11987
+ predep_objects_CXX=
11988
+ postdep_objects_CXX=
11989
+ postdeps_CXX=
11990
+ ;;
11991
+
11992
+ linux*)
11993
+ case `$CC -V 2>&1 | sed 5q` in
11994
+ *Sun\ C*)
11995
+ # Sun C++ 5.9
11996
+ #
11997
+ # The more standards-conforming stlport4 library is
11998
+ # incompatible with the Cstd library. Avoid specifying
11999
+ # it if it's in CXXFLAGS. Ignore libCrun as
12000
+ # -library=stlport4 depends on it.
12001
+ case " $CXX $CXXFLAGS " in
12002
+ *" -library=stlport4 "*)
12003
+ solaris_use_stlport4=yes
12004
+ ;;
12005
+ esac
12006
+ if test "$solaris_use_stlport4" != yes; then
12007
+ postdeps_CXX='-library=Cstd -library=Crun'
12008
+ fi
12009
+ ;;
12010
+ esac
12011
+ ;;
12012
+
12013
+ solaris*)
12014
+ case $cc_basename in
12015
+ CC*)
12016
+ # The more standards-conforming stlport4 library is
12017
+ # incompatible with the Cstd library. Avoid specifying
12018
+ # it if it's in CXXFLAGS. Ignore libCrun as
12019
+ # -library=stlport4 depends on it.
12020
+ case " $CXX $CXXFLAGS " in
12021
+ *" -library=stlport4 "*)
12022
+ solaris_use_stlport4=yes
12023
+ ;;
12024
+ esac
12025
+
12026
+ # Adding this requires a known-good setup of shared libraries for
12027
+ # Sun compiler versions before 5.6, else PIC objects from an old
12028
+ # archive will be linked into the output, leading to subtle bugs.
12029
+ if test "$solaris_use_stlport4" != yes; then
12030
+ postdeps_CXX='-library=Cstd -library=Crun'
12031
+ fi
12032
+ ;;
12033
+ esac
12034
+ ;;
12035
+ esac
12036
+
12037
+ case " $postdeps_CXX " in
12038
+ *" -lc "*) archive_cmds_need_lc_CXX=no ;;
12039
+ esac
12040
+
12041
+ lt_prog_compiler_wl_CXX=
12042
+ lt_prog_compiler_pic_CXX=
12043
+ lt_prog_compiler_static_CXX=
12044
+
12045
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12046
+ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
12047
+
12048
+ # C++ specific cases for pic, static, wl, etc.
12049
+ if test "$GXX" = yes; then
12050
+ lt_prog_compiler_wl_CXX='-Wl,'
12051
+ lt_prog_compiler_static_CXX='-static'
12052
+
12053
+ case $host_os in
12054
+ aix*)
12055
+ # All AIX code is PIC.
12056
+ if test "$host_cpu" = ia64; then
12057
+ # AIX 5 now supports IA64 processor
12058
+ lt_prog_compiler_static_CXX='-Bstatic'
12059
+ fi
12060
+ ;;
12061
+ amigaos*)
12062
+ # FIXME: we need at least 68020 code to build shared libraries, but
12063
+ # adding the `-m68020' flag to GCC prevents building anything better,
12064
+ # like `-m68040'.
12065
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
12066
+ ;;
12067
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12068
+ # PIC is the default for these OSes.
12069
+ ;;
12070
+ mingw* | cygwin* | os2* | pw32*)
12071
+ # This hack is so that the source file can tell whether it is being
12072
+ # built for inclusion in a dll (and should export symbols for example).
12073
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
12074
+ # (--disable-auto-import) libraries
12075
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
12076
+ ;;
12077
+ darwin* | rhapsody*)
12078
+ # PIC is the default on this platform
12079
+ # Common symbols not allowed in MH_DYLIB files
12080
+ lt_prog_compiler_pic_CXX='-fno-common'
12081
+ ;;
12082
+ *djgpp*)
12083
+ # DJGPP does not support shared libraries at all
12084
+ lt_prog_compiler_pic_CXX=
12085
+ ;;
12086
+ interix[3-9]*)
12087
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12088
+ # Instead, we relocate shared libraries at runtime.
12089
+ ;;
12090
+ sysv4*MP*)
12091
+ if test -d /usr/nec; then
12092
+ lt_prog_compiler_pic_CXX=-Kconform_pic
12093
+ fi
12094
+ ;;
12095
+ hpux*)
12096
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12097
+ # not for PA HP-UX.
12098
+ case $host_cpu in
12099
+ hppa*64*|ia64*)
12100
+ ;;
12101
+ *)
12102
+ lt_prog_compiler_pic_CXX='-fPIC'
12103
+ ;;
12104
+ esac
12105
+ ;;
12106
+ *)
12107
+ lt_prog_compiler_pic_CXX='-fPIC'
12108
+ ;;
12109
+ esac
12110
+ else
12111
+ case $host_os in
12112
+ aix[4-9]*)
12113
+ # All AIX code is PIC.
12114
+ if test "$host_cpu" = ia64; then
12115
+ # AIX 5 now supports IA64 processor
12116
+ lt_prog_compiler_static_CXX='-Bstatic'
12117
+ else
12118
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
12119
+ fi
12120
+ ;;
12121
+ chorus*)
12122
+ case $cc_basename in
12123
+ cxch68*)
12124
+ # Green Hills C++ Compiler
12125
+ # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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"
12126
+ ;;
12127
+ esac
12128
+ ;;
12129
+ darwin*)
12130
+ # PIC is the default on this platform
12131
+ # Common symbols not allowed in MH_DYLIB files
12132
+ case $cc_basename in
12133
+ xlc*)
12134
+ lt_prog_compiler_pic_CXX='-qnocommon'
12135
+ lt_prog_compiler_wl_CXX='-Wl,'
12136
+ ;;
12137
+ esac
12138
+ ;;
12139
+ dgux*)
12140
+ case $cc_basename in
12141
+ ec++*)
12142
+ lt_prog_compiler_pic_CXX='-KPIC'
12143
+ ;;
12144
+ ghcx*)
12145
+ # Green Hills C++ Compiler
12146
+ lt_prog_compiler_pic_CXX='-pic'
12147
+ ;;
12148
+ *)
12149
+ ;;
12150
+ esac
12151
+ ;;
12152
+ freebsd* | dragonfly*)
12153
+ # FreeBSD uses GNU C++
12154
+ ;;
12155
+ hpux9* | hpux10* | hpux11*)
12156
+ case $cc_basename in
12157
+ CC*)
12158
+ lt_prog_compiler_wl_CXX='-Wl,'
12159
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12160
+ if test "$host_cpu" != ia64; then
12161
+ lt_prog_compiler_pic_CXX='+Z'
12162
+ fi
12163
+ ;;
12164
+ aCC*)
12165
+ lt_prog_compiler_wl_CXX='-Wl,'
12166
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12167
+ case $host_cpu in
12168
+ hppa*64*|ia64*)
12169
+ # +Z the default
12170
+ ;;
12171
+ *)
12172
+ lt_prog_compiler_pic_CXX='+Z'
12173
+ ;;
12174
+ esac
12175
+ ;;
12176
+ *)
12177
+ ;;
12178
+ esac
12179
+ ;;
12180
+ interix*)
12181
+ # This is c89, which is MS Visual C++ (no shared libs)
12182
+ # Anyone wants to do a port?
12183
+ ;;
12184
+ irix5* | irix6* | nonstopux*)
12185
+ case $cc_basename in
12186
+ CC*)
12187
+ lt_prog_compiler_wl_CXX='-Wl,'
12188
+ lt_prog_compiler_static_CXX='-non_shared'
12189
+ # CC pic flag -KPIC is the default.
12190
+ ;;
12191
+ *)
12192
+ ;;
12193
+ esac
12194
+ ;;
12195
+ linux* | k*bsd*-gnu)
12196
+ case $cc_basename in
12197
+ KCC*)
12198
+ # KAI C++ Compiler
12199
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
12200
+ lt_prog_compiler_pic_CXX='-fPIC'
12201
+ ;;
12202
+ ecpc*)
12203
+ # old Intel C++ for x86_64 which still supported -KPIC.
12204
+ lt_prog_compiler_wl_CXX='-Wl,'
12205
+ lt_prog_compiler_pic_CXX='-KPIC'
12206
+ lt_prog_compiler_static_CXX='-static'
12207
+ ;;
12208
+ icpc*)
12209
+ # Intel C++, used to be incompatible with GCC.
12210
+ lt_prog_compiler_wl_CXX='-Wl,'
12211
+ lt_prog_compiler_pic_CXX='-fPIC'
12212
+ lt_prog_compiler_static_CXX='-static'
12213
+ ;;
12214
+ pgCC* | pgcpp*)
12215
+ # Portland Group C++ compiler.
12216
+ lt_prog_compiler_wl_CXX='-Wl,'
12217
+ lt_prog_compiler_pic_CXX='-fpic'
12218
+ lt_prog_compiler_static_CXX='-Bstatic'
12219
+ ;;
12220
+ cxx*)
12221
+ # Compaq C++
12222
+ # Make sure the PIC flag is empty. It appears that all Alpha
12223
+ # Linux and Compaq Tru64 Unix objects are PIC.
12224
+ lt_prog_compiler_pic_CXX=
12225
+ lt_prog_compiler_static_CXX='-non_shared'
12226
+ ;;
12227
+ *)
12228
+ case `$CC -V 2>&1 | sed 5q` in
12229
+ *Sun\ C*)
12230
+ # Sun C++ 5.9
12231
+ lt_prog_compiler_pic_CXX='-KPIC'
12232
+ lt_prog_compiler_static_CXX='-Bstatic'
12233
+ lt_prog_compiler_wl_CXX='-Qoption ld '
12234
+ ;;
12235
+ esac
12236
+ ;;
12237
+ esac
12238
+ ;;
12239
+ lynxos*)
12240
+ ;;
12241
+ m88k*)
12242
+ ;;
12243
+ mvs*)
12244
+ case $cc_basename in
12245
+ cxx*)
12246
+ lt_prog_compiler_pic_CXX='-W c,exportall'
12247
+ ;;
12248
+ *)
12249
+ ;;
12250
+ esac
12251
+ ;;
12252
+ netbsd*)
12253
+ ;;
12254
+ osf3* | osf4* | osf5*)
12255
+ case $cc_basename in
12256
+ KCC*)
12257
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
12258
+ ;;
12259
+ RCC*)
12260
+ # Rational C++ 2.4.1
12261
+ lt_prog_compiler_pic_CXX='-pic'
12262
+ ;;
12263
+ cxx*)
12264
+ # Digital/Compaq C++
12265
+ lt_prog_compiler_wl_CXX='-Wl,'
12266
+ # Make sure the PIC flag is empty. It appears that all Alpha
12267
+ # Linux and Compaq Tru64 Unix objects are PIC.
12268
+ lt_prog_compiler_pic_CXX=
12269
+ lt_prog_compiler_static_CXX='-non_shared'
12270
+ ;;
12271
+ *)
12272
+ ;;
12273
+ esac
12274
+ ;;
12275
+ psos*)
12276
+ ;;
12277
+ solaris*)
12278
+ case $cc_basename in
12279
+ CC*)
12280
+ # Sun C++ 4.2, 5.x and Centerline C++
12281
+ lt_prog_compiler_pic_CXX='-KPIC'
12282
+ lt_prog_compiler_static_CXX='-Bstatic'
12283
+ lt_prog_compiler_wl_CXX='-Qoption ld '
12284
+ ;;
12285
+ gcx*)
12286
+ # Green Hills C++ Compiler
12287
+ lt_prog_compiler_pic_CXX='-PIC'
12288
+ ;;
12289
+ *)
12290
+ ;;
12291
+ esac
12292
+ ;;
12293
+ sunos4*)
12294
+ case $cc_basename in
12295
+ CC*)
12296
+ # Sun C++ 4.x
12297
+ lt_prog_compiler_pic_CXX='-pic'
12298
+ lt_prog_compiler_static_CXX='-Bstatic'
12299
+ ;;
12300
+ lcc*)
12301
+ # Lucid
12302
+ lt_prog_compiler_pic_CXX='-pic'
12303
+ ;;
12304
+ *)
12305
+ ;;
12306
+ esac
12307
+ ;;
12308
+ tandem*)
12309
+ case $cc_basename in
12310
+ NCC*)
12311
+ # NonStop-UX NCC 3.20
12312
+ lt_prog_compiler_pic_CXX='-KPIC'
12313
+ ;;
12314
+ *)
12315
+ ;;
12316
+ esac
12317
+ ;;
12318
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12319
+ case $cc_basename in
12320
+ CC*)
12321
+ lt_prog_compiler_wl_CXX='-Wl,'
12322
+ lt_prog_compiler_pic_CXX='-KPIC'
12323
+ lt_prog_compiler_static_CXX='-Bstatic'
12324
+ ;;
12325
+ esac
12326
+ ;;
12327
+ vxworks*)
12328
+ ;;
12329
+ *)
12330
+ lt_prog_compiler_can_build_shared_CXX=no
12331
+ ;;
12332
+ esac
12333
+ fi
12334
+
12335
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
12336
+ $as_echo "$lt_prog_compiler_pic_CXX" >&6; }
12337
+
12338
+ #
12339
+ # Check to make sure the PIC flag actually works.
12340
+ #
12341
+ if test -n "$lt_prog_compiler_pic_CXX"; then
12342
+
12343
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
12344
+ $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
12345
+ if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
12346
+ $as_echo_n "(cached) " >&6
12347
+ else
12348
+ lt_cv_prog_compiler_pic_works_CXX=no
12349
+ ac_outfile=conftest.$ac_objext
12350
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12351
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
12352
+ # Insert the option either (1) after the last *FLAGS variable, or
12353
+ # (2) before a word containing "conftest.", or (3) at the end.
12354
+ # Note that $ac_compile itself does not contain backslashes and begins
12355
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
12356
+ # The option is referenced via a variable to avoid confusing sed.
12357
+ lt_compile=`echo "$ac_compile" | $SED \
12358
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12359
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12360
+ -e 's:$: $lt_compiler_flag:'`
12361
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
12362
+ (eval "$lt_compile" 2>conftest.err)
12363
+ ac_status=$?
12364
+ cat conftest.err >&5
12365
+ echo "configure:__oline__: \$? = $ac_status" >&5
12366
+ if (exit $ac_status) && test -s "$ac_outfile"; then
12367
+ # The compiler can only warn and ignore the option if not recognized
12368
+ # So say no if there are warnings other than the usual output.
12369
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
12370
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12371
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12372
+ lt_cv_prog_compiler_pic_works_CXX=yes
12373
+ fi
12374
+ fi
12375
+ $rm conftest*
12376
+
12377
+ fi
12378
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
12379
+ $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
12380
+
12381
+ if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
12382
+ case $lt_prog_compiler_pic_CXX in
12383
+ "" | " "*) ;;
12384
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
12385
+ esac
12386
+ else
12387
+ lt_prog_compiler_pic_CXX=
12388
+ lt_prog_compiler_can_build_shared_CXX=no
12389
+ fi
12390
+
12391
+ fi
12392
+ case $host_os in
12393
+ # For platforms which do not support PIC, -DPIC is meaningless:
12394
+ *djgpp*)
12395
+ lt_prog_compiler_pic_CXX=
12396
+ ;;
12397
+ *)
12398
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
12399
+ ;;
12400
+ esac
12401
+
12402
+ #
12403
+ # Check to make sure the static flag actually works.
12404
+ #
12405
+ wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
12406
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12407
+ $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12408
+ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
12409
+ $as_echo_n "(cached) " >&6
12410
+ else
12411
+ lt_cv_prog_compiler_static_works_CXX=no
12412
+ save_LDFLAGS="$LDFLAGS"
12413
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12414
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
12415
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12416
+ # The linker can only warn and ignore the option if not recognized
12417
+ # So say no if there are warnings
12418
+ if test -s conftest.err; then
12419
+ # Append any errors to the config.log.
12420
+ cat conftest.err 1>&5
12421
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
12422
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12423
+ if diff conftest.exp conftest.er2 >/dev/null; then
12424
+ lt_cv_prog_compiler_static_works_CXX=yes
12425
+ fi
12426
+ else
12427
+ lt_cv_prog_compiler_static_works_CXX=yes
12428
+ fi
12429
+ fi
12430
+ $rm -r conftest*
12431
+ LDFLAGS="$save_LDFLAGS"
12432
+
12433
+ fi
12434
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
12435
+ $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
12436
+
12437
+ if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
12438
+ :
12439
+ else
12440
+ lt_prog_compiler_static_CXX=
12441
+ fi
12442
+
12443
+
12444
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12445
+ $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12446
+ if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
12447
+ $as_echo_n "(cached) " >&6
12448
+ else
12449
+ lt_cv_prog_compiler_c_o_CXX=no
12450
+ $rm -r conftest 2>/dev/null
12451
+ mkdir conftest
12452
+ cd conftest
12453
+ mkdir out
12454
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12455
+
12456
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
12457
+ # Insert the option either (1) after the last *FLAGS variable, or
12458
+ # (2) before a word containing "conftest.", or (3) at the end.
12459
+ # Note that $ac_compile itself does not contain backslashes and begins
12460
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
12461
+ lt_compile=`echo "$ac_compile" | $SED \
12462
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12463
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12464
+ -e 's:$: $lt_compiler_flag:'`
12465
+ (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
12466
+ (eval "$lt_compile" 2>out/conftest.err)
12467
+ ac_status=$?
12468
+ cat out/conftest.err >&5
12469
+ echo "configure:__oline__: \$? = $ac_status" >&5
12470
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
12471
+ then
12472
+ # The compiler can only warn and ignore the option if not recognized
12473
+ # So say no if there are warnings
12474
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
12475
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12476
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12477
+ lt_cv_prog_compiler_c_o_CXX=yes
12478
+ fi
12479
+ fi
12480
+ chmod u+w . 2>&5
12481
+ $rm conftest*
12482
+ # SGI C++ compiler will create directory out/ii_files/ for
12483
+ # template instantiation
12484
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
12485
+ $rm out/* && rmdir out
12486
+ cd ..
12487
+ rmdir conftest
12488
+ $rm conftest*
12489
+
12490
+ fi
12491
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
12492
+ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
12493
+
12494
+
12495
+ hard_links="nottested"
12496
+ if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
12497
+ # do not overwrite the value of need_locks provided by the user
12498
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12499
+ $as_echo_n "checking if we can lock with hard links... " >&6; }
12500
+ hard_links=yes
12501
+ $rm conftest*
12502
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
12503
+ touch conftest.a
12504
+ ln conftest.a conftest.b 2>&5 || hard_links=no
12505
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
12506
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12507
+ $as_echo "$hard_links" >&6; }
12508
+ if test "$hard_links" = no; then
12509
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
12510
+ $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
12511
+ need_locks=warn
12512
+ fi
12513
+ else
12514
+ need_locks=no
12515
+ fi
12516
+
12517
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12518
+ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12519
+
12520
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12521
+ case $host_os in
12522
+ aix[4-9]*)
12523
+ # If we're using GNU nm, then we don't want the "-C" option.
12524
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
12525
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
12526
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12527
+ else
12528
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12529
+ fi
12530
+ ;;
12531
+ pw32*)
12532
+ export_symbols_cmds_CXX="$ltdll_cmds"
12533
+ ;;
12534
+ cygwin* | mingw*)
12535
+ export_symbols_cmds_CXX='$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'
12536
+ ;;
12537
+ *)
12538
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12539
+ ;;
12540
+ esac
12541
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12542
+
12543
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
12544
+ $as_echo "$ld_shlibs_CXX" >&6; }
12545
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
12546
+
12547
+ #
12548
+ # Do we need to explicitly link libc?
12549
+ #
12550
+ case "x$archive_cmds_need_lc_CXX" in
12551
+ x|xyes)
12552
+ # Assume -lc should be added
12553
+ archive_cmds_need_lc_CXX=yes
12554
+
12555
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
12556
+ case $archive_cmds_CXX in
12557
+ *'~'*)
12558
+ # FIXME: we may have to deal with multi-command sequences.
12559
+ ;;
12560
+ '$CC '*)
12561
+ # Test whether the compiler implicitly links with -lc since on some
12562
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
12563
+ # to ld, don't add -lc before -lgcc.
12564
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12565
+ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12566
+ $rm conftest*
12567
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12568
+
12569
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12570
+ (eval $ac_compile) 2>&5
12571
+ ac_status=$?
12572
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12573
+ test $ac_status = 0; } 2>conftest.err; then
12574
+ soname=conftest
12575
+ lib=conftest
12576
+ libobjs=conftest.$ac_objext
12577
+ deplibs=
12578
+ wl=$lt_prog_compiler_wl_CXX
12579
+ pic_flag=$lt_prog_compiler_pic_CXX
12580
+ compiler_flags=-v
12581
+ linker_flags=-v
12582
+ verstring=
12583
+ output_objdir=.
12584
+ libname=conftest
12585
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
12586
+ allow_undefined_flag_CXX=
12587
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12588
+ (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
12589
+ ac_status=$?
12590
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12591
+ test $ac_status = 0; }
12592
+ then
12593
+ archive_cmds_need_lc_CXX=no
12594
+ else
12595
+ archive_cmds_need_lc_CXX=yes
12596
+ fi
12597
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
12598
+ else
12599
+ cat conftest.err 1>&5
12600
+ fi
12601
+ $rm conftest*
12602
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
12603
+ $as_echo "$archive_cmds_need_lc_CXX" >&6; }
12604
+ ;;
12605
+ esac
12606
+ fi
12607
+ ;;
12608
+ esac
12609
+
12610
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12611
+ $as_echo_n "checking dynamic linker characteristics... " >&6; }
12612
+ library_names_spec=
12613
+ libname_spec='lib$name'
12614
+ soname_spec=
12615
+ shrext_cmds=".so"
12616
+ postinstall_cmds=
12617
+ postuninstall_cmds=
12618
+ finish_cmds=
12619
+ finish_eval=
12620
+ shlibpath_var=
12621
+ shlibpath_overrides_runpath=unknown
12622
+ version_type=none
12623
+ dynamic_linker="$host_os ld.so"
12624
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
12625
+
12626
+ need_lib_prefix=unknown
12627
+ hardcode_into_libs=no
12628
+
12629
+ # when you set need_version to no, make sure it does not cause -set_version
12630
+ # flags to be left without arguments
12631
+ need_version=unknown
12632
+
12633
+ case $host_os in
12634
+ aix3*)
12635
+ version_type=linux
12636
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12637
+ shlibpath_var=LIBPATH
12638
+
12639
+ # AIX 3 has no versioning support, so we append a major version to the name.
12640
+ soname_spec='${libname}${release}${shared_ext}$major'
12641
+ ;;
12642
+
12643
+ aix[4-9]*)
12644
+ version_type=linux
12645
+ need_lib_prefix=no
12646
+ need_version=no
12647
+ hardcode_into_libs=yes
12648
+ if test "$host_cpu" = ia64; then
12649
+ # AIX 5 supports IA64
12650
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12651
+ shlibpath_var=LD_LIBRARY_PATH
12652
+ else
12653
+ # With GCC up to 2.95.x, collect2 would create an import file
12654
+ # for dependence libraries. The import file would start with
12655
+ # the line `#! .'. This would cause the generated library to
12656
+ # depend on `.', always an invalid library. This was fixed in
12657
+ # development snapshots of GCC prior to 3.0.
12658
+ case $host_os in
12659
+ aix4 | aix4.[01] | aix4.[01].*)
12660
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12661
+ echo ' yes '
12662
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12663
+ :
12664
+ else
12665
+ can_build_shared=no
12666
+ fi
12667
+ ;;
12668
+ esac
12669
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12670
+ # soname into executable. Probably we can add versioning support to
12671
+ # collect2, so additional links can be useful in future.
12672
+ if test "$aix_use_runtimelinking" = yes; then
12673
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12674
+ # instead of lib<name>.a to let people know that these are not
12675
+ # typical AIX shared libraries.
12676
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12677
+ else
12678
+ # We preserve .a as extension for shared libraries through AIX4.2
12679
+ # and later when we are not doing run time linking.
12680
+ library_names_spec='${libname}${release}.a $libname.a'
12681
+ soname_spec='${libname}${release}${shared_ext}$major'
12682
+ fi
12683
+ shlibpath_var=LIBPATH
12684
+ fi
12685
+ ;;
12686
+
12687
+ amigaos*)
12688
+ library_names_spec='$libname.ixlibrary $libname.a'
12689
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
12690
+ 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'
12691
+ ;;
12692
+
12693
+ beos*)
12694
+ library_names_spec='${libname}${shared_ext}'
12695
+ dynamic_linker="$host_os ld.so"
12696
+ shlibpath_var=LIBRARY_PATH
12697
+ ;;
12698
+
12699
+ bsdi[45]*)
12700
+ version_type=linux
12701
+ need_version=no
12702
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12703
+ soname_spec='${libname}${release}${shared_ext}$major'
12704
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12705
+ shlibpath_var=LD_LIBRARY_PATH
12706
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12707
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12708
+ # the default ld.so.conf also contains /usr/contrib/lib and
12709
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12710
+ # libtool to hard-code these into programs
12711
+ ;;
12712
+
12713
+ cygwin* | mingw* | pw32*)
12714
+ version_type=windows
12715
+ shrext_cmds=".dll"
12716
+ need_version=no
12717
+ need_lib_prefix=no
12718
+
12719
+ case $GCC,$host_os in
12720
+ yes,cygwin* | yes,mingw* | yes,pw32*)
12721
+ library_names_spec='$libname.dll.a'
12722
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
12723
+ postinstall_cmds='base_file=`basename \${file}`~
12724
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
12725
+ dldir=$destdir/`dirname \$dlpath`~
12726
+ test -d \$dldir || mkdir -p \$dldir~
12727
+ $install_prog $dir/$dlname \$dldir/$dlname~
12728
+ chmod a+x \$dldir/$dlname'
12729
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12730
+ dlpath=$dir/\$dldll~
12731
+ $rm \$dlpath'
12732
+ shlibpath_overrides_runpath=yes
12733
+
12734
+ case $host_os in
12735
+ cygwin*)
12736
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12737
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12738
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
12739
+ ;;
12740
+ mingw*)
12741
+ # MinGW DLLs use traditional 'lib' prefix
12742
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12743
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12744
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
12745
+ # It is most probably a Windows format PATH printed by
12746
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
12747
+ # path with ; separators, and with drive letters. We can handle the
12748
+ # drive letters (cygwin fileutils understands them), so leave them,
12749
+ # especially as we might pass files found there to a mingw objdump,
12750
+ # which wouldn't understand a cygwinified path. Ahh.
12751
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12752
+ else
12753
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12754
+ fi
12755
+ ;;
12756
+ pw32*)
12757
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
12758
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12759
+ ;;
12760
+ esac
12761
+ ;;
12762
+
12763
+ *)
12764
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12765
+ ;;
12766
+ esac
12767
+ dynamic_linker='Win32 ld.exe'
12768
+ # FIXME: first we should search . and the directory the executable is in
12769
+ shlibpath_var=PATH
12770
+ ;;
12771
+
12772
+ darwin* | rhapsody*)
12773
+ dynamic_linker="$host_os dyld"
12774
+ version_type=darwin
12775
+ need_lib_prefix=no
12776
+ need_version=no
12777
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12778
+ soname_spec='${libname}${release}${major}$shared_ext'
12779
+ shlibpath_overrides_runpath=yes
12780
+ shlibpath_var=DYLD_LIBRARY_PATH
12781
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12782
+
12783
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12784
+ ;;
12785
+
12786
+ dgux*)
12787
+ version_type=linux
12788
+ need_lib_prefix=no
12789
+ need_version=no
12790
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12791
+ soname_spec='${libname}${release}${shared_ext}$major'
12792
+ shlibpath_var=LD_LIBRARY_PATH
12793
+ ;;
12794
+
12795
+ freebsd1*)
12796
+ dynamic_linker=no
12797
+ ;;
12798
+
12799
+ freebsd* | dragonfly*)
12800
+ # DragonFly does not have aout. When/if they implement a new
12801
+ # versioning mechanism, adjust this.
12802
+ if test -x /usr/bin/objformat; then
12803
+ objformat=`/usr/bin/objformat`
12804
+ else
12805
+ case $host_os in
12806
+ freebsd[123]*) objformat=aout ;;
12807
+ *) objformat=elf ;;
12808
+ esac
12809
+ fi
12810
+ version_type=freebsd-$objformat
12811
+ case $version_type in
12812
+ freebsd-elf*)
12813
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12814
+ need_version=no
12815
+ need_lib_prefix=no
12816
+ ;;
12817
+ freebsd-*)
12818
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12819
+ need_version=yes
12820
+ ;;
12821
+ esac
12822
+ shlibpath_var=LD_LIBRARY_PATH
12823
+ case $host_os in
12824
+ freebsd2*)
12825
+ shlibpath_overrides_runpath=yes
12826
+ ;;
12827
+ freebsd3.[01]* | freebsdelf3.[01]*)
12828
+ shlibpath_overrides_runpath=yes
12829
+ hardcode_into_libs=yes
12830
+ ;;
12831
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12832
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12833
+ shlibpath_overrides_runpath=no
12834
+ hardcode_into_libs=yes
12835
+ ;;
12836
+ *) # from 4.6 on, and DragonFly
12837
+ shlibpath_overrides_runpath=yes
12838
+ hardcode_into_libs=yes
12839
+ ;;
12840
+ esac
12841
+ ;;
12842
+
12843
+ gnu*)
12844
+ version_type=linux
12845
+ need_lib_prefix=no
12846
+ need_version=no
12847
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12848
+ soname_spec='${libname}${release}${shared_ext}$major'
12849
+ shlibpath_var=LD_LIBRARY_PATH
12850
+ hardcode_into_libs=yes
12851
+ ;;
12852
+
12853
+ hpux9* | hpux10* | hpux11*)
12854
+ # Give a soname corresponding to the major version so that dld.sl refuses to
12855
+ # link against other versions.
12856
+ version_type=sunos
12857
+ need_lib_prefix=no
12858
+ need_version=no
12859
+ case $host_cpu in
12860
+ ia64*)
12861
+ shrext_cmds='.so'
12862
+ hardcode_into_libs=yes
12863
+ dynamic_linker="$host_os dld.so"
12864
+ shlibpath_var=LD_LIBRARY_PATH
12865
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12866
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12867
+ soname_spec='${libname}${release}${shared_ext}$major'
12868
+ if test "X$HPUX_IA64_MODE" = X32; then
12869
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12870
+ else
12871
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12872
+ fi
12873
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12874
+ ;;
12875
+ hppa*64*)
12876
+ shrext_cmds='.sl'
12877
+ hardcode_into_libs=yes
12878
+ dynamic_linker="$host_os dld.sl"
12879
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12880
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12881
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12882
+ soname_spec='${libname}${release}${shared_ext}$major'
12883
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12884
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12885
+ ;;
12886
+ *)
12887
+ shrext_cmds='.sl'
12888
+ dynamic_linker="$host_os dld.sl"
12889
+ shlibpath_var=SHLIB_PATH
12890
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12891
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12892
+ soname_spec='${libname}${release}${shared_ext}$major'
12893
+ ;;
12894
+ esac
12895
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
12896
+ postinstall_cmds='chmod 555 $lib'
12897
+ ;;
12898
+
12899
+ interix[3-9]*)
12900
+ version_type=linux
12901
+ need_lib_prefix=no
12902
+ need_version=no
12903
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12904
+ soname_spec='${libname}${release}${shared_ext}$major'
12905
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12906
+ shlibpath_var=LD_LIBRARY_PATH
12907
+ shlibpath_overrides_runpath=no
12908
+ hardcode_into_libs=yes
12909
+ ;;
12910
+
12911
+ irix5* | irix6* | nonstopux*)
12912
+ case $host_os in
12913
+ nonstopux*) version_type=nonstopux ;;
12914
+ *)
12915
+ if test "$lt_cv_prog_gnu_ld" = yes; then
12916
+ version_type=linux
12917
+ else
12918
+ version_type=irix
12919
+ fi ;;
12920
+ esac
12921
+ need_lib_prefix=no
12922
+ need_version=no
12923
+ soname_spec='${libname}${release}${shared_ext}$major'
12924
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
12925
+ case $host_os in
12926
+ irix5* | nonstopux*)
12927
+ libsuff= shlibsuff=
12928
+ ;;
12929
+ *)
12930
+ case $LD in # libtool.m4 will add one of these switches to LD
12931
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12932
+ libsuff= shlibsuff= libmagic=32-bit;;
12933
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12934
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
12935
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12936
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
12937
+ *) libsuff= shlibsuff= libmagic=never-match;;
12938
+ esac
12939
+ ;;
12940
+ esac
12941
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12942
+ shlibpath_overrides_runpath=no
12943
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12944
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12945
+ hardcode_into_libs=yes
12946
+ ;;
12947
+
12948
+ # No shared lib support for Linux oldld, aout, or coff.
12949
+ linux*oldld* | linux*aout* | linux*coff*)
12950
+ dynamic_linker=no
12951
+ ;;
12952
+
12953
+ # This must be Linux ELF.
12954
+ linux* | k*bsd*-gnu)
12955
+ version_type=linux
12956
+ need_lib_prefix=no
12957
+ need_version=no
12958
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12959
+ soname_spec='${libname}${release}${shared_ext}$major'
12960
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12961
+ shlibpath_var=LD_LIBRARY_PATH
12962
+ shlibpath_overrides_runpath=no
12963
+ # This implies no fast_install, which is unacceptable.
12964
+ # Some rework will be needed to allow for fast_install
12965
+ # before this can be enabled.
12966
+ hardcode_into_libs=yes
12967
+
12968
+ # Append ld.so.conf contents to the search path
12969
+ if test -f /etc/ld.so.conf; then
12970
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
12971
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12972
+ fi
12973
+
12974
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
12975
+ # powerpc, because MkLinux only supported shared libraries with the
12976
+ # GNU dynamic linker. Since this was broken with cross compilers,
12977
+ # most powerpc-linux boxes support dynamic linking these days and
12978
+ # people can always --disable-shared, the test was removed, and we
12979
+ # assume the GNU/Linux dynamic linker is in use.
12980
+ dynamic_linker='GNU/Linux ld.so'
12981
+ ;;
12982
+
12983
+ netbsd*)
12984
+ version_type=sunos
12985
+ need_lib_prefix=no
12986
+ need_version=no
12987
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12988
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12989
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12990
+ dynamic_linker='NetBSD (a.out) ld.so'
12991
+ else
12992
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12993
+ soname_spec='${libname}${release}${shared_ext}$major'
12994
+ dynamic_linker='NetBSD ld.elf_so'
12995
+ fi
12996
+ shlibpath_var=LD_LIBRARY_PATH
12997
+ shlibpath_overrides_runpath=yes
12998
+ hardcode_into_libs=yes
12999
+ ;;
13000
+
13001
+ newsos6)
13002
+ version_type=linux
13003
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13004
+ shlibpath_var=LD_LIBRARY_PATH
13005
+ shlibpath_overrides_runpath=yes
13006
+ ;;
13007
+
13008
+ nto-qnx*)
13009
+ version_type=linux
13010
+ need_lib_prefix=no
13011
+ need_version=no
13012
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13013
+ soname_spec='${libname}${release}${shared_ext}$major'
13014
+ shlibpath_var=LD_LIBRARY_PATH
13015
+ shlibpath_overrides_runpath=yes
13016
+ ;;
13017
+
13018
+ openbsd*)
13019
+ version_type=sunos
13020
+ sys_lib_dlsearch_path_spec="/usr/lib"
13021
+ need_lib_prefix=no
13022
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
13023
+ case $host_os in
13024
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
13025
+ *) need_version=no ;;
13026
+ esac
13027
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13028
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13029
+ shlibpath_var=LD_LIBRARY_PATH
13030
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
13031
+ case $host_os in
13032
+ openbsd2.[89] | openbsd2.[89].*)
13033
+ shlibpath_overrides_runpath=no
13034
+ ;;
13035
+ *)
13036
+ shlibpath_overrides_runpath=yes
13037
+ ;;
13038
+ esac
13039
+ else
13040
+ shlibpath_overrides_runpath=yes
13041
+ fi
13042
+ ;;
13043
+
13044
+ os2*)
13045
+ libname_spec='$name'
13046
+ shrext_cmds=".dll"
13047
+ need_lib_prefix=no
13048
+ library_names_spec='$libname${shared_ext} $libname.a'
13049
+ dynamic_linker='OS/2 ld.exe'
13050
+ shlibpath_var=LIBPATH
13051
+ ;;
13052
+
13053
+ osf3* | osf4* | osf5*)
13054
+ version_type=osf
13055
+ need_lib_prefix=no
13056
+ need_version=no
13057
+ soname_spec='${libname}${release}${shared_ext}$major'
13058
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13059
+ shlibpath_var=LD_LIBRARY_PATH
13060
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13061
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
13062
+ ;;
13063
+
13064
+ rdos*)
13065
+ dynamic_linker=no
13066
+ ;;
13067
+
13068
+ solaris*)
13069
+ version_type=linux
13070
+ need_lib_prefix=no
13071
+ need_version=no
13072
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13073
+ soname_spec='${libname}${release}${shared_ext}$major'
13074
+ shlibpath_var=LD_LIBRARY_PATH
13075
+ shlibpath_overrides_runpath=yes
13076
+ hardcode_into_libs=yes
13077
+ # ldd complains unless libraries are executable
13078
+ postinstall_cmds='chmod +x $lib'
13079
+ ;;
13080
+
13081
+ sunos4*)
13082
+ version_type=sunos
13083
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13084
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13085
+ shlibpath_var=LD_LIBRARY_PATH
13086
+ shlibpath_overrides_runpath=yes
13087
+ if test "$with_gnu_ld" = yes; then
13088
+ need_lib_prefix=no
13089
+ fi
13090
+ need_version=yes
13091
+ ;;
13092
+
13093
+ sysv4 | sysv4.3*)
13094
+ version_type=linux
13095
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13096
+ soname_spec='${libname}${release}${shared_ext}$major'
13097
+ shlibpath_var=LD_LIBRARY_PATH
13098
+ case $host_vendor in
13099
+ sni)
13100
+ shlibpath_overrides_runpath=no
13101
+ need_lib_prefix=no
13102
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
13103
+ runpath_var=LD_RUN_PATH
13104
+ ;;
13105
+ siemens)
13106
+ need_lib_prefix=no
13107
+ ;;
13108
+ motorola)
13109
+ need_lib_prefix=no
13110
+ need_version=no
13111
+ shlibpath_overrides_runpath=no
13112
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13113
+ ;;
13114
+ esac
13115
+ ;;
13116
+
13117
+ sysv4*MP*)
13118
+ if test -d /usr/nec ;then
13119
+ version_type=linux
13120
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
13121
+ soname_spec='$libname${shared_ext}.$major'
13122
+ shlibpath_var=LD_LIBRARY_PATH
13123
+ fi
13124
+ ;;
13125
+
13126
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13127
+ version_type=freebsd-elf
13128
+ need_lib_prefix=no
13129
+ need_version=no
13130
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13131
+ soname_spec='${libname}${release}${shared_ext}$major'
13132
+ shlibpath_var=LD_LIBRARY_PATH
13133
+ hardcode_into_libs=yes
13134
+ if test "$with_gnu_ld" = yes; then
13135
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13136
+ shlibpath_overrides_runpath=no
13137
+ else
13138
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13139
+ shlibpath_overrides_runpath=yes
13140
+ case $host_os in
13141
+ sco3.2v5*)
13142
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13143
+ ;;
13144
+ esac
13145
+ fi
13146
+ sys_lib_dlsearch_path_spec='/usr/lib'
13147
+ ;;
13148
+
13149
+ uts4*)
13150
+ version_type=linux
13151
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13152
+ soname_spec='${libname}${release}${shared_ext}$major'
13153
+ shlibpath_var=LD_LIBRARY_PATH
13154
+ ;;
13155
+
13156
+ *)
13157
+ dynamic_linker=no
13158
+ ;;
13159
+ esac
13160
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13161
+ $as_echo "$dynamic_linker" >&6; }
13162
+ test "$dynamic_linker" = no && can_build_shared=no
13163
+
13164
+ if ${lt_cv_sys_lib_search_path_spec+:} false; then :
13165
+ $as_echo_n "(cached) " >&6
13166
+ else
13167
+ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
13168
+ fi
13169
+
13170
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
13171
+ if ${lt_cv_sys_lib_dlsearch_path_spec+:} false; then :
13172
+ $as_echo_n "(cached) " >&6
13173
+ else
13174
+ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
13175
+ fi
13176
+
13177
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
13178
+
13179
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13180
+ if test "$GCC" = yes; then
13181
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13182
+ fi
13183
+
13184
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13185
+ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13186
+ hardcode_action_CXX=
13187
+ if test -n "$hardcode_libdir_flag_spec_CXX" || \
13188
+ test -n "$runpath_var_CXX" || \
13189
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
13190
+
13191
+ # We can hardcode non-existant directories.
13192
+ if test "$hardcode_direct_CXX" != no &&
13193
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
13194
+ # have to relink, otherwise we might link with an installed library
13195
+ # when we should be linking with a yet-to-be-installed one
13196
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
13197
+ test "$hardcode_minus_L_CXX" != no; then
13198
+ # Linking always hardcodes the temporary library directory.
13199
+ hardcode_action_CXX=relink
13200
+ else
13201
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
13202
+ hardcode_action_CXX=immediate
13203
+ fi
13204
+ else
13205
+ # We cannot hardcode anything, or else we can only hardcode existing
13206
+ # directories.
13207
+ hardcode_action_CXX=unsupported
13208
+ fi
13209
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
13210
+ $as_echo "$hardcode_action_CXX" >&6; }
13211
+
13212
+ if test "$hardcode_action_CXX" = relink; then
13213
+ # Fast installation is not supported
13214
+ enable_fast_install=no
13215
+ elif test "$shlibpath_overrides_runpath" = yes ||
13216
+ test "$enable_shared" = no; then
13217
+ # Fast installation is not necessary
13218
+ enable_fast_install=needless
13219
+ fi
13220
+
13221
+
13222
+ # The else clause should only fire when bootstrapping the
13223
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
13224
+ # with your package, and you will get complaints that there are
13225
+ # no rules to generate ltmain.sh.
13226
+ if test -f "$ltmain"; then
13227
+ # See if we are running on zsh, and set the options which allow our commands through
13228
+ # without removal of \ escapes.
13229
+ if test -n "${ZSH_VERSION+set}" ; then
13230
+ setopt NO_GLOB_SUBST
13231
+ fi
13232
+ # Now quote all the things that may contain metacharacters while being
13233
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
13234
+ # variables and quote the copies for generation of the libtool script.
13235
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
13236
+ SED SHELL STRIP \
13237
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
13238
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
13239
+ deplibs_check_method reload_flag reload_cmds need_locks \
13240
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
13241
+ lt_cv_sys_global_symbol_to_c_name_address \
13242
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
13243
+ old_postinstall_cmds old_postuninstall_cmds \
13244
+ compiler_CXX \
13245
+ CC_CXX \
13246
+ LD_CXX \
13247
+ lt_prog_compiler_wl_CXX \
13248
+ lt_prog_compiler_pic_CXX \
13249
+ lt_prog_compiler_static_CXX \
13250
+ lt_prog_compiler_no_builtin_flag_CXX \
13251
+ export_dynamic_flag_spec_CXX \
13252
+ thread_safe_flag_spec_CXX \
13253
+ whole_archive_flag_spec_CXX \
13254
+ enable_shared_with_static_runtimes_CXX \
13255
+ old_archive_cmds_CXX \
13256
+ old_archive_from_new_cmds_CXX \
13257
+ predep_objects_CXX \
13258
+ postdep_objects_CXX \
13259
+ predeps_CXX \
13260
+ postdeps_CXX \
13261
+ compiler_lib_search_path_CXX \
13262
+ compiler_lib_search_dirs_CXX \
13263
+ archive_cmds_CXX \
13264
+ archive_expsym_cmds_CXX \
13265
+ postinstall_cmds_CXX \
13266
+ postuninstall_cmds_CXX \
13267
+ old_archive_from_expsyms_cmds_CXX \
13268
+ allow_undefined_flag_CXX \
13269
+ no_undefined_flag_CXX \
13270
+ export_symbols_cmds_CXX \
13271
+ hardcode_libdir_flag_spec_CXX \
13272
+ hardcode_libdir_flag_spec_ld_CXX \
13273
+ hardcode_libdir_separator_CXX \
13274
+ hardcode_automatic_CXX \
13275
+ module_cmds_CXX \
13276
+ module_expsym_cmds_CXX \
13277
+ lt_cv_prog_compiler_c_o_CXX \
13278
+ fix_srcfile_path_CXX \
13279
+ exclude_expsyms_CXX \
13280
+ include_expsyms_CXX; do
13281
+
13282
+ case $var in
13283
+ old_archive_cmds_CXX | \
13284
+ old_archive_from_new_cmds_CXX | \
13285
+ archive_cmds_CXX | \
13286
+ archive_expsym_cmds_CXX | \
13287
+ module_cmds_CXX | \
13288
+ module_expsym_cmds_CXX | \
13289
+ old_archive_from_expsyms_cmds_CXX | \
13290
+ export_symbols_cmds_CXX | \
13291
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
13292
+ postinstall_cmds | postuninstall_cmds | \
13293
+ old_postinstall_cmds | old_postuninstall_cmds | \
13294
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
13295
+ # Double-quote double-evaled strings.
13296
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
13297
+ ;;
13298
+ *)
13299
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
13300
+ ;;
13301
+ esac
13302
+ done
13303
+
13304
+ case $lt_echo in
13305
+ *'\$0 --fallback-echo"')
13306
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
13307
+ ;;
13308
+ esac
13309
+
13310
+ cfgfile="$ofile"
13311
+
13312
+ cat <<__EOF__ >> "$cfgfile"
13313
+ # ### BEGIN LIBTOOL TAG CONFIG: $tagname
13314
+
13315
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13316
+
13317
+ # Shell to use when invoking shell scripts.
13318
+ SHELL=$lt_SHELL
13319
+
13320
+ # Whether or not to build shared libraries.
13321
+ build_libtool_libs=$enable_shared
13322
+
13323
+ # Whether or not to build static libraries.
13324
+ build_old_libs=$enable_static
13325
+
13326
+ # Whether or not to add -lc for building shared libraries.
13327
+ build_libtool_need_lc=$archive_cmds_need_lc_CXX
13328
+
13329
+ # Whether or not to disallow shared libs when runtime libs are static
13330
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
13331
+
13332
+ # Whether or not to optimize for fast installation.
13333
+ fast_install=$enable_fast_install
13334
+
13335
+ # The host system.
13336
+ host_alias=$host_alias
13337
+ host=$host
13338
+ host_os=$host_os
13339
+
13340
+ # The build system.
13341
+ build_alias=$build_alias
13342
+ build=$build
13343
+ build_os=$build_os
13344
+
13345
+ # An echo program that does not interpret backslashes.
13346
+ echo=$lt_echo
13347
+
13348
+ # The archiver.
13349
+ AR=$lt_AR
13350
+ AR_FLAGS=$lt_AR_FLAGS
13351
+
13352
+ # A C compiler.
13353
+ LTCC=$lt_LTCC
13354
+
13355
+ # LTCC compiler flags.
13356
+ LTCFLAGS=$lt_LTCFLAGS
13357
+
13358
+ # A language-specific compiler.
13359
+ CC=$lt_compiler_CXX
13360
+
13361
+ # Is the compiler the GNU C compiler?
13362
+ with_gcc=$GCC_CXX
13363
+
13364
+ # An ERE matcher.
13365
+ EGREP=$lt_EGREP
13366
+
13367
+ # The linker used to build libraries.
13368
+ LD=$lt_LD_CXX
13369
+
13370
+ # Whether we need hard or soft links.
13371
+ LN_S=$lt_LN_S
13372
+
13373
+ # A BSD-compatible nm program.
13374
+ NM=$lt_NM
13375
+
13376
+ # A symbol stripping program
13377
+ STRIP=$lt_STRIP
13378
+
13379
+ # Used to examine libraries when file_magic_cmd begins "file"
13380
+ MAGIC_CMD=$MAGIC_CMD
13381
+
13382
+ # Used on cygwin: DLL creation program.
13383
+ DLLTOOL="$DLLTOOL"
13384
+
13385
+ # Used on cygwin: object dumper.
13386
+ OBJDUMP="$OBJDUMP"
13387
+
13388
+ # Used on cygwin: assembler.
13389
+ AS="$AS"
13390
+
13391
+ # The name of the directory that contains temporary libtool files.
13392
+ objdir=$objdir
13393
+
13394
+ # How to create reloadable object files.
13395
+ reload_flag=$lt_reload_flag
13396
+ reload_cmds=$lt_reload_cmds
13397
+
13398
+ # How to pass a linker flag through the compiler.
13399
+ wl=$lt_lt_prog_compiler_wl_CXX
13400
+
13401
+ # Object file suffix (normally "o").
13402
+ objext="$ac_objext"
13403
+
13404
+ # Old archive suffix (normally "a").
13405
+ libext="$libext"
13406
+
13407
+ # Shared library suffix (normally ".so").
13408
+ shrext_cmds='$shrext_cmds'
13409
+
13410
+ # Executable file suffix (normally "").
13411
+ exeext="$exeext"
13412
+
13413
+ # Additional compiler flags for building library objects.
13414
+ pic_flag=$lt_lt_prog_compiler_pic_CXX
13415
+ pic_mode=$pic_mode
13416
+
13417
+ # What is the maximum length of a command?
13418
+ max_cmd_len=$lt_cv_sys_max_cmd_len
13419
+
13420
+ # Does compiler simultaneously support -c and -o options?
13421
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
13422
+
13423
+ # Must we lock files when doing compilation?
13424
+ need_locks=$lt_need_locks
13425
+
13426
+ # Do we need the lib prefix for modules?
13427
+ need_lib_prefix=$need_lib_prefix
13428
+
13429
+ # Do we need a version for libraries?
13430
+ need_version=$need_version
13431
+
13432
+ # Whether dlopen is supported.
13433
+ dlopen_support=$enable_dlopen
13434
+
13435
+ # Whether dlopen of programs is supported.
13436
+ dlopen_self=$enable_dlopen_self
13437
+
13438
+ # Whether dlopen of statically linked programs is supported.
13439
+ dlopen_self_static=$enable_dlopen_self_static
13440
+
13441
+ # Compiler flag to prevent dynamic linking.
13442
+ link_static_flag=$lt_lt_prog_compiler_static_CXX
13443
+
13444
+ # Compiler flag to turn off builtin functions.
13445
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
13446
+
13447
+ # Compiler flag to allow reflexive dlopens.
13448
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
13449
+
13450
+ # Compiler flag to generate shared objects directly from archives.
13451
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
13452
+
13453
+ # Compiler flag to generate thread-safe objects.
13454
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
13455
+
13456
+ # Library versioning type.
13457
+ version_type=$version_type
13458
+
13459
+ # Format of library name prefix.
13460
+ libname_spec=$lt_libname_spec
13461
+
13462
+ # List of archive names. First name is the real one, the rest are links.
13463
+ # The last name is the one that the linker finds with -lNAME.
13464
+ library_names_spec=$lt_library_names_spec
13465
+
13466
+ # The coded name of the library, if different from the real name.
13467
+ soname_spec=$lt_soname_spec
13468
+
13469
+ # Commands used to build and install an old-style archive.
13470
+ RANLIB=$lt_RANLIB
13471
+ old_archive_cmds=$lt_old_archive_cmds_CXX
13472
+ old_postinstall_cmds=$lt_old_postinstall_cmds
13473
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
13474
+
13475
+ # Create an old-style archive from a shared archive.
13476
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
13477
+
13478
+ # Create a temporary old-style archive to link instead of a shared archive.
13479
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
13480
+
13481
+ # Commands used to build and install a shared archive.
13482
+ archive_cmds=$lt_archive_cmds_CXX
13483
+ archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
13484
+ postinstall_cmds=$lt_postinstall_cmds
13485
+ postuninstall_cmds=$lt_postuninstall_cmds
13486
+
13487
+ # Commands used to build a loadable module (assumed same as above if empty)
13488
+ module_cmds=$lt_module_cmds_CXX
13489
+ module_expsym_cmds=$lt_module_expsym_cmds_CXX
13490
+
13491
+ # Commands to strip libraries.
13492
+ old_striplib=$lt_old_striplib
13493
+ striplib=$lt_striplib
13494
+
13495
+ # Dependencies to place before the objects being linked to create a
13496
+ # shared library.
13497
+ predep_objects=$lt_predep_objects_CXX
13498
+
13499
+ # Dependencies to place after the objects being linked to create a
13500
+ # shared library.
13501
+ postdep_objects=$lt_postdep_objects_CXX
13502
+
13503
+ # Dependencies to place before the objects being linked to create a
13504
+ # shared library.
13505
+ predeps=$lt_predeps_CXX
13506
+
13507
+ # Dependencies to place after the objects being linked to create a
13508
+ # shared library.
13509
+ postdeps=$lt_postdeps_CXX
13510
+
13511
+ # The directories searched by this compiler when creating a shared
13512
+ # library
13513
+ compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
13514
+
13515
+ # The library search path used internally by the compiler when linking
13516
+ # a shared library.
13517
+ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
13518
+
13519
+ # Method to check whether dependent libraries are shared objects.
13520
+ deplibs_check_method=$lt_deplibs_check_method
13521
+
13522
+ # Command to use when deplibs_check_method == file_magic.
13523
+ file_magic_cmd=$lt_file_magic_cmd
13524
+
13525
+ # Flag that allows shared libraries with undefined symbols to be built.
13526
+ allow_undefined_flag=$lt_allow_undefined_flag_CXX
13527
+
13528
+ # Flag that forces no undefined symbols.
13529
+ no_undefined_flag=$lt_no_undefined_flag_CXX
13530
+
13531
+ # Commands used to finish a libtool library installation in a directory.
13532
+ finish_cmds=$lt_finish_cmds
13533
+
13534
+ # Same as above, but a single script fragment to be evaled but not shown.
13535
+ finish_eval=$lt_finish_eval
13536
+
13537
+ # Take the output of nm and produce a listing of raw symbols and C names.
13538
+ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13539
+
13540
+ # Transform the output of nm in a proper C declaration
13541
+ global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13542
+
13543
+ # Transform the output of nm in a C name address pair
13544
+ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13545
+
13546
+ # This is the shared library runtime path variable.
13547
+ runpath_var=$runpath_var
13548
+
13549
+ # This is the shared library path variable.
13550
+ shlibpath_var=$shlibpath_var
13551
+
13552
+ # Is shlibpath searched before the hard-coded library search path?
13553
+ shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13554
+
13555
+ # How to hardcode a shared library path into an executable.
13556
+ hardcode_action=$hardcode_action_CXX
13557
+
13558
+ # Whether we should hardcode library paths into libraries.
13559
+ hardcode_into_libs=$hardcode_into_libs
13560
+
13561
+ # Flag to hardcode \$libdir into a binary during linking.
13562
+ # This must work even if \$libdir does not exist.
13563
+ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
13564
+
13565
+ # If ld is used when linking, flag to hardcode \$libdir into
13566
+ # a binary during linking. This must work even if \$libdir does
13567
+ # not exist.
13568
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
13569
+
13570
+ # Whether we need a single -rpath flag with a separated argument.
13571
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
13572
+
13573
+ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
13574
+ # resulting binary.
13575
+ hardcode_direct=$hardcode_direct_CXX
13576
+
13577
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
13578
+ # resulting binary.
13579
+ hardcode_minus_L=$hardcode_minus_L_CXX
13580
+
13581
+ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
13582
+ # the resulting binary.
13583
+ hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
13584
+
13585
+ # Set to yes if building a shared library automatically hardcodes DIR into the library
13586
+ # and all subsequent libraries and executables linked against it.
13587
+ hardcode_automatic=$hardcode_automatic_CXX
13588
+
13589
+ # Variables whose values should be saved in libtool wrapper scripts and
13590
+ # restored at relink time.
13591
+ variables_saved_for_relink="$variables_saved_for_relink"
13592
+
13593
+ # Whether libtool must link a program against all its dependency libraries.
13594
+ link_all_deplibs=$link_all_deplibs_CXX
13595
+
13596
+ # Compile-time system search path for libraries
13597
+ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
13598
+
13599
+ # Run-time system search path for libraries
13600
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
13601
+
13602
+ # Fix the shell variable \$srcfile for the compiler.
13603
+ fix_srcfile_path=$lt_fix_srcfile_path
13604
+
13605
+ # Set to yes if exported symbols are required.
13606
+ always_export_symbols=$always_export_symbols_CXX
13607
+
13608
+ # The commands to list exported symbols.
13609
+ export_symbols_cmds=$lt_export_symbols_cmds_CXX
13610
+
13611
+ # The commands to extract the exported symbol list from a shared archive.
13612
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
13613
+
13614
+ # Symbols that should not be listed in the preloaded symbols.
13615
+ exclude_expsyms=$lt_exclude_expsyms_CXX
13616
+
13617
+ # Symbols that must always be exported.
13618
+ include_expsyms=$lt_include_expsyms_CXX
13619
+
13620
+ # ### END LIBTOOL TAG CONFIG: $tagname
13621
+
13622
+ __EOF__
13623
+
13624
+
13625
+ else
13626
+ # If there is no Makefile yet, we rely on a make rule to execute
13627
+ # `config.status --recheck' to rerun these tests and create the
13628
+ # libtool script then.
13629
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
13630
+ if test -f "$ltmain_in"; then
13631
+ test -f Makefile && make "$ltmain"
13632
+ fi
13633
+ fi
13634
+
13635
+
13636
+ ac_ext=c
13637
+ ac_cpp='$CPP $CPPFLAGS'
13638
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13639
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13640
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
13641
+
13642
+ CC=$lt_save_CC
13643
+ LDCXX=$LD
13644
+ LD=$lt_save_LD
13645
+ GCC=$lt_save_GCC
13646
+ with_gnu_ldcxx=$with_gnu_ld
13647
+ with_gnu_ld=$lt_save_with_gnu_ld
13648
+ lt_cv_path_LDCXX=$lt_cv_path_LD
13649
+ lt_cv_path_LD=$lt_save_path_LD
13650
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
13651
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
13652
+
13653
+ else
13654
+ tagname=""
13655
+ fi
13656
+ ;;
13657
+
13658
+ *)
13659
+ as_fn_error $? "Unsupported tag name: $tagname" "$LINENO" 5
13660
+ ;;
13661
+ esac
13662
+
13663
+ # Append the new tag name to the list of available tags.
13664
+ if test -n "$tagname" ; then
13665
+ available_tags="$available_tags $tagname"
13666
+ fi
13667
+ fi
13668
+ done
13669
+ IFS="$lt_save_ifs"
13670
+
13671
+ # Now substitute the updated list of available tags.
13672
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
13673
+ mv "${ofile}T" "$ofile"
13674
+ chmod +x "$ofile"
13675
+ else
13676
+ rm -f "${ofile}T"
13677
+ as_fn_error $? "unable to update list of available tagged configurations." "$LINENO" 5
13678
+ fi
13679
+ fi
13680
+
13681
+
13682
+
13683
+ # This can be used to rebuild libtool when needed
13684
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
13685
+
13686
+ # Always use our own libtool.
13687
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
13688
+
13689
+ # Prevent multiple expansion
13690
+
13691
+
13692
+
13693
+
13694
+
13695
+
13696
+
13697
+
13698
+
13699
+
13700
+
13701
+ all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
13702
+ install_targets="install-modules install-headers"
13703
+ phplibdir="`pwd`/modules"
13704
+ CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
13705
+ CFLAGS_CLEAN='$(CFLAGS)'
13706
+ CXXFLAGS_CLEAN='$(CXXFLAGS)'
13707
+
13708
+ test "$prefix" = "NONE" && prefix="/usr/local"
13709
+ test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
13710
+
13711
+
13712
+ PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_MODULES"
13713
+
13714
+
13715
+ PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_ZEND_EX"
13716
+
13717
+
13718
+
13719
+ PHP_VAR_SUBST="$PHP_VAR_SUBST all_targets"
13720
+
13721
+
13722
+ PHP_VAR_SUBST="$PHP_VAR_SUBST install_targets"
13723
+
13724
+
13725
+
13726
+ PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
13727
+
13728
+
13729
+ PHP_VAR_SUBST="$PHP_VAR_SUBST exec_prefix"
13730
+
13731
+
13732
+ PHP_VAR_SUBST="$PHP_VAR_SUBST libdir"
13733
+
13734
+
13735
+ PHP_VAR_SUBST="$PHP_VAR_SUBST prefix"
13736
+
13737
+
13738
+ PHP_VAR_SUBST="$PHP_VAR_SUBST phplibdir"
13739
+
13740
+
13741
+ PHP_VAR_SUBST="$PHP_VAR_SUBST phpincludedir"
13742
+
13743
+
13744
+
13745
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CC"
13746
+
13747
+
13748
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS"
13749
+
13750
+
13751
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CFLAGS_CLEAN"
13752
+
13753
+
13754
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CPP"
13755
+
13756
+
13757
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CPPFLAGS"
13758
+
13759
+
13760
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CXX"
13761
+
13762
+
13763
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CXXFLAGS"
13764
+
13765
+
13766
+ PHP_VAR_SUBST="$PHP_VAR_SUBST CXXFLAGS_CLEAN"
13767
+
13768
+
13769
+ PHP_VAR_SUBST="$PHP_VAR_SUBST EXTENSION_DIR"
13770
+
13771
+
13772
+ PHP_VAR_SUBST="$PHP_VAR_SUBST PHP_EXECUTABLE"
13773
+
13774
+
13775
+ PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LDFLAGS"
13776
+
13777
+
13778
+ PHP_VAR_SUBST="$PHP_VAR_SUBST EXTRA_LIBS"
13779
+
13780
+
13781
+ PHP_VAR_SUBST="$PHP_VAR_SUBST INCLUDES"
13782
+
13783
+
13784
+ PHP_VAR_SUBST="$PHP_VAR_SUBST LFLAGS"
13785
+
13786
+
13787
+ PHP_VAR_SUBST="$PHP_VAR_SUBST LDFLAGS"
13788
+
13789
+
13790
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SHARED_LIBTOOL"
13791
+
13792
+
13793
+ PHP_VAR_SUBST="$PHP_VAR_SUBST LIBTOOL"
13794
+
13795
+
13796
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SHELL"
13797
+
13798
+
13799
+ PHP_VAR_SUBST="$PHP_VAR_SUBST INSTALL_HEADERS"
13800
+
13801
+
13802
+
13803
+ $php_shtool mkdir -p $BUILD_DIR
13804
+
13805
+
13806
+ cat >Makefile <<EOF
13807
+ srcdir = $abs_srcdir
13808
+ builddir = $abs_builddir
13809
+ top_srcdir = $abs_srcdir
13810
+ top_builddir = $abs_builddir
13811
+ EOF
13812
+ for i in $PHP_VAR_SUBST; do
13813
+ eval echo "$i = \$$i" >> Makefile
13814
+ done
13815
+
13816
+ cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
13817
+
13818
+
13819
+ test -d modules || $php_shtool mkdir modules
13820
+ touch .deps
13821
+
13822
+ ac_config_headers="$ac_config_headers config.h"
13823
+
13824
+
13825
+ cat >confcache <<\_ACEOF
13826
+ # This file is a shell script that caches the results of configure
13827
+ # tests run on this system so they can be shared between configure
13828
+ # scripts and configure runs, see configure's option --config-cache.
13829
+ # It is not useful on other systems. If it contains results you don't
13830
+ # want to keep, you may remove or edit it.
13831
+ #
13832
+ # config.status only pays attention to the cache file if you give it
13833
+ # the --recheck option to rerun configure.
13834
+ #
13835
+ # `ac_cv_env_foo' variables (set or unset) will be overridden when
13836
+ # loading this file, other *unset* `ac_cv_foo' will be assigned the
13837
+ # following values.
13838
+
13839
+ _ACEOF
13840
+
13841
+ # The following way of writing the cache mishandles newlines in values,
13842
+ # but we know of no workaround that is simple, portable, and efficient.
13843
+ # So, we kill variables containing newlines.
13844
+ # Ultrix sh set writes to stderr and can't be redirected directly,
13845
+ # and sets the high bit in the cache file unless we assign to the vars.
13846
+ (
13847
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13848
+ eval ac_val=\$$ac_var
13849
+ case $ac_val in #(
13850
+ *${as_nl}*)
13851
+ case $ac_var in #(
13852
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13853
+ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13854
+ esac
13855
+ case $ac_var in #(
13856
+ _ | IFS | as_nl) ;; #(
13857
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13858
+ *) { eval $ac_var=; unset $ac_var;} ;;
13859
+ esac ;;
13860
+ esac
13861
+ done
13862
+
13863
+ (set) 2>&1 |
13864
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
13865
+ *${as_nl}ac_space=\ *)
13866
+ # `set' does not quote correctly, so add quotes: double-quote
13867
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
13868
+ sed -n \
13869
+ "s/'/'\\\\''/g;
13870
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13871
+ ;; #(
13872
+ *)
13873
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
13874
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13875
+ ;;
13876
+ esac |
13877
+ sort
13878
+ ) |
13879
+ sed '
13880
+ /^ac_cv_env_/b end
13881
+ t clear
13882
+ :clear
13883
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13884
+ t end
13885
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13886
+ :end' >>confcache
13887
+ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13888
+ if test -w "$cache_file"; then
13889
+ if test "x$cache_file" != "x/dev/null"; then
13890
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13891
+ $as_echo "$as_me: updating cache $cache_file" >&6;}
13892
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
13893
+ cat confcache >"$cache_file"
13894
+ else
13895
+ case $cache_file in #(
13896
+ */* | ?:*)
13897
+ mv -f confcache "$cache_file"$$ &&
13898
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
13899
+ *)
13900
+ mv -f confcache "$cache_file" ;;
13901
+ esac
13902
+ fi
13903
+ fi
13904
+ else
13905
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13906
+ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
13907
+ fi
13908
+ fi
13909
+ rm -f confcache
13910
+
13911
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
13912
+ # Let make expand exec_prefix.
13913
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13914
+
13915
+ DEFS=-DHAVE_CONFIG_H
13916
+
13917
+ ac_libobjs=
13918
+ ac_ltlibobjs=
13919
+ U=
13920
+ for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
13921
+ # 1. Remove the extension, and $U if already installed.
13922
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13923
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13924
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13925
+ # will be set to the directory where LIBOBJS objects are built.
13926
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13927
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
13928
+ done
13929
+ LIB@&t@OBJS=$ac_libobjs
13930
+
13931
+ LTLIBOBJS=$ac_ltlibobjs
13932
+
13933
+
13934
+
13935
+ : "${CONFIG_STATUS=./config.status}"
13936
+ ac_write_fail=0
13937
+ ac_clean_files_save=$ac_clean_files
13938
+ ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13939
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13940
+ $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13941
+ as_write_fail=0
13942
+ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
13943
+ #! $SHELL
13944
+ # Generated by $as_me.
13945
+ # Run this file to recreate the current configuration.
13946
+ # Compiler output produced by configure, useful for debugging
13947
+ # configure, is in config.log if it exists.
13948
+
13949
+ debug=false
13950
+ ac_cs_recheck=false
13951
+ ac_cs_silent=false
13952
+
13953
+ SHELL=\${CONFIG_SHELL-$SHELL}
13954
+ export SHELL
13955
+ _ASEOF
13956
+ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13957
+ ## -------------------- ##
13958
+ ## M4sh Initialization. ##
13959
+ ## -------------------- ##
13960
+
13961
+ # Be more Bourne compatible
13962
+ DUALCASE=1; export DUALCASE # for MKS sh
13963
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
13964
+ emulate sh
13965
+ NULLCMD=:
13966
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
13967
+ # is contrary to our usage. Disable this feature.
13968
+ alias -g '${1+"$@"}'='"$@"'
13969
+ setopt NO_GLOB_SUBST
13970
+ else
13971
+ case `(set -o) 2>/dev/null` in @%:@(
13972
+ *posix*) :
13973
+ set -o posix ;; @%:@(
13974
+ *) :
13975
+ ;;
13976
+ esac
13977
+ fi
13978
+
13979
+
13980
+ as_nl='
13981
+ '
13982
+ export as_nl
13983
+ # Printing a long string crashes Solaris 7 /usr/bin/printf.
13984
+ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13985
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13986
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13987
+ # Prefer a ksh shell builtin over an external printf program on Solaris,
13988
+ # but without wasting forks for bash or zsh.
13989
+ if test -z "$BASH_VERSION$ZSH_VERSION" \
13990
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13991
+ as_echo='print -r --'
13992
+ as_echo_n='print -rn --'
13993
+ elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13994
+ as_echo='printf %s\n'
13995
+ as_echo_n='printf %s'
13996
+ else
13997
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13998
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13999
+ as_echo_n='/usr/ucb/echo -n'
14000
+ else
14001
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14002
+ as_echo_n_body='eval
14003
+ arg=$1;
14004
+ case $arg in @%:@(
14005
+ *"$as_nl"*)
14006
+ expr "X$arg" : "X\\(.*\\)$as_nl";
14007
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14008
+ esac;
14009
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14010
+ '
14011
+ export as_echo_n_body
14012
+ as_echo_n='sh -c $as_echo_n_body as_echo'
14013
+ fi
14014
+ export as_echo_body
14015
+ as_echo='sh -c $as_echo_body as_echo'
14016
+ fi
14017
+
14018
+ # The user is always right.
14019
+ if test "${PATH_SEPARATOR+set}" != set; then
14020
+ PATH_SEPARATOR=:
14021
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14022
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14023
+ PATH_SEPARATOR=';'
14024
+ }
14025
+ fi
14026
+
14027
+
14028
+ # IFS
14029
+ # We need space, tab and new line, in precisely that order. Quoting is
14030
+ # there to prevent editors from complaining about space-tab.
14031
+ # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14032
+ # splitting by setting IFS to empty value.)
14033
+ IFS=" "" $as_nl"
14034
+
14035
+ # Find who we are. Look in the path if we contain no directory separator.
14036
+ as_myself=
14037
+ case $0 in @%:@((
14038
+ *[\\/]* ) as_myself=$0 ;;
14039
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14040
+ for as_dir in $PATH
14041
+ do
14042
+ IFS=$as_save_IFS
14043
+ test -z "$as_dir" && as_dir=.
14044
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14045
+ done
14046
+ IFS=$as_save_IFS
14047
+
14048
+ ;;
14049
+ esac
14050
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
14051
+ # in which case we are not to be found in the path.
14052
+ if test "x$as_myself" = x; then
14053
+ as_myself=$0
14054
+ fi
14055
+ if test ! -f "$as_myself"; then
14056
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14057
+ exit 1
14058
+ fi
14059
+
14060
+ # Unset variables that we do not need and which cause bugs (e.g. in
14061
+ # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14062
+ # suppresses any "Segmentation fault" message there. '((' could
14063
+ # trigger a bug in pdksh 5.2.14.
14064
+ for as_var in BASH_ENV ENV MAIL MAILPATH
14065
+ do eval test x\${$as_var+set} = xset \
14066
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14067
+ done
14068
+ PS1='$ '
14069
+ PS2='> '
14070
+ PS4='+ '
14071
+
14072
+ # NLS nuisances.
14073
+ LC_ALL=C
14074
+ export LC_ALL
14075
+ LANGUAGE=C
14076
+ export LANGUAGE
14077
+
14078
+ # CDPATH.
14079
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14080
+
14081
+
14082
+ @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
14083
+ @%:@ ----------------------------------------
14084
+ @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14085
+ @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14086
+ @%:@ script with STATUS, using 1 if that was 0.
14087
+ as_fn_error ()
14088
+ {
14089
+ as_status=$1; test $as_status -eq 0 && as_status=1
14090
+ if test "$4"; then
14091
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14092
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14093
+ fi
14094
+ $as_echo "$as_me: error: $2" >&2
14095
+ as_fn_exit $as_status
14096
+ } @%:@ as_fn_error
14097
+
14098
+
14099
+ @%:@ as_fn_set_status STATUS
14100
+ @%:@ -----------------------
14101
+ @%:@ Set @S|@? to STATUS, without forking.
14102
+ as_fn_set_status ()
14103
+ {
14104
+ return $1
14105
+ } @%:@ as_fn_set_status
14106
+
14107
+ @%:@ as_fn_exit STATUS
14108
+ @%:@ -----------------
14109
+ @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14110
+ as_fn_exit ()
14111
+ {
14112
+ set +e
14113
+ as_fn_set_status $1
14114
+ exit $1
14115
+ } @%:@ as_fn_exit
14116
+
14117
+ @%:@ as_fn_unset VAR
14118
+ @%:@ ---------------
14119
+ @%:@ Portably unset VAR.
14120
+ as_fn_unset ()
14121
+ {
14122
+ { eval $1=; unset $1;}
14123
+ }
14124
+ as_unset=as_fn_unset
14125
+ @%:@ as_fn_append VAR VALUE
14126
+ @%:@ ----------------------
14127
+ @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
14128
+ @%:@ advantage of any shell optimizations that allow amortized linear growth over
14129
+ @%:@ repeated appends, instead of the typical quadratic growth present in naive
14130
+ @%:@ implementations.
14131
+ if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14132
+ eval 'as_fn_append ()
14133
+ {
14134
+ eval $1+=\$2
14135
+ }'
14136
+ else
14137
+ as_fn_append ()
14138
+ {
14139
+ eval $1=\$$1\$2
14140
+ }
14141
+ fi # as_fn_append
14142
+
14143
+ @%:@ as_fn_arith ARG...
14144
+ @%:@ ------------------
14145
+ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
14146
+ @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
14147
+ @%:@ must be portable across @S|@(()) and expr.
14148
+ if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14149
+ eval 'as_fn_arith ()
14150
+ {
14151
+ as_val=$(( $* ))
14152
+ }'
14153
+ else
14154
+ as_fn_arith ()
14155
+ {
14156
+ as_val=`expr "$@" || test $? -eq 1`
14157
+ }
14158
+ fi # as_fn_arith
14159
+
14160
+
14161
+ if expr a : '\(a\)' >/dev/null 2>&1 &&
14162
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
14163
+ as_expr=expr
14164
+ else
14165
+ as_expr=false
14166
+ fi
14167
+
14168
+ if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14169
+ as_basename=basename
14170
+ else
14171
+ as_basename=false
14172
+ fi
14173
+
14174
+ if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14175
+ as_dirname=dirname
14176
+ else
14177
+ as_dirname=false
14178
+ fi
14179
+
14180
+ as_me=`$as_basename -- "$0" ||
14181
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14182
+ X"$0" : 'X\(//\)$' \| \
14183
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14184
+ $as_echo X/"$0" |
14185
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
14186
+ s//\1/
14187
+ q
14188
+ }
14189
+ /^X\/\(\/\/\)$/{
14190
+ s//\1/
14191
+ q
14192
+ }
14193
+ /^X\/\(\/\).*/{
14194
+ s//\1/
14195
+ q
14196
+ }
14197
+ s/.*/./; q'`
14198
+
14199
+ # Avoid depending upon Character Ranges.
14200
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14201
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14202
+ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14203
+ as_cr_digits='0123456789'
14204
+ as_cr_alnum=$as_cr_Letters$as_cr_digits
14205
+
14206
+ ECHO_C= ECHO_N= ECHO_T=
14207
+ case `echo -n x` in @%:@(((((
14208
+ -n*)
14209
+ case `echo 'xy\c'` in
14210
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14211
+ xy) ECHO_C='\c';;
14212
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14213
+ ECHO_T=' ';;
14214
+ esac;;
14215
+ *)
14216
+ ECHO_N='-n';;
14217
+ esac
14218
+
14219
+ rm -f conf$$ conf$$.exe conf$$.file
14220
+ if test -d conf$$.dir; then
14221
+ rm -f conf$$.dir/conf$$.file
14222
+ else
14223
+ rm -f conf$$.dir
14224
+ mkdir conf$$.dir 2>/dev/null
14225
+ fi
14226
+ if (echo >conf$$.file) 2>/dev/null; then
14227
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
14228
+ as_ln_s='ln -s'
14229
+ # ... but there are two gotchas:
14230
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14231
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14232
+ # In both cases, we have to default to `cp -p'.
14233
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14234
+ as_ln_s='cp -p'
14235
+ elif ln conf$$.file conf$$ 2>/dev/null; then
14236
+ as_ln_s=ln
14237
+ else
14238
+ as_ln_s='cp -p'
14239
+ fi
14240
+ else
14241
+ as_ln_s='cp -p'
14242
+ fi
14243
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14244
+ rmdir conf$$.dir 2>/dev/null
14245
+
14246
+
14247
+ @%:@ as_fn_mkdir_p
14248
+ @%:@ -------------
14249
+ @%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
14250
+ as_fn_mkdir_p ()
14251
+ {
14252
+
14253
+ case $as_dir in #(
14254
+ -*) as_dir=./$as_dir;;
14255
+ esac
14256
+ test -d "$as_dir" || eval $as_mkdir_p || {
14257
+ as_dirs=
14258
+ while :; do
14259
+ case $as_dir in #(
14260
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14261
+ *) as_qdir=$as_dir;;
14262
+ esac
14263
+ as_dirs="'$as_qdir' $as_dirs"
14264
+ as_dir=`$as_dirname -- "$as_dir" ||
14265
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14266
+ X"$as_dir" : 'X\(//\)[^/]' \| \
14267
+ X"$as_dir" : 'X\(//\)$' \| \
14268
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14269
+ $as_echo X"$as_dir" |
14270
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14271
+ s//\1/
14272
+ q
14273
+ }
14274
+ /^X\(\/\/\)[^/].*/{
14275
+ s//\1/
14276
+ q
14277
+ }
14278
+ /^X\(\/\/\)$/{
14279
+ s//\1/
14280
+ q
14281
+ }
14282
+ /^X\(\/\).*/{
14283
+ s//\1/
14284
+ q
14285
+ }
14286
+ s/.*/./; q'`
14287
+ test -d "$as_dir" && break
14288
+ done
14289
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
14290
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14291
+
14292
+
14293
+ } @%:@ as_fn_mkdir_p
14294
+ if mkdir -p . 2>/dev/null; then
14295
+ as_mkdir_p='mkdir -p "$as_dir"'
14296
+ else
14297
+ test -d ./-p && rmdir ./-p
14298
+ as_mkdir_p=false
14299
+ fi
14300
+
14301
+ if test -x / >/dev/null 2>&1; then
14302
+ as_test_x='test -x'
14303
+ else
14304
+ if ls -dL / >/dev/null 2>&1; then
14305
+ as_ls_L_option=L
14306
+ else
14307
+ as_ls_L_option=
14308
+ fi
14309
+ as_test_x='
14310
+ eval sh -c '\''
14311
+ if test -d "$1"; then
14312
+ test -d "$1/.";
14313
+ else
14314
+ case $1 in @%:@(
14315
+ -*)set "./$1";;
14316
+ esac;
14317
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
14318
+ ???[sx]*):;;*)false;;esac;fi
14319
+ '\'' sh
14320
+ '
14321
+ fi
14322
+ as_executable_p=$as_test_x
14323
+
14324
+ # Sed expression to map a string onto a valid CPP name.
14325
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14326
+
14327
+ # Sed expression to map a string onto a valid variable name.
14328
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14329
+
14330
+
14331
+ exec 6>&1
14332
+ ## ----------------------------------- ##
14333
+ ## Main body of $CONFIG_STATUS script. ##
14334
+ ## ----------------------------------- ##
14335
+ _ASEOF
14336
+ test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14337
+
14338
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14339
+ # Save the log message, to keep $0 and so on meaningful, and to
14340
+ # report actual input values of CONFIG_FILES etc. instead of their
14341
+ # values after options handling.
14342
+ ac_log="
14343
+ This file was extended by $as_me, which was
14344
+ generated by GNU Autoconf 2.68. Invocation command line was
14345
+
14346
+ CONFIG_FILES = $CONFIG_FILES
14347
+ CONFIG_HEADERS = $CONFIG_HEADERS
14348
+ CONFIG_LINKS = $CONFIG_LINKS
14349
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
14350
+ $ $0 $@
14351
+
14352
+ on `(hostname || uname -n) 2>/dev/null | sed 1q`
14353
+ "
14354
+
14355
+ _ACEOF
14356
+
14357
+
14358
+ case $ac_config_headers in *"
14359
+ "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14360
+ esac
14361
+
14362
+
14363
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14364
+ # Files that config.status was made for.
14365
+ config_headers="$ac_config_headers"
14366
+
14367
+ _ACEOF
14368
+
14369
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14370
+ ac_cs_usage="\
14371
+ \`$as_me' instantiates files and other configuration actions
14372
+ from templates according to the current configuration. Unless the files
14373
+ and actions are specified as TAGs, all are instantiated by default.
14374
+
14375
+ Usage: $0 [OPTION]... [TAG]...
14376
+
14377
+ -h, --help print this help, then exit
14378
+ -V, --version print version number and configuration settings, then exit
14379
+ --config print configuration, then exit
14380
+ -q, --quiet, --silent
14381
+ do not print progress messages
14382
+ -d, --debug don't remove temporary files
14383
+ --recheck update $as_me by reconfiguring in the same conditions
14384
+ --header=FILE[:TEMPLATE]
14385
+ instantiate the configuration header FILE
14386
+
14387
+ Configuration headers:
14388
+ $config_headers
14389
+
14390
+ Report bugs to the package provider."
14391
+
14392
+ _ACEOF
14393
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14394
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14395
+ ac_cs_version="\\
14396
+ config.status
14397
+ configured by $0, generated by GNU Autoconf 2.68,
14398
+ with options \\"\$ac_cs_config\\"
14399
+
14400
+ Copyright (C) 2010 Free Software Foundation, Inc.
14401
+ This config.status script is free software; the Free Software Foundation
14402
+ gives unlimited permission to copy, distribute and modify it."
14403
+
14404
+ ac_pwd='$ac_pwd'
14405
+ srcdir='$srcdir'
14406
+ test -n "\$AWK" || AWK=awk
14407
+ _ACEOF
14408
+
14409
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14410
+ # The default lists apply if the user does not specify any file.
14411
+ ac_need_defaults=:
14412
+ while test $# != 0
14413
+ do
14414
+ case $1 in
14415
+ --*=?*)
14416
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
14417
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14418
+ ac_shift=:
14419
+ ;;
14420
+ --*=)
14421
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
14422
+ ac_optarg=
14423
+ ac_shift=:
14424
+ ;;
14425
+ *)
14426
+ ac_option=$1
14427
+ ac_optarg=$2
14428
+ ac_shift=shift
14429
+ ;;
14430
+ esac
14431
+
14432
+ case $ac_option in
14433
+ # Handling of the options.
14434
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14435
+ ac_cs_recheck=: ;;
14436
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14437
+ $as_echo "$ac_cs_version"; exit ;;
14438
+ --config | --confi | --conf | --con | --co | --c )
14439
+ $as_echo "$ac_cs_config"; exit ;;
14440
+ --debug | --debu | --deb | --de | --d | -d )
14441
+ debug=: ;;
14442
+ --header | --heade | --head | --hea )
14443
+ $ac_shift
14444
+ case $ac_optarg in
14445
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14446
+ esac
14447
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14448
+ ac_need_defaults=false;;
14449
+ --he | --h)
14450
+ # Conflict between --help and --header
14451
+ as_fn_error $? "ambiguous option: \`$1'
14452
+ Try \`$0 --help' for more information.";;
14453
+ --help | --hel | -h )
14454
+ $as_echo "$ac_cs_usage"; exit ;;
14455
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14456
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
14457
+ ac_cs_silent=: ;;
14458
+
14459
+ # This is an error.
14460
+ -*) as_fn_error $? "unrecognized option: \`$1'
14461
+ Try \`$0 --help' for more information." ;;
14462
+
14463
+ *) as_fn_append ac_config_targets " $1"
14464
+ ac_need_defaults=false ;;
14465
+
14466
+ esac
14467
+ shift
14468
+ done
14469
+
14470
+ ac_configure_extra_args=
14471
+
14472
+ if $ac_cs_silent; then
14473
+ exec 6>/dev/null
14474
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
14475
+ fi
14476
+
14477
+ _ACEOF
14478
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14479
+ if \$ac_cs_recheck; then
14480
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14481
+ shift
14482
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14483
+ CONFIG_SHELL='$SHELL'
14484
+ export CONFIG_SHELL
14485
+ exec "\$@"
14486
+ fi
14487
+
14488
+ _ACEOF
14489
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14490
+ exec 5>>config.log
14491
+ {
14492
+ echo
14493
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
14494
+ @%:@@%:@ Running $as_me. @%:@@%:@
14495
+ _ASBOX
14496
+ $as_echo "$ac_log"
14497
+ } >&5
14498
+
14499
+ _ACEOF
14500
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14501
+ _ACEOF
14502
+
14503
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14504
+
14505
+ # Handling of arguments.
14506
+ for ac_config_target in $ac_config_targets
14507
+ do
14508
+ case $ac_config_target in
14509
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
14510
+
14511
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
14512
+ esac
14513
+ done
14514
+
14515
+
14516
+ # If the user did not use the arguments to specify the items to instantiate,
14517
+ # then the envvar interface is used. Set only those that are not.
14518
+ # We use the long form for the default assignment because of an extremely
14519
+ # bizarre bug on SunOS 4.1.3.
14520
+ if $ac_need_defaults; then
14521
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14522
+ fi
14523
+
14524
+ # Have a temporary directory for convenience. Make it in the build tree
14525
+ # simply because there is no reason against having it here, and in addition,
14526
+ # creating and moving files from /tmp can sometimes cause problems.
14527
+ # Hook for its removal unless debugging.
14528
+ # Note that there is a small window in which the directory will not be cleaned:
14529
+ # after its creation but before its name has been assigned to `$tmp'.
14530
+ $debug ||
14531
+ {
14532
+ tmp= ac_tmp=
14533
+ trap 'exit_status=$?
14534
+ : "${ac_tmp:=$tmp}"
14535
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
14536
+ ' 0
14537
+ trap 'as_fn_exit 1' 1 2 13 15
14538
+ }
14539
+ # Create a (secure) tmp directory for tmp files.
14540
+
14541
+ {
14542
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14543
+ test -d "$tmp"
14544
+ } ||
14545
+ {
14546
+ tmp=./conf$$-$RANDOM
14547
+ (umask 077 && mkdir "$tmp")
14548
+ } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14549
+ ac_tmp=$tmp
14550
+
14551
+ # Set up the scripts for CONFIG_HEADERS section.
14552
+ # No need to generate them if there are no CONFIG_HEADERS.
14553
+ # This happens for instance with `./config.status Makefile'.
14554
+ if test -n "$CONFIG_HEADERS"; then
14555
+ cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14556
+ BEGIN {
14557
+ _ACEOF
14558
+
14559
+ # Transform confdefs.h into an awk script `defines.awk', embedded as
14560
+ # here-document in config.status, that substitutes the proper values into
14561
+ # config.h.in to produce config.h.
14562
+
14563
+ # Create a delimiter string that does not exist in confdefs.h, to ease
14564
+ # handling of long lines.
14565
+ ac_delim='%!_!# '
14566
+ for ac_last_try in false false :; do
14567
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14568
+ if test -z "$ac_tt"; then
14569
+ break
14570
+ elif $ac_last_try; then
14571
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14572
+ else
14573
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14574
+ fi
14575
+ done
14576
+
14577
+ # For the awk script, D is an array of macro values keyed by name,
14578
+ # likewise P contains macro parameters if any. Preserve backslash
14579
+ # newline sequences.
14580
+
14581
+ ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14582
+ sed -n '
14583
+ s/.\{148\}/&'"$ac_delim"'/g
14584
+ t rset
14585
+ :rset
14586
+ s/^[ ]*#[ ]*define[ ][ ]*/ /
14587
+ t def
14588
+ d
14589
+ :def
14590
+ s/\\$//
14591
+ t bsnl
14592
+ s/["\\]/\\&/g
14593
+ s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14594
+ D["\1"]=" \3"/p
14595
+ s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14596
+ d
14597
+ :bsnl
14598
+ s/["\\]/\\&/g
14599
+ s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14600
+ D["\1"]=" \3\\\\\\n"\\/p
14601
+ t cont
14602
+ s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14603
+ t cont
14604
+ d
14605
+ :cont
14606
+ n
14607
+ s/.\{148\}/&'"$ac_delim"'/g
14608
+ t clear
14609
+ :clear
14610
+ s/\\$//
14611
+ t bsnlc
14612
+ s/["\\]/\\&/g; s/^/"/; s/$/"/p
14613
+ d
14614
+ :bsnlc
14615
+ s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14616
+ b cont
14617
+ ' <confdefs.h | sed '
14618
+ s/'"$ac_delim"'/"\\\
14619
+ "/g' >>$CONFIG_STATUS || ac_write_fail=1
14620
+
14621
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14622
+ for (key in D) D_is_set[key] = 1
14623
+ FS = ""
14624
+ }
14625
+ /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14626
+ line = \$ 0
14627
+ split(line, arg, " ")
14628
+ if (arg[1] == "#") {
14629
+ defundef = arg[2]
14630
+ mac1 = arg[3]
14631
+ } else {
14632
+ defundef = substr(arg[1], 2)
14633
+ mac1 = arg[2]
14634
+ }
14635
+ split(mac1, mac2, "(") #)
14636
+ macro = mac2[1]
14637
+ prefix = substr(line, 1, index(line, defundef) - 1)
14638
+ if (D_is_set[macro]) {
14639
+ # Preserve the white space surrounding the "#".
14640
+ print prefix "define", macro P[macro] D[macro]
14641
+ next
14642
+ } else {
14643
+ # Replace #undef with comments. This is necessary, for example,
14644
+ # in the case of _POSIX_SOURCE, which is predefined and required
14645
+ # on some systems where configure will not decide to define it.
14646
+ if (defundef == "undef") {
14647
+ print "/*", prefix defundef, macro, "*/"
14648
+ next
14649
+ }
14650
+ }
14651
+ }
14652
+ { print }
14653
+ _ACAWK
14654
+ _ACEOF
14655
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14656
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14657
+ fi # test -n "$CONFIG_HEADERS"
14658
+
14659
+
14660
+ eval set X " :H $CONFIG_HEADERS "
14661
+ shift
14662
+ for ac_tag
14663
+ do
14664
+ case $ac_tag in
14665
+ :[FHLC]) ac_mode=$ac_tag; continue;;
14666
+ esac
14667
+ case $ac_mode$ac_tag in
14668
+ :[FHL]*:*);;
14669
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
14670
+ :[FH]-) ac_tag=-:-;;
14671
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14672
+ esac
14673
+ ac_save_IFS=$IFS
14674
+ IFS=:
14675
+ set x $ac_tag
14676
+ IFS=$ac_save_IFS
14677
+ shift
14678
+ ac_file=$1
14679
+ shift
14680
+
14681
+ case $ac_mode in
14682
+ :L) ac_source=$1;;
14683
+ :[FH])
14684
+ ac_file_inputs=
14685
+ for ac_f
14686
+ do
14687
+ case $ac_f in
14688
+ -) ac_f="$ac_tmp/stdin";;
14689
+ *) # Look for the file first in the build tree, then in the source tree
14690
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
14691
+ # because $ac_f cannot contain `:'.
14692
+ test -f "$ac_f" ||
14693
+ case $ac_f in
14694
+ [\\/$]*) false;;
14695
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14696
+ esac ||
14697
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14698
+ esac
14699
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14700
+ as_fn_append ac_file_inputs " '$ac_f'"
14701
+ done
14702
+
14703
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
14704
+ # use $as_me), people would be surprised to read:
14705
+ # /* config.h. Generated by config.status. */
14706
+ configure_input='Generated from '`
14707
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14708
+ `' by configure.'
14709
+ if test x"$ac_file" != x-; then
14710
+ configure_input="$ac_file. $configure_input"
14711
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14712
+ $as_echo "$as_me: creating $ac_file" >&6;}
14713
+ fi
14714
+ # Neutralize special characters interpreted by sed in replacement strings.
14715
+ case $configure_input in #(
14716
+ *\&* | *\|* | *\\* )
14717
+ ac_sed_conf_input=`$as_echo "$configure_input" |
14718
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
14719
+ *) ac_sed_conf_input=$configure_input;;
14720
+ esac
14721
+
14722
+ case $ac_tag in
14723
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
14724
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
14725
+ esac
14726
+ ;;
14727
+ esac
14728
+
14729
+ ac_dir=`$as_dirname -- "$ac_file" ||
14730
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14731
+ X"$ac_file" : 'X\(//\)[^/]' \| \
14732
+ X"$ac_file" : 'X\(//\)$' \| \
14733
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14734
+ $as_echo X"$ac_file" |
14735
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14736
+ s//\1/
14737
+ q
14738
+ }
14739
+ /^X\(\/\/\)[^/].*/{
14740
+ s//\1/
14741
+ q
14742
+ }
14743
+ /^X\(\/\/\)$/{
14744
+ s//\1/
14745
+ q
14746
+ }
14747
+ /^X\(\/\).*/{
14748
+ s//\1/
14749
+ q
14750
+ }
14751
+ s/.*/./; q'`
14752
+ as_dir="$ac_dir"; as_fn_mkdir_p
14753
+ ac_builddir=.
14754
+
14755
+ case "$ac_dir" in
14756
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14757
+ *)
14758
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14759
+ # A ".." for each directory in $ac_dir_suffix.
14760
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14761
+ case $ac_top_builddir_sub in
14762
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14763
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14764
+ esac ;;
14765
+ esac
14766
+ ac_abs_top_builddir=$ac_pwd
14767
+ ac_abs_builddir=$ac_pwd$ac_dir_suffix
14768
+ # for backward compatibility:
14769
+ ac_top_builddir=$ac_top_build_prefix
14770
+
14771
+ case $srcdir in
14772
+ .) # We are building in place.
14773
+ ac_srcdir=.
14774
+ ac_top_srcdir=$ac_top_builddir_sub
14775
+ ac_abs_top_srcdir=$ac_pwd ;;
14776
+ [\\/]* | ?:[\\/]* ) # Absolute name.
14777
+ ac_srcdir=$srcdir$ac_dir_suffix;
14778
+ ac_top_srcdir=$srcdir
14779
+ ac_abs_top_srcdir=$srcdir ;;
14780
+ *) # Relative name.
14781
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14782
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
14783
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14784
+ esac
14785
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14786
+
14787
+
14788
+ case $ac_mode in
14789
+
14790
+ :H)
14791
+ #
14792
+ # CONFIG_HEADER
14793
+ #
14794
+ if test x"$ac_file" != x-; then
14795
+ {
14796
+ $as_echo "/* $configure_input */" \
14797
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
14798
+ } >"$ac_tmp/config.h" \
14799
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14800
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
14801
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14802
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
14803
+