1
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
# lib-prefix.m4 serial 3 (gettext-0.13)
14
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15
dnl This file is free software, distributed under the terms of the GNU
16
dnl General Public License. As a special exception to the GNU General
17
dnl Public License, this file may be distributed as part of a program
18
dnl that contains a configuration script generated by Autoconf, under
19
dnl the same distribution terms as the rest of that program.
21
dnl From Bruno Haible.
23
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
24
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
25
dnl require excessive bracketing.
26
ifdef([AC_HELP_STRING],
27
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
28
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
30
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
31
dnl to access previously installed libraries. The basic assumption is that
32
dnl a user will want packages to use other packages he previously installed
33
dnl with the same --prefix option.
34
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
35
dnl libraries, but is otherwise very convenient.
36
AC_DEFUN([AC_LIB_PREFIX],
38
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
39
AC_REQUIRE([AC_PROG_CC])
40
AC_REQUIRE([AC_CANONICAL_HOST])
41
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
42
dnl By default, look in $includedir and $libdir.
44
AC_LIB_WITH_FINAL_PREFIX([
45
eval additional_includedir=\"$includedir\"
46
eval additional_libdir=\"$libdir\"
48
AC_LIB_ARG_WITH([lib-prefix],
49
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
50
--without-lib-prefix don't search for libraries in includedir and libdir],
52
if test "X$withval" = "Xno"; then
55
if test "X$withval" = "X"; then
56
AC_LIB_WITH_FINAL_PREFIX([
57
eval additional_includedir=\"$includedir\"
58
eval additional_libdir=\"$libdir\"
61
additional_includedir="$withval/include"
62
additional_libdir="$withval/lib"
66
if test $use_additional = yes; then
67
dnl Potentially add $additional_includedir to $CPPFLAGS.
69
dnl 1. if it's the standard /usr/include,
70
dnl 2. if it's already present in $CPPFLAGS,
71
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
72
dnl 4. if it doesn't exist as a directory.
73
if test "X$additional_includedir" != "X/usr/include"; then
75
for x in $CPPFLAGS; do
76
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
77
if test "X$x" = "X-I$additional_includedir"; then
82
if test -z "$haveit"; then
83
if test "X$additional_includedir" = "X/usr/local/include"; then
84
if test -n "$GCC"; then
90
if test -z "$haveit"; then
91
if test -d "$additional_includedir"; then
92
dnl Really add $additional_includedir to $CPPFLAGS.
93
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
98
dnl Potentially add $additional_libdir to $LDFLAGS.
100
dnl 1. if it's the standard /usr/lib,
101
dnl 2. if it's already present in $LDFLAGS,
102
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
103
dnl 4. if it doesn't exist as a directory.
104
if test "X$additional_libdir" != "X/usr/lib"; then
106
for x in $LDFLAGS; do
107
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108
if test "X$x" = "X-L$additional_libdir"; then
113
if test -z "$haveit"; then
114
if test "X$additional_libdir" = "X/usr/local/lib"; then
115
if test -n "$GCC"; then
121
if test -z "$haveit"; then
122
if test -d "$additional_libdir"; then
123
dnl Really add $additional_libdir to $LDFLAGS.
124
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
132
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
133
dnl acl_final_exec_prefix, containing the values to which $prefix and
134
dnl $exec_prefix will expand at the end of the configure script.
135
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
137
dnl Unfortunately, prefix and exec_prefix get only finally determined
138
dnl at the end of configure.
139
if test "X$prefix" = "XNONE"; then
140
acl_final_prefix="$ac_default_prefix"
142
acl_final_prefix="$prefix"
144
if test "X$exec_prefix" = "XNONE"; then
145
acl_final_exec_prefix='${prefix}'
147
acl_final_exec_prefix="$exec_prefix"
149
acl_save_prefix="$prefix"
150
prefix="$acl_final_prefix"
151
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
152
prefix="$acl_save_prefix"
155
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
156
dnl variables prefix and exec_prefix bound to the values they will have
157
dnl at the end of the configure script.
158
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
160
acl_save_prefix="$prefix"
161
prefix="$acl_final_prefix"
162
acl_save_exec_prefix="$exec_prefix"
163
exec_prefix="$acl_final_exec_prefix"
165
exec_prefix="$acl_save_exec_prefix"
166
prefix="$acl_save_prefix"
169
# lib-link.m4 serial 4 (gettext-0.12)
170
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
171
dnl This file is free software, distributed under the terms of the GNU
172
dnl General Public License. As a special exception to the GNU General
173
dnl Public License, this file may be distributed as part of a program
174
dnl that contains a configuration script generated by Autoconf, under
175
dnl the same distribution terms as the rest of that program.
177
dnl From Bruno Haible.
179
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
180
dnl the libraries corresponding to explicit and implicit dependencies.
181
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
182
dnl augments the CPPFLAGS variable.
183
AC_DEFUN([AC_LIB_LINKFLAGS],
185
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
186
AC_REQUIRE([AC_LIB_RPATH])
187
define([Name],[translit([$1],[./-], [___])])
188
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
189
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
190
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
191
AC_LIB_LINKFLAGS_BODY([$1], [$2])
192
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
193
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
194
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
196
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
197
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
198
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
199
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
201
AC_SUBST([LTLIB]NAME)
202
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
203
dnl results of this search when this library appears as a dependency.
209
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
210
dnl searches for libname and the libraries corresponding to explicit and
211
dnl implicit dependencies, together with the specified include files and
212
dnl the ability to compile and link the specified testcode. If found, it
213
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
214
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
215
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
216
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
217
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
219
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
220
AC_REQUIRE([AC_LIB_RPATH])
221
define([Name],[translit([$1],[./-], [___])])
222
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
223
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
225
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
227
AC_LIB_LINKFLAGS_BODY([$1], [$2])
229
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
230
dnl because if the user has installed lib[]Name and not disabled its use
231
dnl via --without-lib[]Name-prefix, he wants to use it.
232
ac_save_CPPFLAGS="$CPPFLAGS"
233
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
235
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
237
LIBS="$LIBS $LIB[]NAME"
238
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
241
if test "$ac_cv_lib[]Name" = yes; then
243
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
244
AC_MSG_CHECKING([how to link with lib[]$1])
245
AC_MSG_RESULT([$LIB[]NAME])
248
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
249
dnl $INC[]NAME either.
250
CPPFLAGS="$ac_save_CPPFLAGS"
254
AC_SUBST([HAVE_LIB]NAME)
256
AC_SUBST([LTLIB]NAME)
261
dnl Determine the platform dependent parameters needed to use rpath:
262
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
263
dnl hardcode_direct, hardcode_minus_L.
264
AC_DEFUN([AC_LIB_RPATH],
266
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
267
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
268
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
269
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
278
libext="$acl_cv_libext"
279
shlibext="$acl_cv_shlibext"
280
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282
hardcode_direct="$acl_cv_hardcode_direct"
283
hardcode_minus_L="$acl_cv_hardcode_minus_L"
284
dnl Determine whether the user wants rpath handling at all.
286
[ --disable-rpath do not hardcode runtime library paths],
290
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291
dnl the libraries corresponding to explicit and implicit dependencies.
292
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
295
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297
dnl By default, look in $includedir and $libdir.
299
AC_LIB_WITH_FINAL_PREFIX([
300
eval additional_includedir=\"$includedir\"
301
eval additional_libdir=\"$libdir\"
303
AC_LIB_ARG_WITH([lib$1-prefix],
304
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
305
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
307
if test "X$withval" = "Xno"; then
310
if test "X$withval" = "X"; then
311
AC_LIB_WITH_FINAL_PREFIX([
312
eval additional_includedir=\"$includedir\"
313
eval additional_libdir=\"$libdir\"
316
additional_includedir="$withval/include"
317
additional_libdir="$withval/lib"
321
dnl Search the library and its dependencies in $additional_libdir and
322
dnl $LDFLAGS. Using breadth-first-seach.
328
names_already_handled=
329
names_next_round='$1 $2'
330
while test -n "$names_next_round"; do
331
names_this_round="$names_next_round"
333
for name in $names_this_round; do
335
for n in $names_already_handled; do
336
if test "$n" = "$name"; then
341
if test -z "$already_handled"; then
342
names_already_handled="$names_already_handled $name"
343
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344
dnl or AC_LIB_HAVE_LINKFLAGS call.
345
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346
eval value=\"\$HAVE_LIB$uppername\"
347
if test -n "$value"; then
348
if test "$value" = yes; then
349
eval value=\"\$LIB$uppername\"
350
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351
eval value=\"\$LTLIB$uppername\"
352
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
354
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355
dnl that this library doesn't exist. So just drop it.
359
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360
dnl and the already constructed $LIBNAME/$LTLIBNAME.
365
if test $use_additional = yes; then
366
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367
found_dir="$additional_libdir"
368
found_so="$additional_libdir/lib$name.$shlibext"
369
if test -f "$additional_libdir/lib$name.la"; then
370
found_la="$additional_libdir/lib$name.la"
373
if test -f "$additional_libdir/lib$name.$libext"; then
374
found_dir="$additional_libdir"
375
found_a="$additional_libdir/lib$name.$libext"
376
if test -f "$additional_libdir/lib$name.la"; then
377
found_la="$additional_libdir/lib$name.la"
382
if test "X$found_dir" = "X"; then
383
for x in $LDFLAGS $LTLIB[]NAME; do
384
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
387
dir=`echo "X$x" | sed -e 's/^X-L//'`
388
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
390
found_so="$dir/lib$name.$shlibext"
391
if test -f "$dir/lib$name.la"; then
392
found_la="$dir/lib$name.la"
395
if test -f "$dir/lib$name.$libext"; then
397
found_a="$dir/lib$name.$libext"
398
if test -f "$dir/lib$name.la"; then
399
found_la="$dir/lib$name.la"
405
if test "X$found_dir" != "X"; then
410
if test "X$found_dir" != "X"; then
411
dnl Found the library.
412
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413
if test "X$found_so" != "X"; then
414
dnl Linking with a shared library. We attempt to hardcode its
415
dnl directory into the executable's runpath, unless it's the
416
dnl standard /usr/lib.
417
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418
dnl No hardcoding is needed.
419
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
421
dnl Use an explicit option to hardcode DIR into the resulting
423
dnl Potentially add DIR to ltrpathdirs.
424
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
426
for x in $ltrpathdirs; do
427
if test "X$x" = "X$found_dir"; then
432
if test -z "$haveit"; then
433
ltrpathdirs="$ltrpathdirs $found_dir"
435
dnl The hardcoding into $LIBNAME is system dependent.
436
if test "$hardcode_direct" = yes; then
437
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438
dnl resulting binary.
439
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
441
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442
dnl Use an explicit option to hardcode DIR into the resulting
444
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445
dnl Potentially add DIR to rpathdirs.
446
dnl The rpathdirs will be appended to $LIBNAME at the end.
448
for x in $rpathdirs; do
449
if test "X$x" = "X$found_dir"; then
454
if test -z "$haveit"; then
455
rpathdirs="$rpathdirs $found_dir"
458
dnl Rely on "-L$found_dir".
459
dnl But don't add it if it's already contained in the LDFLAGS
460
dnl or the already constructed $LIBNAME
462
for x in $LDFLAGS $LIB[]NAME; do
463
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464
if test "X$x" = "X-L$found_dir"; then
469
if test -z "$haveit"; then
470
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
472
if test "$hardcode_minus_L" != no; then
473
dnl FIXME: Not sure whether we should use
474
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
476
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
478
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479
dnl here, because this doesn't fit in flags passed to the
480
dnl compiler. So give up. No hardcoding. This affects only
481
dnl very old systems.
482
dnl FIXME: Not sure whether we should use
483
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
485
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
491
if test "X$found_a" != "X"; then
492
dnl Linking with a static library.
493
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
495
dnl We shouldn't come here, but anyway it's good to have a
497
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
500
dnl Assume the include files are nearby.
501
additional_includedir=
504
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505
additional_includedir="$basedir/include"
508
if test "X$additional_includedir" != "X"; then
509
dnl Potentially add $additional_includedir to $INCNAME.
511
dnl 1. if it's the standard /usr/include,
512
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
513
dnl 3. if it's already present in $CPPFLAGS or the already
514
dnl constructed $INCNAME,
515
dnl 4. if it doesn't exist as a directory.
516
if test "X$additional_includedir" != "X/usr/include"; then
518
if test "X$additional_includedir" = "X/usr/local/include"; then
519
if test -n "$GCC"; then
525
if test -z "$haveit"; then
526
for x in $CPPFLAGS $INC[]NAME; do
527
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528
if test "X$x" = "X-I$additional_includedir"; then
533
if test -z "$haveit"; then
534
if test -d "$additional_includedir"; then
535
dnl Really add $additional_includedir to $INCNAME.
536
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
542
dnl Look for dependencies.
543
if test -n "$found_la"; then
544
dnl Read the .la file. It defines the variables
545
dnl dlname, library_names, old_library, dependency_libs, current,
546
dnl age, revision, installed, dlopen, dlpreopen, libdir.
547
save_libdir="$libdir"
549
*/* | *\\*) . "$found_la" ;;
550
*) . "./$found_la" ;;
552
libdir="$save_libdir"
553
dnl We use only dependency_libs.
554
for dep in $dependency_libs; do
557
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
560
dnl 1. if it's the standard /usr/lib,
561
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
562
dnl 3. if it's already present in $LDFLAGS or the already
563
dnl constructed $LIBNAME,
564
dnl 4. if it doesn't exist as a directory.
565
if test "X$additional_libdir" != "X/usr/lib"; then
567
if test "X$additional_libdir" = "X/usr/local/lib"; then
568
if test -n "$GCC"; then
574
if test -z "$haveit"; then
576
for x in $LDFLAGS $LIB[]NAME; do
577
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578
if test "X$x" = "X-L$additional_libdir"; then
583
if test -z "$haveit"; then
584
if test -d "$additional_libdir"; then
585
dnl Really add $additional_libdir to $LIBNAME.
586
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
590
for x in $LDFLAGS $LTLIB[]NAME; do
591
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592
if test "X$x" = "X-L$additional_libdir"; then
597
if test -z "$haveit"; then
598
if test -d "$additional_libdir"; then
599
dnl Really add $additional_libdir to $LTLIBNAME.
600
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
607
dir=`echo "X$dep" | sed -e 's/^X-R//'`
608
if test "$enable_rpath" != no; then
609
dnl Potentially add DIR to rpathdirs.
610
dnl The rpathdirs will be appended to $LIBNAME at the end.
612
for x in $rpathdirs; do
613
if test "X$x" = "X$dir"; then
618
if test -z "$haveit"; then
619
rpathdirs="$rpathdirs $dir"
621
dnl Potentially add DIR to ltrpathdirs.
622
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
624
for x in $ltrpathdirs; do
625
if test "X$x" = "X$dir"; then
630
if test -z "$haveit"; then
631
ltrpathdirs="$ltrpathdirs $dir"
636
dnl Handle this in the next round.
637
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
640
dnl Handle this in the next round. Throw away the .la's
641
dnl directory; it is already contained in a preceding -L
643
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
646
dnl Most likely an immediate library name.
647
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
654
dnl Didn't find the library; assume it is in the system directories
655
dnl known to the linker and runtime loader. (All the system
656
dnl directories known to the linker should also be known to the
657
dnl runtime loader, otherwise the system is severely misconfigured.)
658
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
665
if test "X$rpathdirs" != "X"; then
666
if test -n "$hardcode_libdir_separator"; then
667
dnl Weird platform: only the last -rpath option counts, the user must
668
dnl pass all path elements in one option. We can arrange that for a
669
dnl single library, but not when more than one $LIBNAMEs are used.
671
for found_dir in $rpathdirs; do
672
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
674
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675
acl_save_libdir="$libdir"
677
eval flag=\"$hardcode_libdir_flag_spec\"
678
libdir="$acl_save_libdir"
679
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
681
dnl The -rpath options are cumulative.
682
for found_dir in $rpathdirs; do
683
acl_save_libdir="$libdir"
685
eval flag=\"$hardcode_libdir_flag_spec\"
686
libdir="$acl_save_libdir"
687
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
691
if test "X$ltrpathdirs" != "X"; then
692
dnl When using libtool, the option that works for both libraries and
693
dnl executables is -R. The -R options are cumulative.
694
for found_dir in $ltrpathdirs; do
695
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
700
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701
dnl unless already present in VAR.
702
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703
dnl contains two or three consecutive elements that belong together.
704
AC_DEFUN([AC_LIB_APPENDTOVAR],
706
for element in [$2]; do
709
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710
if test "X$x" = "X$element"; then
715
if test -z "$haveit"; then
716
[$1]="${[$1]}${[$1]:+ }$element"
721
# lib-ld.m4 serial 3 (gettext-0.13)
722
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723
dnl This file is free software, distributed under the terms of the GNU
724
dnl General Public License. As a special exception to the GNU General
725
dnl Public License, this file may be distributed as part of a program
726
dnl that contains a configuration script generated by Autoconf, under
727
dnl the same distribution terms as the rest of that program.
729
dnl Subroutines of libtool.m4,
730
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
733
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
734
AC_DEFUN([AC_LIB_PROG_LD_GNU],
735
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
736
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
737
case `$LD -v 2>&1 </dev/null` in
738
*GNU* | *'with BFD'*)
739
acl_cv_prog_gnu_ld=yes ;;
741
acl_cv_prog_gnu_ld=no ;;
743
with_gnu_ld=$acl_cv_prog_gnu_ld
746
dnl From libtool-1.4. Sets the variable LD.
747
AC_DEFUN([AC_LIB_PROG_LD],
749
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
750
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
751
AC_REQUIRE([AC_PROG_CC])dnl
752
AC_REQUIRE([AC_CANONICAL_HOST])dnl
753
# Prepare PATH_SEPARATOR.
754
# The user is always right.
755
if test "${PATH_SEPARATOR+set}" != set; then
756
echo "#! /bin/sh" >conf$$.sh
757
echo "exit 0" >>conf$$.sh
759
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
767
if test "$GCC" = yes; then
768
# Check if gcc -print-prog-name=ld gives a path.
769
AC_MSG_CHECKING([for ld used by GCC])
772
# gcc leaves a trailing carriage return which upsets mingw
773
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
775
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
778
# Accept absolute paths.
779
[[\\/]* | [A-Za-z]:[\\/]*)]
780
[re_direlt='/[^/][^/]*/\.\./']
781
# Canonicalize the path of ld
782
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
783
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
784
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
786
test -z "$LD" && LD="$ac_prog"
789
# If it fails, then pretend we aren't using GCC.
793
# If it is relative, then search for the first ld in PATH.
797
elif test "$with_gnu_ld" = yes; then
798
AC_MSG_CHECKING([for GNU ld])
800
AC_MSG_CHECKING([for non-GNU ld])
802
AC_CACHE_VAL(acl_cv_path_LD,
803
[if test -z "$LD"; then
804
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
805
for ac_dir in $PATH; do
806
test -z "$ac_dir" && ac_dir=.
807
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
808
acl_cv_path_LD="$ac_dir/$ac_prog"
809
# Check to see if the program is GNU ld. I'd rather use --version,
810
# but apparently some GNU ld's only accept -v.
811
# Break only if it was the GNU/non-GNU ld that we prefer.
812
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
813
*GNU* | *'with BFD'*)
814
test "$with_gnu_ld" != no && break ;;
816
test "$with_gnu_ld" != yes && break ;;
822
acl_cv_path_LD="$LD" # Let the user override the test with a path.
825
if test -n "$LD"; then
830
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
834
# Add --enable-maintainer-mode option to configure.
839
AC_DEFUN([AM_MAINTAINER_MODE],
840
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
841
dnl maintainer-mode is disabled by default
842
AC_ARG_ENABLE(maintainer-mode,
843
[ --enable-maintainer-mode enable make rules and dependencies not useful
844
(and sometimes confusing) to the casual installer],
845
USE_MAINTAINER_MODE=$enableval,
846
USE_MAINTAINER_MODE=no)
847
AC_MSG_RESULT($USE_MAINTAINER_MODE)
848
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
849
MAINT=$MAINTAINER_MODE_TRUE
854
# Define a conditional.
856
AC_DEFUN([AM_CONDITIONAL],
867
# Do all the work for Automake. This macro actually does too much --
868
# some checks are only needed if your package does certain things.
869
# But this isn't really a big deal.
874
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
876
AC_DEFUN([AM_INIT_AUTOMAKE],
877
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
878
AC_REQUIRE([AC_PROG_INSTALL])
883
dnl test to see if srcdir already configured
884
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
885
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
888
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
889
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
890
AC_REQUIRE([AM_SANITY_CHECK])
891
AC_REQUIRE([AC_ARG_PROGRAM])
892
dnl FIXME This is truly gross.
893
missing_dir=`cd $ac_aux_dir && pwd`
894
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
895
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
896
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
897
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
898
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
899
AC_REQUIRE([AC_PROG_MAKE_SET])])
901
# Copyright 2002 Free Software Foundation, Inc.
903
# This program is free software; you can redistribute it and/or modify
904
# it under the terms of the GNU General Public License as published by
905
# the Free Software Foundation; either version 2, or (at your option)
908
# This program is distributed in the hope that it will be useful,
909
# but WITHOUT ANY WARRANTY; without even the implied warranty of
910
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
911
# GNU General Public License for more details.
913
# You should have received a copy of the GNU General Public License
914
# along with this program; if not, write to the Free Software
915
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
917
# AM_AUTOMAKE_VERSION(VERSION)
918
# ----------------------------
919
# Automake X.Y traces this macro to ensure aclocal.m4 has been
920
# generated from the m4 files accompanying Automake X.Y.
921
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
923
# AM_SET_CURRENT_AUTOMAKE_VERSION
924
# -------------------------------
925
# Call AM_AUTOMAKE_VERSION so it can be traced.
926
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
927
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
928
[AM_AUTOMAKE_VERSION([1.4-p6])])
931
# Check to make sure that the build environment is sane.
934
AC_DEFUN([AM_SANITY_CHECK],
935
[AC_MSG_CHECKING([whether build environment is sane])
938
echo timestamp > conftestfile
939
# Do `set' in a subshell so we don't clobber the current shell's
940
# arguments. Must try -L first in case configure is actually a
941
# symlink; some systems play weird games with the mod time of symlinks
942
# (eg FreeBSD returns the mod time of the symlink's containing
945
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
946
if test "[$]*" = "X"; then
948
set X `ls -t $srcdir/configure conftestfile`
950
if test "[$]*" != "X $srcdir/configure conftestfile" \
951
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
953
# If neither matched, then we have a broken ls. This can happen
954
# if, for instance, CONFIG_SHELL is bash and it inherits a
955
# broken ls alias from the environment. This has actually
956
# happened. Such a system could not be considered "sane".
957
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
958
alias in your environment])
961
test "[$]2" = conftestfile
967
AC_MSG_ERROR([newly created file is older than distributed files!
968
Check your system clock])
973
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
974
dnl The program must properly implement --version.
975
AC_DEFUN([AM_MISSING_PROG],
976
[AC_MSG_CHECKING(for working $2)
977
# Run test in a subshell; some versions of sh will print an error if
978
# an executable is not found, even if stderr is redirected.
979
# Redirect stdin to placate older versions of autoconf. Sigh.
980
if ($2 --version) < /dev/null > /dev/null 2>&1; then
985
AC_MSG_RESULT(missing)
989
# Like AC_CONFIG_HEADER, but automatically create stamp file.
991
AC_DEFUN([AM_CONFIG_HEADER],
993
AC_CONFIG_HEADER([$1])
994
dnl When config.status generates a header, we must update the stamp-h file.
995
dnl This file resides in the same directory as the config header
996
dnl that is generated. We must strip everything past the first ":",
997
dnl and everything past the last "/".
998
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
999
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1000
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1002
for am_file in <<$1>>; do
1003
case " <<$>>CONFIG_HEADERS " in
1004
*" <<$>>am_file "*<<)>>
1005
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1008
am_indx=`expr "<<$>>am_indx" + 1`
1012
# isc-posix.m4 serial 2 (gettext-0.11.2)
1013
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1014
dnl This file is free software, distributed under the terms of the GNU
1015
dnl General Public License. As a special exception to the GNU General
1016
dnl Public License, this file may be distributed as part of a program
1017
dnl that contains a configuration script generated by Autoconf, under
1018
dnl the same distribution terms as the rest of that program.
1020
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1022
# This test replaces the one in autoconf.
1023
# Currently this macro should have the same name as the autoconf macro
1024
# because gettext's gettext.m4 (distributed in the automake package)
1025
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
1026
# give these diagnostics:
1027
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1028
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1030
undefine([AC_ISC_POSIX])
1032
AC_DEFUN([AC_ISC_POSIX],
1034
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1035
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1039
ll## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
1041
dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
1042
# serial 1 AC_PROG_INTLTOOL
1043
AC_DEFUN([AC_PROG_INTLTOOL],
1046
if test -n "$1"; then
1047
AC_MSG_CHECKING(for intltool >= $1)
1049
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
1050
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in`
1052
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
1055
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
1056
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1058
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
1063
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1064
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1065
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
1066
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1067
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
1068
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
1069
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
1070
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
1071
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1072
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
1073
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
1074
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
1075
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -m -c $(top_builddir)/po/.intltool-merge-cache'
1076
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1077
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache'
1078
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
1080
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1081
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1082
AC_SUBST(INTLTOOL_KEYS_RULE)
1083
AC_SUBST(INTLTOOL_PROP_RULE)
1084
AC_SUBST(INTLTOOL_OAF_RULE)
1085
AC_SUBST(INTLTOOL_PONG_RULE)
1086
AC_SUBST(INTLTOOL_SERVER_RULE)
1087
AC_SUBST(INTLTOOL_SHEET_RULE)
1088
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1089
AC_SUBST(INTLTOOL_UI_RULE)
1090
AC_SUBST(INTLTOOL_XAM_RULE)
1091
AC_SUBST(INTLTOOL_KBD_RULE)
1092
AC_SUBST(INTLTOOL_XML_RULE)
1093
AC_SUBST(INTLTOOL_CAVES_RULE)
1094
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1095
AC_SUBST(INTLTOOL_THEME_RULE)
1097
# Use the tools built into the package, not the ones that are installed.
1099
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
1100
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
1101
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
1103
AC_SUBST(INTLTOOL_EXTRACT)
1104
AC_SUBST(INTLTOOL_MERGE)
1105
AC_SUBST(INTLTOOL_UPDATE)
1107
AC_PATH_PROG(INTLTOOL_PERL, perl)
1108
if test -z "$INTLTOOL_PERL"; then
1109
AC_MSG_ERROR([perl not found; required for intltool])
1111
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1112
AC_MSG_ERROR([perl 5.x required for intltool])
1114
if `perl -e "require XML::Parser" 2>/dev/null`; then
1117
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1120
# Remove file type tags (using []) from po/POTFILES.
1122
ifdef([AC_DIVERSION_ICMDS],[
1123
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
1125
mv -f po/POTFILES po/POTFILES.tmp
1126
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
1127
rm -f po/POTFILES.tmp
1131
ifdef([AC_CONFIG_COMMANDS_PRE],[
1132
AC_CONFIG_COMMANDS_PRE([
1134
mv -f po/POTFILES po/POTFILES.tmp
1135
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
1136
rm -f po/POTFILES.tmp
1142
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
1144
AC_OUTPUT_COMMANDS([
1146
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-extract.in > intltool-extract.out
1147
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1148
rm -f intltool-extract.out
1150
mv -f intltool-extract.out intltool-extract
1152
chmod ugo+x intltool-extract
1153
chmod u+w intltool-extract
1155
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" \
1156
< ${ac_aux_dir}/intltool-merge.in > intltool-merge.out
1157
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1158
rm -f intltool-merge.out
1160
mv -f intltool-merge.out intltool-merge
1162
chmod ugo+x intltool-merge
1163
chmod u+w intltool-merge
1165
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-update.in > intltool-update.out
1166
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1167
rm -f intltool-update.out
1169
mv -f intltool-update.out intltool-update
1171
chmod ugo+x intltool-update
1172
chmod u+w intltool-update
1174
], INTLTOOL_PERL=${INTLTOOL_PERL} ac_aux_dir=${ac_aux_dir})
1178
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1180
# serial 46 AC_PROG_LIBTOOL
1182
AC_DEFUN([AC_PROG_LIBTOOL],
1183
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1185
# This can be used to rebuild libtool when needed
1186
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1188
# Always use our own libtool.
1189
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1190
AC_SUBST(LIBTOOL)dnl
1192
# Prevent multiple expansion
1193
define([AC_PROG_LIBTOOL], [])
1196
AC_DEFUN([AC_LIBTOOL_SETUP],
1198
AC_REQUIRE([AC_ENABLE_SHARED])dnl
1199
AC_REQUIRE([AC_ENABLE_STATIC])dnl
1200
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1201
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1202
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1203
AC_REQUIRE([AC_PROG_CC])dnl
1204
AC_REQUIRE([AC_PROG_LD])dnl
1205
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1206
AC_REQUIRE([AC_PROG_NM])dnl
1207
AC_REQUIRE([LT_AC_PROG_SED])dnl
1209
AC_REQUIRE([AC_PROG_LN_S])dnl
1210
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1211
AC_REQUIRE([AC_OBJEXT])dnl
1212
AC_REQUIRE([AC_EXEEXT])dnl
1215
_LT_AC_PROG_ECHO_BACKSLASH
1216
# Only perform the check for file, if the check method requires it
1217
case $deplibs_check_method in
1219
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1225
AC_CHECK_TOOL(RANLIB, ranlib, :)
1226
AC_CHECK_TOOL(STRIP, strip, :)
1228
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1229
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1230
enable_win32_dll=yes, enable_win32_dll=no)
1232
AC_ARG_ENABLE(libtool-lock,
1233
[ --disable-libtool-lock avoid locking (might break parallel builds)])
1234
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1236
# Some flags need to be propagated to the compiler or linker for good
1240
# Find out which ABI we are using.
1241
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1242
if AC_TRY_EVAL(ac_compile); then
1243
case `/usr/bin/file conftest.$ac_objext` in
1259
# Test if the compiler is 64bit
1260
echo 'int i;' > conftest.$ac_ext
1261
lt_cv_cc_64bit_output=no
1262
if AC_TRY_EVAL(ac_compile); then
1263
case `/usr/bin/file conftest.$ac_objext` in
1265
lt_cv_cc_64bit_output=yes
1273
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1274
SAVE_CFLAGS="$CFLAGS"
1275
CFLAGS="$CFLAGS -belf"
1276
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1279
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1281
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1282
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1283
CFLAGS="$SAVE_CFLAGS"
1287
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1288
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1289
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1290
AC_CHECK_TOOL(AS, as, false)
1291
AC_CHECK_TOOL(OBJDUMP, objdump, false)
1293
# recent cygwin and mingw systems supply a stub DllMain which the user
1294
# can override, but on older systems we have to supply one
1295
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1297
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1298
DllMain (0, 0, 0);],
1299
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1302
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1303
# old mingw systems require "-dll" to link a DLL, while more recent ones
1305
SAVE_CFLAGS="$CFLAGS"
1306
CFLAGS="$CFLAGS -mdll"
1307
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1308
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1309
CFLAGS="$SAVE_CFLAGS" ;;
1310
*-*-cygwin* | *-*-pw32*)
1311
# cygwin systems need to pass --dll to the linker, and not link
1312
# crt.o which will require a WinMain@16 definition.
1313
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1319
_LT_AC_LTCONFIG_HACK
1323
# AC_LIBTOOL_HEADER_ASSERT
1324
# ------------------------
1325
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1326
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1327
[lt_cv_func_assert_works],
1330
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1331
case `$CC --version 2>/dev/null` in
1332
[[12]].*) lt_cv_func_assert_works=no ;;
1333
*) lt_cv_func_assert_works=yes ;;
1339
if test "x$lt_cv_func_assert_works" = xyes; then
1340
AC_CHECK_HEADERS(assert.h)
1342
])# AC_LIBTOOL_HEADER_ASSERT
1344
# _LT_AC_CHECK_DLFCN
1345
# --------------------
1346
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1347
[AC_CHECK_HEADERS(dlfcn.h)
1348
])# _LT_AC_CHECK_DLFCN
1350
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1351
# ---------------------------------
1352
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1353
[AC_REQUIRE([AC_CANONICAL_HOST])
1354
AC_REQUIRE([AC_PROG_NM])
1355
AC_REQUIRE([AC_OBJEXT])
1356
# Check for command to grab the raw symbol name followed by C symbol from nm.
1357
AC_MSG_CHECKING([command to parse $NM output])
1358
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1360
# These are sane defaults that work on at least a few old systems.
1361
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1363
# Character class describing NM global symbol codes.
1364
symcode='[[BCDEGRST]]'
1366
# Regexp to match symbols that can be accessed directly from C.
1367
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1369
# Transform the above into a raw symbol and a C symbol.
1370
symxfrm='\1 \2\3 \3'
1372
# Transform an extracted symbol line into a proper C declaration
1373
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1375
# Transform an extracted symbol line into symbol name and symbol address
1376
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1378
# Define system-specific variables.
1383
cygwin* | mingw* | pw32*)
1384
symcode='[[ABCDGISTW]]'
1386
hpux*) # Its linker distinguishes data from code symbols
1387
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1388
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1391
symcode='[[BCDEGRST]]'
1394
symcode='[[BCDEGQRST]]'
1400
symcode='[[DFNSTU]]'
1404
# Handle CRLF in mingw tool chain
1408
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1412
# If we're using GNU nm, then use its standard symbol codes.
1413
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1414
symcode='[[ABCDGISTW]]'
1417
# Try without a prefix undercore, then with it.
1418
for ac_symprfx in "" "_"; do
1420
# Write the raw and C identifiers.
1421
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1423
# Check to see that the pipe works correctly.
1426
cat > conftest.$ac_ext <<EOF
1431
void nm_test_func(){}
1435
int main(){nm_test_var='a';nm_test_func();return(0);}
1438
if AC_TRY_EVAL(ac_compile); then
1439
# Now try to grab the symbols.
1441
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1442
# Try sorting and uniquifying the output.
1443
if sort "$nlist" | uniq > "$nlist"T; then
1444
mv -f "$nlist"T "$nlist"
1449
# Make sure that we snagged all the symbols we need.
1450
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1451
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1452
cat <<EOF > conftest.$ac_ext
1458
# Now generate the symbol file.
1459
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1461
cat <<EOF >> conftest.$ac_ext
1462
#if defined (__STDC__) && __STDC__
1463
# define lt_ptr void *
1465
# define lt_ptr char *
1469
/* The mapping between symbol names and symbols. */
1474
lt_preloaded_symbols[[]] =
1477
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1478
cat <<\EOF >> conftest.$ac_ext
1486
# Now try linking the two files.
1487
mv conftest.$ac_objext conftstm.$ac_objext
1489
save_CFLAGS="$CFLAGS"
1490
LIBS="conftstm.$ac_objext"
1491
CFLAGS="$CFLAGS$no_builtin_flag"
1492
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1496
CFLAGS="$save_CFLAGS"
1498
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1501
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1504
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1507
echo "$progname: failed program was:" >&AC_FD_CC
1508
cat conftest.$ac_ext >&5
1510
rm -f conftest* conftst*
1512
# Do not use the global_symbol_pipe unless it works.
1513
if test "$pipe_works" = yes; then
1516
lt_cv_sys_global_symbol_pipe=
1520
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1521
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1522
global_symbol_to_cdecl=
1523
global_symbol_to_c_name_address=
1525
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1526
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1528
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1530
AC_MSG_RESULT(failed)
1534
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1536
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1537
# ---------------------------------
1538
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1539
[# Find the correct PATH separator. Usually this is `:', but
1540
# DJGPP uses `;' like DOS.
1541
if test "X${PATH_SEPARATOR+set}" != Xset; then
1542
UNAME=${UNAME-`uname 2>/dev/null`}
1544
*-DOS) lt_cv_sys_path_separator=';' ;;
1545
*) lt_cv_sys_path_separator=':' ;;
1547
PATH_SEPARATOR=$lt_cv_sys_path_separator
1549
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1551
# _LT_AC_PROG_ECHO_BACKSLASH
1552
# --------------------------
1553
# Add some code to the start of the generated configure script which
1554
# will find an echo command which doesn't interpret backslashes.
1555
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1556
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1557
[AC_DIVERT_PUSH(NOTICE)])
1558
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1560
# Check that we are running under the correct shell.
1561
SHELL=${CONFIG_SHELL-/bin/sh}
1565
# Remove one level of quotation (which was required for Make).
1566
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1571
if test "X[$]1" = X--no-reexec; then
1572
# Discard the --no-reexec flag, and continue.
1574
elif test "X[$]1" = X--fallback-echo; then
1575
# Avoid inline document here, it may be left over
1577
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1578
# Yippee, $echo works!
1581
# Restart under the correct shell.
1582
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1585
if test "X[$]1" = X--fallback-echo; then
1586
# used as fallback echo
1594
# The HP-UX ksh and POSIX shell print the target directory to stdout
1596
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1598
if test -z "$ECHO"; then
1599
if test "X${echo_test_string+set}" != Xset; then
1600
# find a string as large as possible, as long as the shell can cope with it
1601
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1602
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1603
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1604
echo_test_string="`eval $cmd`" &&
1605
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1612
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1613
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1614
test "X$echo_testing_string" = "X$echo_test_string"; then
1617
# The Solaris, AIX, and Digital Unix default echo programs unquote
1618
# backslashes. This makes it impossible to quote backslashes using
1619
# echo "$something" | sed 's/\\/\\\\/g'
1621
# So, first we look for a working echo in the user's PATH.
1623
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1624
for dir in $PATH /usr/ucb; do
1625
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1626
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1627
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1628
test "X$echo_testing_string" = "X$echo_test_string"; then
1635
if test "X$echo" = Xecho; then
1636
# We didn't find a better echo, so look for alternatives.
1637
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1638
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1639
test "X$echo_testing_string" = "X$echo_test_string"; then
1640
# This shell has a builtin print -r that does the trick.
1642
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1643
test "X$CONFIG_SHELL" != X/bin/ksh; then
1644
# If we have ksh, try running configure again with it.
1645
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1646
export ORIGINAL_CONFIG_SHELL
1647
CONFIG_SHELL=/bin/ksh
1649
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1653
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1654
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1655
test "X$echo_testing_string" = "X$echo_test_string"; then
1656
# Cool, printf works
1658
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1659
test "X$echo_testing_string" = 'X\t' &&
1660
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1661
test "X$echo_testing_string" = "X$echo_test_string"; then
1662
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1664
SHELL="$CONFIG_SHELL"
1666
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1667
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1668
test "X$echo_testing_string" = 'X\t' &&
1669
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1670
test "X$echo_testing_string" = "X$echo_test_string"; then
1671
echo="$CONFIG_SHELL [$]0 --fallback-echo"
1673
# maybe with a smaller string...
1676
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1677
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1684
if test "$prev" != 'sed 50q "[$]0"'; then
1685
echo_test_string=`eval $prev`
1686
export echo_test_string
1687
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1689
# Oops. We lost completely, so just stick with echo.
1698
# Copy echo and quote the copy suitably for passing to libtool from
1699
# the Makefile, instead of quoting the original, which is used later.
1701
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1702
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1707
])# _LT_AC_PROG_ECHO_BACKSLASH
1709
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1710
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1711
# ------------------------------------------------------------------
1712
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1713
[if test "$cross_compiling" = yes; then :
1716
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1717
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1718
lt_status=$lt_dlunknown
1719
cat > conftest.$ac_ext <<EOF
1720
[#line __oline__ "configure"
1721
#include "confdefs.h"
1730
# define LT_DLGLOBAL RTLD_GLOBAL
1733
# define LT_DLGLOBAL DL_GLOBAL
1735
# define LT_DLGLOBAL 0
1739
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1740
find out it does not work in some platform. */
1741
#ifndef LT_DLLAZY_OR_NOW
1743
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1746
# define LT_DLLAZY_OR_NOW DL_LAZY
1749
# define LT_DLLAZY_OR_NOW RTLD_NOW
1752
# define LT_DLLAZY_OR_NOW DL_NOW
1754
# define LT_DLLAZY_OR_NOW 0
1762
extern "C" void exit (int);
1765
void fnord() { int i=42;}
1768
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1769
int status = $lt_dlunknown;
1773
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1774
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1775
/* dlclose (self); */
1781
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1782
(./conftest; exit; ) 2>/dev/null
1785
x$lt_dlno_uscore) $1 ;;
1786
x$lt_dlneed_uscore) $2 ;;
1787
x$lt_unknown|x*) $3 ;;
1790
# compilation failed
1795
])# _LT_AC_TRY_DLOPEN_SELF
1797
# AC_LIBTOOL_DLOPEN_SELF
1798
# -------------------
1799
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1800
[if test "x$enable_dlopen" != xyes; then
1801
enable_dlopen=unknown
1802
enable_dlopen_self=unknown
1803
enable_dlopen_self_static=unknown
1810
lt_cv_dlopen="load_add_on"
1812
lt_cv_dlopen_self=yes
1815
cygwin* | mingw* | pw32*)
1816
lt_cv_dlopen="LoadLibrary"
1821
AC_CHECK_FUNC([shl_load],
1822
[lt_cv_dlopen="shl_load"],
1823
[AC_CHECK_LIB([dld], [shl_load],
1824
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1825
[AC_CHECK_FUNC([dlopen],
1826
[lt_cv_dlopen="dlopen"],
1827
[AC_CHECK_LIB([dl], [dlopen],
1828
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1829
[AC_CHECK_LIB([svld], [dlopen],
1830
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1831
[AC_CHECK_LIB([dld], [dld_link],
1832
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1841
if test "x$lt_cv_dlopen" != xno; then
1847
case $lt_cv_dlopen in
1849
save_CPPFLAGS="$CPPFLAGS"
1850
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1851
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1853
save_LDFLAGS="$LDFLAGS"
1854
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1857
LIBS="$lt_cv_dlopen_libs $LIBS"
1859
AC_CACHE_CHECK([whether a program can dlopen itself],
1860
lt_cv_dlopen_self, [dnl
1861
_LT_AC_TRY_DLOPEN_SELF(
1862
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1863
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1866
if test "x$lt_cv_dlopen_self" = xyes; then
1867
LDFLAGS="$LDFLAGS $link_static_flag"
1868
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1869
lt_cv_dlopen_self_static, [dnl
1870
_LT_AC_TRY_DLOPEN_SELF(
1871
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1872
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1876
CPPFLAGS="$save_CPPFLAGS"
1877
LDFLAGS="$save_LDFLAGS"
1882
case $lt_cv_dlopen_self in
1883
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1884
*) enable_dlopen_self=unknown ;;
1887
case $lt_cv_dlopen_self_static in
1888
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1889
*) enable_dlopen_self_static=unknown ;;
1892
])# AC_LIBTOOL_DLOPEN_SELF
1894
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1895
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1896
# Sed substitution that helps us do robust quoting. It backslashifies
1897
# metacharacters that are still active within double-quoted strings.
1898
Xsed='sed -e s/^X//'
1899
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1901
# Same as above, but do not quote variable references.
1902
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1904
# Sed substitution to delay expansion of an escaped shell variable in a
1905
# double_quote_subst'ed string.
1906
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1912
default_ofile=libtool
1913
can_build_shared=yes
1915
# All known linkers require a `.a' archive for static linking (except M$VC,
1916
# which needs '.lib').
1918
ltmain="$ac_aux_dir/ltmain.sh"
1919
ofile="$default_ofile"
1920
with_gnu_ld="$lt_cv_prog_gnu_ld"
1921
need_locks="$enable_libtool_lock"
1924
old_CFLAGS="$CFLAGS"
1926
# Set sane defaults for various variables
1927
test -z "$AR" && AR=ar
1928
test -z "$AR_FLAGS" && AR_FLAGS=cru
1929
test -z "$AS" && AS=as
1930
test -z "$CC" && CC=cc
1931
test -z "$DLLTOOL" && DLLTOOL=dlltool
1932
test -z "$LD" && LD=ld
1933
test -z "$LN_S" && LN_S="ln -s"
1934
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1935
test -z "$NM" && NM=nm
1936
test -z "$OBJDUMP" && OBJDUMP=objdump
1937
test -z "$RANLIB" && RANLIB=:
1938
test -z "$STRIP" && STRIP=:
1939
test -z "$ac_objext" && ac_objext=o
1941
if test x"$host" != x"$build"; then
1942
ac_tool_prefix=${host_alias}-
1947
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1950
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1955
# AIX sometimes has problems with the GCC collect2 program. For some
1956
# reason, if we set the COLLECT_NAMES environment variable, the problems
1957
# vanish in a puff of smoke.
1958
if test "X${COLLECT_NAMES+set}" != Xset; then
1960
export COLLECT_NAMES
1965
# Determine commands to create old-style static archives.
1966
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1967
old_postinstall_cmds='chmod 644 $oldlib'
1968
old_postuninstall_cmds=
1970
if test -n "$RANLIB"; then
1973
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1976
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1979
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1982
# Allow CC to be a program name with arguments.
1986
AC_MSG_CHECKING([for objdir])
1987
rm -f .libs 2>/dev/null
1988
mkdir .libs 2>/dev/null
1989
if test -d .libs; then
1992
# MS-DOS does not allow filenames that begin with a dot.
1995
rmdir .libs 2>/dev/null
1996
AC_MSG_RESULT($objdir)
2000
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
2001
pic_mode="$withval", pic_mode=default)
2002
test -z "$pic_mode" && pic_mode=default
2004
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
2005
# in isolation, and that seeing it set (from the cache) indicates that
2006
# the associated values are set (in the cache) correctly too.
2007
AC_MSG_CHECKING([for $compiler option to produce PIC])
2008
AC_CACHE_VAL(lt_cv_prog_cc_pic,
2009
[ lt_cv_prog_cc_pic=
2010
lt_cv_prog_cc_shlib=
2012
lt_cv_prog_cc_static=
2013
lt_cv_prog_cc_no_builtin=
2014
lt_cv_prog_cc_can_build_shared=$can_build_shared
2016
if test "$GCC" = yes; then
2017
lt_cv_prog_cc_wl='-Wl,'
2018
lt_cv_prog_cc_static='-static'
2022
# Below there is a dirty hack to force normal static linking with -ldl
2023
# The problem is because libdl dynamically linked with both libc and
2024
# libC (AIX C++ library), which obviously doesn't included in libraries
2025
# list by gcc. This cause undefined symbols with -static flags.
2026
# This hack allows C programs to be linked with "-static -ldl", but
2027
# not sure about C++ programs.
2028
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
2031
# FIXME: we need at least 68020 code to build shared libraries, but
2032
# adding the `-m68020' flag to GCC prevents building anything better,
2034
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
2036
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2037
# PIC is the default for these OSes.
2039
darwin* | rhapsody*)
2040
# PIC is the default on this platform
2041
# Common symbols not allowed in MH_DYLIB files
2042
lt_cv_prog_cc_pic='-fno-common'
2044
cygwin* | mingw* | pw32* | os2*)
2045
# This hack is so that the source file can tell whether it is being
2046
# built for inclusion in a dll (and should export symbols for example).
2047
lt_cv_prog_cc_pic='-DDLL_EXPORT'
2050
if test -d /usr/nec; then
2051
lt_cv_prog_cc_pic=-Kconform_pic
2055
lt_cv_prog_cc_pic='-fPIC'
2059
# PORTME Check for PIC flags for the system compiler.
2061
aix3* | aix4* | aix5*)
2062
lt_cv_prog_cc_wl='-Wl,'
2063
# All AIX code is PIC.
2064
if test "$host_cpu" = ia64; then
2065
# AIX 5 now supports IA64 processor
2066
lt_cv_prog_cc_static='-Bstatic'
2068
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
2072
hpux9* | hpux10* | hpux11*)
2073
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
2074
lt_cv_prog_cc_wl='-Wl,'
2075
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2076
lt_cv_prog_cc_pic='+Z'
2079
irix5* | irix6* | nonstopux*)
2080
lt_cv_prog_cc_wl='-Wl,'
2081
lt_cv_prog_cc_static='-non_shared'
2082
# PIC (with -KPIC) is the default.
2085
cygwin* | mingw* | pw32* | os2*)
2086
# This hack is so that the source file can tell whether it is being
2087
# built for inclusion in a dll (and should export symbols for example).
2088
lt_cv_prog_cc_pic='-DDLL_EXPORT'
2092
lt_cv_prog_cc_pic='-KPIC'
2093
lt_cv_prog_cc_static='-Bstatic'
2096
osf3* | osf4* | osf5*)
2097
# All OSF/1 code is PIC.
2098
lt_cv_prog_cc_wl='-Wl,'
2099
lt_cv_prog_cc_static='-non_shared'
2103
lt_cv_prog_cc_pic='-Kpic'
2104
lt_cv_prog_cc_static='-dn'
2105
lt_cv_prog_cc_shlib='-belf'
2109
lt_cv_prog_cc_pic='-KPIC'
2110
lt_cv_prog_cc_static='-Bstatic'
2111
lt_cv_prog_cc_wl='-Wl,'
2115
lt_cv_prog_cc_pic='-PIC'
2116
lt_cv_prog_cc_static='-Bstatic'
2117
lt_cv_prog_cc_wl='-Qoption ld '
2120
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2121
lt_cv_prog_cc_pic='-KPIC'
2122
lt_cv_prog_cc_static='-Bstatic'
2123
lt_cv_prog_cc_wl='-Wl,'
2127
lt_cv_prog_cc_pic='-pic'
2128
lt_cv_prog_cc_static='-Bstatic'
2132
if test -d /usr/nec ;then
2133
lt_cv_prog_cc_pic='-Kconform_pic'
2134
lt_cv_prog_cc_static='-Bstatic'
2139
lt_cv_prog_cc_can_build_shared=no
2144
if test -z "$lt_cv_prog_cc_pic"; then
2145
AC_MSG_RESULT([none])
2147
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
2149
# Check to make sure the pic_flag actually works.
2150
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
2151
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
2152
save_CFLAGS="$CFLAGS"
2153
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2154
AC_TRY_COMPILE([], [], [dnl
2156
hpux9* | hpux10* | hpux11*)
2157
# On HP-UX, both CC and GCC only warn that PIC is supported... then
2158
# they create non-PIC objects. So, if there were any warnings, we
2159
# assume that PIC is not supported.
2160
if test -s conftest.err; then
2161
lt_cv_prog_cc_pic_works=no
2163
lt_cv_prog_cc_pic_works=yes
2167
lt_cv_prog_cc_pic_works=yes
2171
lt_cv_prog_cc_pic_works=no
2173
CFLAGS="$save_CFLAGS"
2176
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2178
lt_cv_prog_cc_can_build_shared=no
2180
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2183
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2186
# Check for any special shared library compilation flags.
2187
if test -n "$lt_cv_prog_cc_shlib"; then
2188
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2189
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2191
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2192
lt_cv_prog_cc_can_build_shared=no
2196
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2197
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2198
lt_cv_prog_cc_static_works=no
2199
save_LDFLAGS="$LDFLAGS"
2200
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2201
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2202
LDFLAGS="$save_LDFLAGS"
2205
# Belt *and* braces to stop my trousers falling down:
2206
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2207
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2209
pic_flag="$lt_cv_prog_cc_pic"
2210
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2211
wl="$lt_cv_prog_cc_wl"
2212
link_static_flag="$lt_cv_prog_cc_static"
2213
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2214
can_build_shared="$lt_cv_prog_cc_can_build_shared"
2217
# Check to see if options -o and -c are simultaneously supported by compiler
2218
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2219
AC_CACHE_VAL([lt_cv_compiler_c_o], [
2220
$rm -r conftest 2>/dev/null
2223
echo "int some_variable = 0;" > conftest.$ac_ext
2225
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2226
# that will create temporary files in the current directory regardless of
2227
# the output directory. Thus, making CWD read-only will cause this test
2228
# to fail, enabling locking or at least warning the user not to do parallel
2231
save_CFLAGS="$CFLAGS"
2232
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2234
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2235
# The compiler can only warn and ignore the option if not recognized
2236
# So say no if there are warnings
2237
if test -s out/conftest.err; then
2238
lt_cv_compiler_c_o=no
2240
lt_cv_compiler_c_o=yes
2243
# Append any errors to the config.log.
2244
cat out/conftest.err 1>&AC_FD_CC
2245
lt_cv_compiler_c_o=no
2247
CFLAGS="$save_CFLAGS"
2253
$rm -r conftest 2>/dev/null
2255
compiler_c_o=$lt_cv_compiler_c_o
2256
AC_MSG_RESULT([$compiler_c_o])
2258
if test x"$compiler_c_o" = x"yes"; then
2259
# Check to see if we can write to a .lo
2260
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2261
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2262
lt_cv_compiler_o_lo=no
2263
save_CFLAGS="$CFLAGS"
2264
CFLAGS="$CFLAGS -c -o conftest.lo"
2265
save_objext="$ac_objext"
2267
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2268
# The compiler can only warn and ignore the option if not recognized
2269
# So say no if there are warnings
2270
if test -s conftest.err; then
2271
lt_cv_compiler_o_lo=no
2273
lt_cv_compiler_o_lo=yes
2276
ac_objext="$save_objext"
2277
CFLAGS="$save_CFLAGS"
2279
compiler_o_lo=$lt_cv_compiler_o_lo
2280
AC_MSG_RESULT([$compiler_o_lo])
2285
# Check to see if we can do hard links to lock some files if needed
2286
hard_links="nottested"
2287
if test "$compiler_c_o" = no && test "$need_locks" != no; then
2288
# do not overwrite the value of need_locks provided by the user
2289
AC_MSG_CHECKING([if we can lock with hard links])
2292
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2294
ln conftest.a conftest.b 2>&5 || hard_links=no
2295
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2296
AC_MSG_RESULT([$hard_links])
2297
if test "$hard_links" = no; then
2298
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2305
if test "$GCC" = yes; then
2306
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2307
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2308
echo "int some_variable = 0;" > conftest.$ac_ext
2309
save_CFLAGS="$CFLAGS"
2310
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2311
compiler_rtti_exceptions=no
2312
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2313
# The compiler can only warn and ignore the option if not recognized
2314
# So say no if there are warnings
2315
if test -s conftest.err; then
2316
compiler_rtti_exceptions=no
2318
compiler_rtti_exceptions=yes
2321
CFLAGS="$save_CFLAGS"
2322
AC_MSG_RESULT([$compiler_rtti_exceptions])
2324
if test "$compiler_rtti_exceptions" = "yes"; then
2325
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2327
no_builtin_flag=' -fno-builtin'
2331
# See if the linker supports building shared libraries.
2332
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2334
allow_undefined_flag=
2336
need_lib_prefix=unknown
2337
need_version=unknown
2338
# when you set need_version to no, make sure it does not cause -set_version
2339
# flags to be left without arguments
2341
archive_expsym_cmds=
2342
old_archive_from_new_cmds=
2343
old_archive_from_expsyms_cmds=
2344
export_dynamic_flag_spec=
2345
whole_archive_flag_spec=
2346
thread_safe_flag_spec=
2347
hardcode_into_libs=no
2348
hardcode_libdir_flag_spec=
2349
hardcode_libdir_separator=
2352
hardcode_shlibpath_var=unsupported
2354
link_all_deplibs=unknown
2355
always_export_symbols=no
2356
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2357
# include_expsyms should be a list of space-separated symbols to be *always*
2358
# included in the symbol list
2360
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2361
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2362
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2363
# as well as any symbol that contains `d'.
2364
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2365
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2366
# platforms (ab)use it in PIC code, but their linkers get confused if
2367
# the symbol is explicitly referenced. Since portable code cannot
2368
# rely on this symbol name, it's probably fine to never include it in
2369
# preloaded symbol tables.
2370
extract_expsyms_cmds=
2373
cygwin* | mingw* | pw32*)
2374
# FIXME: the MSVC++ port hasn't been tested in a loooong time
2375
# When not using gcc, we currently assume that we are using
2376
# Microsoft Visual C++.
2377
if test "$GCC" != yes; then
2387
if test "$with_gnu_ld" = yes; then
2388
# If archive_cmds runs LD, not CC, wlarc should be empty
2391
# See if GNU ld supports shared libraries.
2393
aix3* | aix4* | aix5*)
2394
# On AIX, the GNU linker is very broken
2395
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2399
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2400
*** to be unable to reliably create shared libraries on AIX.
2401
*** Therefore, libtool is disabling shared libraries support. If you
2402
*** really care for shared libraries, you may want to modify your PATH
2403
*** so that a non-GNU linker is found, and then restart.
2409
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)'
2410
hardcode_libdir_flag_spec='-L$libdir'
2411
hardcode_minus_L=yes
2413
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2414
# that the semantics of dynamic libraries on AmigaOS, at least up
2415
# to version 4, is to share data among multiple programs linked
2416
# with the same dynamic library. Since this doesn't match the
2417
# behavior of shared libraries on other platforms, we can use
2423
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2424
allow_undefined_flag=unsupported
2425
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2426
# support --undefined. This deserves some investigation. FIXME
2427
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2433
cygwin* | mingw* | pw32*)
2434
# hardcode_libdir_flag_spec is actually meaningless, as there is
2435
# no search path for DLLs.
2436
hardcode_libdir_flag_spec='-L$libdir'
2437
allow_undefined_flag=unsupported
2438
always_export_symbols=yes
2440
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2441
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2442
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2443
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2444
else $CC -o impgen impgen.c ; fi)~
2445
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2447
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2449
# cygwin and mingw dlls have different entry points and sets of symbols
2451
# FIXME: what about values for MSVC?
2452
dll_entry=__cygwin_dll_entry@12
2453
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2457
dll_entry=_DllMainCRTStartup@12
2458
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2462
# mingw and cygwin differ, and it's simplest to just exclude the union
2463
# of the two symbol sets.
2464
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2466
# recent cygwin and mingw systems supply a stub DllMain which the user
2467
# can override, but on older systems we have to supply one (in ltdll.c)
2468
if test "x$lt_cv_need_dllmain" = "xyes"; then
2469
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2470
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2471
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2477
# Extract the symbol export list from an `--export-all' def file,
2478
# then regenerate the def file from the symbol export list, so that
2479
# the compiled dll only exports the symbol export list.
2480
# Be careful not to strip the DATA tag left be newer dlltools.
2481
export_symbols_cmds="$ltdll_cmds"'
2482
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2483
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2485
# If the export-symbols file already is a .def file (1st line
2486
# is EXPORTS), use it as is.
2487
# If DATA tags from a recent dlltool are present, honour them!
2488
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2489
cp $export_symbols $output_objdir/$soname-def;
2491
echo EXPORTS > $output_objdir/$soname-def;
2493
cat $export_symbols | while read symbol; do
2496
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2497
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2498
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2500
_lt_hint=`expr 1 + \$_lt_hint`;
2504
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2505
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2506
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2507
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2508
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2512
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2513
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2516
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2517
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2522
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2526
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2527
*** create shared libraries on Solaris systems. Therefore, libtool
2528
*** is disabling shared libraries support. We urge you to upgrade GNU
2529
*** binutils to release 2.9.1 or newer. Another option is to modify
2530
*** your PATH or compiler configuration so that the native linker is
2531
*** used, and then restart.
2534
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2535
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2536
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2543
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2546
hardcode_shlibpath_var=no
2550
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2551
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2552
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2559
if test "$ld_shlibs" = yes; then
2560
runpath_var=LD_RUN_PATH
2561
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2562
export_dynamic_flag_spec='${wl}--export-dynamic'
2564
cygwin* | mingw* | pw32*)
2565
# dlltool doesn't understand --whole-archive et. al.
2566
whole_archive_flag_spec=
2569
# ancient GNU ld didn't support --whole-archive et. al.
2570
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2571
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2573
whole_archive_flag_spec=
2579
# PORTME fill in a description of your system's linker (not GNU ld)
2582
allow_undefined_flag=unsupported
2583
always_export_symbols=yes
2584
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'
2585
# Note: this linker hardcodes the directories in LIBPATH if there
2586
# are no directories specified by -L.
2587
hardcode_minus_L=yes
2588
if test "$GCC" = yes && test -z "$link_static_flag"; then
2589
# Neither direct hardcoding nor static linking is supported with a
2591
hardcode_direct=unsupported
2596
if test "$host_cpu" = ia64; then
2597
# On IA64, the linker does run time linking by default, so we don't
2598
# have to do anything special.
2599
aix_use_runtimelinking=no
2600
exp_sym_flag='-Bexport'
2603
aix_use_runtimelinking=no
2605
# Test if we are trying to use run time linking or normal
2606
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
2607
# need to do runtime linking.
2608
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2609
for ld_flag in $LDFLAGS; do
2612
aix_use_runtimelinking=yes
2619
exp_sym_flag='-bexport'
2620
no_entry_flag='-bnoentry'
2623
# When large executables or shared objects are built, AIX ld can
2624
# have problems creating the table of contents. If linking a library
2625
# or program results in "error TOC overflow" add -mminimal-toc to
2626
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2627
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2631
hardcode_libdir_separator=':'
2632
if test "$GCC" = yes; then
2633
case $host_os in aix4.[[012]]|aix4.[[012]].*)
2634
collect2name=`${CC} -print-prog-name=collect2`
2635
if test -f "$collect2name" && \
2636
strings "$collect2name" | grep resolve_lib_name >/dev/null
2638
# We have reworked collect2
2641
# We have old collect2
2642
hardcode_direct=unsupported
2643
# It fails to find uninstalled libraries when the uninstalled
2644
# path is not listed in the libpath. Setting hardcode_minus_L
2645
# to unsupported forces relinking
2646
hardcode_minus_L=yes
2647
hardcode_libdir_flag_spec='-L$libdir'
2648
hardcode_libdir_separator=
2652
shared_flag='-shared'
2655
if test "$host_cpu" = ia64; then
2656
shared_flag='${wl}-G'
2658
if test "$aix_use_runtimelinking" = yes; then
2659
shared_flag='${wl}-G'
2661
shared_flag='${wl}-bM:SRE'
2666
# It seems that -bexpall can do strange things, so it is better to
2667
# generate a list of symbols to export.
2668
always_export_symbols=yes
2669
if test "$aix_use_runtimelinking" = yes; then
2670
# Warning - without using the other runtime loading flags (-brtl),
2671
# -berok will link without error, but may produce a broken library.
2672
allow_undefined_flag='-berok'
2673
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2674
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2676
if test "$host_cpu" = ia64; then
2677
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2678
allow_undefined_flag="-z nodefs"
2679
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2681
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2682
# Warning - without using the other run time loading flags,
2683
# -berok will link without error, but may produce a broken library.
2684
allow_undefined_flag='${wl}-berok'
2685
# This is a bit strange, but is similar to how AIX traditionally builds
2686
# it's shared libraries.
2687
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2693
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)'
2694
hardcode_libdir_flag_spec='-L$libdir'
2695
hardcode_minus_L=yes
2696
# see comment about different semantics on the GNU ld section
2700
cygwin* | mingw* | pw32*)
2701
# When not using gcc, we currently assume that we are using
2702
# Microsoft Visual C++.
2703
# hardcode_libdir_flag_spec is actually meaningless, as there is
2704
# no search path for DLLs.
2705
hardcode_libdir_flag_spec=' '
2706
allow_undefined_flag=unsupported
2707
# Tell ltmain to make .lib files, not .a files.
2709
# FIXME: Setting linknames here is a bad hack.
2710
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2711
# The linker will automatically build a .lib file if we build a DLL.
2712
old_archive_from_new_cmds='true'
2713
# FIXME: Should let the user specify the lib program.
2714
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2715
fix_srcfile_path='`cygpath -w "$srcfile"`'
2718
darwin* | rhapsody*)
2720
rhapsody* | darwin1.[[012]])
2721
allow_undefined_flag='-undefined suppress'
2724
allow_undefined_flag='-flat_namespace -undefined suppress'
2727
# FIXME: Relying on posixy $() will cause problems for
2728
# cross-compilation, but unfortunately the echo tests do not
2729
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
2730
# `"' quotes if we put them in here... so don't!
2731
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2732
# We need to add '_' to the symbols in $export_symbols first
2733
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2735
hardcode_shlibpath_var=no
2736
whole_archive_flag_spec='-all_load $convenience'
2743
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2744
# support. Future versions do this automatically, but an explicit c++rt0.o
2745
# does not break anything, and helps significantly (at the cost of a little
2748
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2749
hardcode_libdir_flag_spec='-R$libdir'
2751
hardcode_shlibpath_var=no
2754
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
2756
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2758
hardcode_minus_L=yes
2759
hardcode_shlibpath_var=no
2762
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2764
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2765
hardcode_libdir_flag_spec='-R$libdir'
2767
hardcode_shlibpath_var=no
2770
hpux9* | hpux10* | hpux11*)
2772
hpux9*) 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' ;;
2773
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2775
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2776
hardcode_libdir_separator=:
2778
hardcode_minus_L=yes # Not in the search PATH, but as the default
2779
# location of the library.
2780
export_dynamic_flag_spec='${wl}-E'
2783
irix5* | irix6* | nonstopux*)
2784
if test "$GCC" = yes; then
2785
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'
2786
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2788
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'
2789
hardcode_libdir_flag_spec='-rpath $libdir'
2791
hardcode_libdir_separator=:
2792
link_all_deplibs=yes
2796
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2797
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2799
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2801
hardcode_libdir_flag_spec='-R$libdir'
2803
hardcode_shlibpath_var=no
2807
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2809
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2810
hardcode_libdir_separator=:
2811
hardcode_shlibpath_var=no
2816
hardcode_shlibpath_var=no
2817
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2818
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2819
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2820
export_dynamic_flag_spec='${wl}-E'
2823
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2824
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2825
hardcode_libdir_flag_spec='-R$libdir'
2828
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2829
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2836
hardcode_libdir_flag_spec='-L$libdir'
2837
hardcode_minus_L=yes
2838
allow_undefined_flag=unsupported
2839
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'
2840
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2844
if test "$GCC" = yes; then
2845
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2846
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'
2848
allow_undefined_flag=' -expect_unresolved \*'
2849
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'
2851
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2852
hardcode_libdir_separator=:
2855
osf4* | osf5*) # as osf3* with the addition of -msym flag
2856
if test "$GCC" = yes; then
2857
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2858
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'
2859
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2861
allow_undefined_flag=' -expect_unresolved \*'
2862
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'
2863
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2864
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2866
#Both c and cxx compiler support -rpath directly
2867
hardcode_libdir_flag_spec='-rpath $libdir'
2869
hardcode_libdir_separator=:
2873
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2874
hardcode_shlibpath_var=no
2875
runpath_var=LD_RUN_PATH
2876
hardcode_runpath_var=yes
2877
export_dynamic_flag_spec='${wl}-Bexport'
2881
# gcc --version < 3.0 without binutils cannot create self contained
2882
# shared libraries reliably, requiring libgcc.a to resolve some of
2883
# the object symbols generated in some cases. Libraries that use
2884
# assert need libgcc.a to resolve __eprintf, for example. Linking
2885
# a copy of libgcc.a into every shared library to guarantee resolving
2886
# such symbols causes other problems: According to Tim Van Holder
2887
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2888
# (to the application) exception stack for one thing.
2889
no_undefined_flag=' -z defs'
2890
if test "$GCC" = yes; then
2891
case `$CC --version 2>/dev/null` in
2895
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2896
*** create self contained shared libraries on Solaris systems, without
2897
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2898
*** -no-undefined support, which will at least allow you to build shared
2899
*** libraries. However, you may find that when you link such libraries
2900
*** into an application without using GCC, you have to manually add
2901
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2902
*** upgrade to a newer version of GCC. Another option is to rebuild your
2903
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2910
# $CC -shared without GNU ld will not create a library from C++
2911
# object files and a static libstdc++, better avoid it by now
2912
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2913
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2914
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2915
hardcode_libdir_flag_spec='-R$libdir'
2916
hardcode_shlibpath_var=no
2918
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2919
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2920
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2922
link_all_deplibs=yes
2926
if test "x$host_vendor" = xsequent; then
2927
# Use $CC to link under sequent, because it throws in some extra .o
2928
# files that make .init and .fini sections work.
2929
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2931
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2933
hardcode_libdir_flag_spec='-L$libdir'
2935
hardcode_minus_L=yes
2936
hardcode_shlibpath_var=no
2940
case $host_vendor in
2942
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2943
hardcode_direct=yes # is this really true???
2946
## LD is ld it makes a PLAMLIB
2947
## CC just makes a GrossModule.
2948
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2949
reload_cmds='$CC -r -o $output$reload_objs'
2953
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2954
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2957
runpath_var='LD_RUN_PATH'
2958
hardcode_shlibpath_var=no
2962
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2963
hardcode_shlibpath_var=no
2964
export_dynamic_flag_spec='-Bexport'
2968
no_undefined_flag=' -z text'
2969
# $CC -shared without GNU ld will not create a library from C++
2970
# object files and a static libstdc++, better avoid it by now
2971
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2972
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2973
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2974
hardcode_libdir_flag_spec=
2975
hardcode_shlibpath_var=no
2976
runpath_var='LD_RUN_PATH'
2980
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2981
hardcode_libdir_flag_spec='-L$libdir'
2982
hardcode_shlibpath_var=no
2986
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2987
hardcode_libdir_flag_spec='-L$libdir'
2988
hardcode_shlibpath_var=no
2992
if test -d /usr/nec; then
2993
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2994
hardcode_shlibpath_var=no
2995
runpath_var=LD_RUN_PATH
2996
hardcode_runpath_var=yes
3002
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
3005
hardcode_shlibpath_var=no
3006
hardcode_runpath_var=yes
3007
runpath_var=LD_RUN_PATH
3010
sysv5uw7* | unixware7*)
3011
no_undefined_flag='${wl}-z ${wl}text'
3012
if test "$GCC" = yes; then
3013
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3015
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3017
runpath_var='LD_RUN_PATH'
3018
hardcode_shlibpath_var=no
3026
AC_MSG_RESULT([$ld_shlibs])
3027
test "$ld_shlibs" = no && can_build_shared=no
3029
# Check hardcoding attributes.
3030
AC_MSG_CHECKING([how to hardcode library paths into programs])
3032
if test -n "$hardcode_libdir_flag_spec" || \
3033
test -n "$runpath_var"; then
3035
# We can hardcode non-existant directories.
3036
if test "$hardcode_direct" != no &&
3037
# If the only mechanism to avoid hardcoding is shlibpath_var, we
3038
# have to relink, otherwise we might link with an installed library
3039
# when we should be linking with a yet-to-be-installed one
3040
## test "$hardcode_shlibpath_var" != no &&
3041
test "$hardcode_minus_L" != no; then
3042
# Linking always hardcodes the temporary library directory.
3043
hardcode_action=relink
3045
# We can link without hardcoding, and we can hardcode nonexisting dirs.
3046
hardcode_action=immediate
3049
# We cannot hardcode anything, or else we can only hardcode existing
3051
hardcode_action=unsupported
3053
AC_MSG_RESULT([$hardcode_action])
3057
AC_MSG_CHECKING([whether stripping libraries is possible])
3058
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3059
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3060
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3061
AC_MSG_RESULT([yes])
3066
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3067
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3069
# PORTME Fill in your ld.so characteristics
3070
AC_MSG_CHECKING([dynamic linker characteristics])
3072
libname_spec='lib$name'
3079
shlibpath_overrides_runpath=unknown
3081
dynamic_linker="$host_os ld.so"
3082
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
3083
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
3088
library_names_spec='${libname}${release}.so$versuffix $libname.a'
3089
shlibpath_var=LIBPATH
3091
# AIX has no versioning support, so we append a major version to the name.
3092
soname_spec='${libname}${release}.so$major'
3099
hardcode_into_libs=yes
3100
if test "$host_cpu" = ia64; then
3101
# AIX 5 supports IA64
3102
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3103
shlibpath_var=LD_LIBRARY_PATH
3105
# With GCC up to 2.95.x, collect2 would create an import file
3106
# for dependence libraries. The import file would start with
3107
# the line `#! .'. This would cause the generated library to
3108
# depend on `.', always an invalid library. This was fixed in
3109
# development snapshots of GCC prior to 3.0.
3111
aix4 | aix4.[[01]] | aix4.[[01]].*)
3112
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3114
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3121
# AIX (on Power*) has no versioning support, so currently we can
3122
# not hardcode correct soname into executable. Probably we can
3123
# add versioning support to collect2, so additional links can
3124
# be useful in future.
3125
if test "$aix_use_runtimelinking" = yes; then
3126
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
3127
# instead of lib<name>.a to let people know that these are not
3128
# typical AIX shared libraries.
3129
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3131
# We preserve .a as extension for shared libraries through AIX4.2
3132
# and later when we are not doing run time linking.
3133
library_names_spec='${libname}${release}.a $libname.a'
3134
soname_spec='${libname}${release}.so$major'
3136
shlibpath_var=LIBPATH
3138
hardcode_into_libs=yes
3142
library_names_spec='$libname.ixlibrary $libname.a'
3143
# Create ${libname}_ixlibrary.a entries in /sys/libs.
3144
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'
3148
library_names_spec='${libname}.so'
3149
dynamic_linker="$host_os ld.so"
3150
shlibpath_var=LIBRARY_PATH
3156
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3157
soname_spec='${libname}${release}.so$major'
3158
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3159
shlibpath_var=LD_LIBRARY_PATH
3160
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3161
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3162
export_dynamic_flag_spec=-rdynamic
3163
# the default ld.so.conf also contains /usr/contrib/lib and
3164
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3165
# libtool to hard-code these into programs
3168
cygwin* | mingw* | pw32*)
3169
version_type=windows
3172
case $GCC,$host_os in
3174
library_names_spec='$libname.dll.a'
3175
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3176
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3177
dldir=$destdir/`dirname \$dlpath`~
3178
test -d \$dldir || mkdir -p \$dldir~
3179
$install_prog .libs/$dlname \$dldir/$dlname'
3180
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3181
dlpath=$dir/\$dldll~
3185
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3186
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
3189
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3192
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3195
dynamic_linker='Win32 ld.exe'
3196
# FIXME: first we should search . and the directory the executable is in
3200
darwin* | rhapsody*)
3201
dynamic_linker="$host_os dyld"
3205
# FIXME: Relying on posixy $() will cause problems for
3206
# cross-compilation, but unfortunately the echo tests do not
3207
# yet detect zsh echo's removal of \ escapes.
3208
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
3209
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3210
shlibpath_overrides_runpath=yes
3211
shlibpath_var=DYLD_LIBRARY_PATH
3219
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3220
version_type=freebsd-$objformat
3221
case $version_type in
3223
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3228
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3232
shlibpath_var=LD_LIBRARY_PATH
3235
shlibpath_overrides_runpath=yes
3238
shlibpath_overrides_runpath=no
3239
hardcode_into_libs=yes
3248
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3249
soname_spec='${libname}${release}.so$major'
3250
shlibpath_var=LD_LIBRARY_PATH
3251
hardcode_into_libs=yes
3254
hpux9* | hpux10* | hpux11*)
3255
# Give a soname corresponding to the major version so that dld.sl refuses to
3256
# link against other versions.
3257
dynamic_linker="$host_os dld.sl"
3261
shlibpath_var=SHLIB_PATH
3262
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3263
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3264
soname_spec='${libname}${release}.sl$major'
3265
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3266
postinstall_cmds='chmod 555 $lib'
3269
irix5* | irix6* | nonstopux*)
3271
nonstopux*) version_type=nonstopux ;;
3272
*) version_type=irix ;;
3276
soname_spec='${libname}${release}.so$major'
3277
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3279
irix5* | nonstopux*)
3283
case $LD in # libtool.m4 will add one of these switches to LD
3284
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3285
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3286
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3287
*) libsuff= shlibsuff= libmagic=never-match;;
3291
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3292
shlibpath_overrides_runpath=no
3293
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3294
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3297
# No shared lib support for Linux oldld, aout, or coff.
3298
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3302
# This must be Linux ELF.
3307
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3308
soname_spec='${libname}${release}.so$major'
3309
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3310
shlibpath_var=LD_LIBRARY_PATH
3311
shlibpath_overrides_runpath=no
3312
# This implies no fast_install, which is unacceptable.
3313
# Some rework will be needed to allow for fast_install
3314
# before this can be enabled.
3315
hardcode_into_libs=yes
3317
case $host_cpu:$lt_cv_cc_64bit_output in
3318
powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
3319
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
3320
sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
3324
# We used to test for /lib/ld.so.1 and disable shared libraries on
3325
# powerpc, because MkLinux only supported shared libraries with the
3326
# GNU dynamic linker. Since this was broken with cross compilers,
3327
# most powerpc-linux boxes support dynamic linking these days and
3328
# people can always --disable-shared, the test was removed, and we
3329
# assume the GNU/Linux dynamic linker is in use.
3330
dynamic_linker='GNU/Linux ld.so'
3337
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3338
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3339
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3340
dynamic_linker='NetBSD (a.out) ld.so'
3342
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3343
soname_spec='${libname}${release}.so$major'
3344
dynamic_linker='NetBSD ld.elf_so'
3346
shlibpath_var=LD_LIBRARY_PATH
3347
shlibpath_overrides_runpath=yes
3348
hardcode_into_libs=yes
3353
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3354
shlibpath_var=LD_LIBRARY_PATH
3355
shlibpath_overrides_runpath=yes
3362
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3364
openbsd2.[[89]] | openbsd2.[[89]].*)
3365
shlibpath_overrides_runpath=no
3368
shlibpath_overrides_runpath=yes
3372
shlibpath_overrides_runpath=yes
3374
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3375
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3376
shlibpath_var=LD_LIBRARY_PATH
3380
libname_spec='$name'
3382
library_names_spec='$libname.dll $libname.a'
3383
dynamic_linker='OS/2 ld.exe'
3384
shlibpath_var=LIBPATH
3387
osf3* | osf4* | osf5*)
3390
soname_spec='${libname}${release}.so$major'
3391
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3392
shlibpath_var=LD_LIBRARY_PATH
3393
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3394
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3395
hardcode_into_libs=yes
3400
soname_spec='${libname}${release}.so$major'
3401
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3402
shlibpath_var=LD_LIBRARY_PATH
3409
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3410
soname_spec='${libname}${release}.so$major'
3411
shlibpath_var=LD_LIBRARY_PATH
3412
shlibpath_overrides_runpath=yes
3413
hardcode_into_libs=yes
3414
# ldd complains unless libraries are executable
3415
postinstall_cmds='chmod +x $lib'
3420
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3421
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3422
shlibpath_var=LD_LIBRARY_PATH
3423
shlibpath_overrides_runpath=yes
3424
if test "$with_gnu_ld" = yes; then
3430
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3432
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3433
soname_spec='${libname}${release}.so$major'
3434
shlibpath_var=LD_LIBRARY_PATH
3435
case $host_vendor in
3437
shlibpath_overrides_runpath=no
3439
export_dynamic_flag_spec='${wl}-Blargedynsym'
3440
runpath_var=LD_RUN_PATH
3448
shlibpath_overrides_runpath=no
3449
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3456
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3457
soname_spec='${libname}${release}.so$major'
3458
shlibpath_var=LD_LIBRARY_PATH
3465
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3466
soname_spec='${libname}${release}.so$major'
3467
shlibpath_var=LD_LIBRARY_PATH
3471
if test -d /usr/nec ;then
3473
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3474
soname_spec='$libname.so.$major'
3475
shlibpath_var=LD_LIBRARY_PATH
3483
AC_MSG_RESULT([$dynamic_linker])
3484
test "$dynamic_linker" = no && can_build_shared=no
3486
# Report the final consequences.
3487
AC_MSG_CHECKING([if libtool supports shared libraries])
3488
AC_MSG_RESULT([$can_build_shared])
3490
AC_MSG_CHECKING([whether to build shared libraries])
3491
test "$can_build_shared" = "no" && enable_shared=no
3493
# On AIX, shared libraries and static libraries use the same namespace, and
3494
# are all built from PIC.
3497
test "$enable_shared" = yes && enable_static=no
3498
if test -n "$RANLIB"; then
3499
archive_cmds="$archive_cmds~\$RANLIB \$lib"
3500
postinstall_cmds='$RANLIB $lib'
3505
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3506
test "$enable_shared" = yes && enable_static=no
3510
AC_MSG_RESULT([$enable_shared])
3512
AC_MSG_CHECKING([whether to build static libraries])
3513
# Make sure either enable_shared or enable_static is yes.
3514
test "$enable_shared" = yes || enable_static=yes
3515
AC_MSG_RESULT([$enable_static])
3517
if test "$hardcode_action" = relink; then
3518
# Fast installation is not supported
3519
enable_fast_install=no
3520
elif test "$shlibpath_overrides_runpath" = yes ||
3521
test "$enable_shared" = no; then
3522
# Fast installation is not necessary
3523
enable_fast_install=needless
3526
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3527
if test "$GCC" = yes; then
3528
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3531
AC_LIBTOOL_DLOPEN_SELF
3533
if test "$enable_shared" = yes && test "$GCC" = yes; then
3534
case $archive_cmds in
3536
# FIXME: we may have to deal with multi-command sequences.
3539
# Test whether the compiler implicitly links with -lc since on some
3540
# systems, -lgcc has to come before -lc. If gcc already passes -lc
3541
# to ld, don't add -lc before -lgcc.
3542
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3543
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3545
echo 'static int dummy;' > conftest.$ac_ext
3547
if AC_TRY_EVAL(ac_compile); then
3550
libobjs=conftest.$ac_objext
3552
wl=$lt_cv_prog_cc_wl
3558
save_allow_undefined_flag=$allow_undefined_flag
3559
allow_undefined_flag=
3560
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3562
lt_cv_archive_cmds_need_lc=no
3564
lt_cv_archive_cmds_need_lc=yes
3566
allow_undefined_flag=$save_allow_undefined_flag
3568
cat conftest.err 1>&5
3570
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3574
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3576
# The second clause should only fire when bootstrapping the
3577
# libtool distribution, otherwise you forgot to ship ltmain.sh
3578
# with your package, and you will get complaints that there are
3579
# no rules to generate ltmain.sh.
3580
if test -f "$ltmain"; then
3583
# If there is no Makefile yet, we rely on a make rule to execute
3584
# `config.status --recheck' to rerun these tests and create the
3585
# libtool script then.
3586
test -f Makefile && make "$ltmain"
3589
if test -f "$ltmain"; then
3590
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3593
echo creating $ofile
3595
# Now quote all the things that may contain metacharacters while being
3596
# careful not to overquote the AC_SUBSTed values. We take copies of the
3597
# variables and quote the copies for generation of the libtool script.
3598
for var in echo old_CC old_CFLAGS SED \
3599
AR AR_FLAGS CC LD LN_S NM SHELL \
3600
reload_flag reload_cmds wl \
3601
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3602
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3603
library_names_spec soname_spec \
3604
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3605
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3606
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3607
old_striplib striplib file_magic_cmd export_symbols_cmds \
3608
deplibs_check_method allow_undefined_flag no_undefined_flag \
3609
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3610
global_symbol_to_c_name_address \
3611
hardcode_libdir_flag_spec hardcode_libdir_separator \
3612
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3613
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3616
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3617
old_postinstall_cmds | old_postuninstall_cmds | \
3618
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3619
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3620
postinstall_cmds | postuninstall_cmds | \
3621
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3622
# Double-quote double-evaled strings.
3623
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3626
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3631
cat <<__EOF__ > "${ofile}T"
3634
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3635
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3636
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3638
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3639
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3641
# This program is free software; you can redistribute it and/or modify
3642
# it under the terms of the GNU General Public License as published by
3643
# the Free Software Foundation; either version 2 of the License, or
3644
# (at your option) any later version.
3646
# This program is distributed in the hope that it will be useful, but
3647
# WITHOUT ANY WARRANTY; without even the implied warranty of
3648
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3649
# General Public License for more details.
3651
# You should have received a copy of the GNU General Public License
3652
# along with this program; if not, write to the Free Software
3653
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3655
# As a special exception to the GNU General Public License, if you
3656
# distribute this file as part of a program that contains a
3657
# configuration script generated by Autoconf, you may include it under
3658
# the same distribution terms that you use for the rest of that program.
3660
# A sed that does not truncate output.
3663
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3664
Xsed="${SED} -e s/^X//"
3666
# The HP-UX ksh and POSIX shell print the target directory to stdout
3668
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3670
# ### BEGIN LIBTOOL CONFIG
3672
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3674
# Shell to use when invoking shell scripts.
3677
# Whether or not to build shared libraries.
3678
build_libtool_libs=$enable_shared
3680
# Whether or not to build static libraries.
3681
build_old_libs=$enable_static
3683
# Whether or not to add -lc for building shared libraries.
3684
build_libtool_need_lc=$need_lc
3686
# Whether or not to optimize for fast installation.
3687
fast_install=$enable_fast_install
3690
host_alias=$host_alias
3693
# An echo program that does not interpret backslashes.
3698
AR_FLAGS=$lt_AR_FLAGS
3700
# The default C compiler.
3703
# Is the compiler the GNU C compiler?
3706
# The linker used to build libraries.
3709
# Whether we need hard or soft links.
3712
# A BSD-compatible nm program.
3715
# A symbol stripping program
3718
# Used to examine libraries when file_magic_cmd begins "file"
3719
MAGIC_CMD=$MAGIC_CMD
3721
# Used on cygwin: DLL creation program.
3724
# Used on cygwin: object dumper.
3727
# Used on cygwin: assembler.
3730
# The name of the directory that contains temporary libtool files.
3733
# How to create reloadable object files.
3734
reload_flag=$lt_reload_flag
3735
reload_cmds=$lt_reload_cmds
3737
# How to pass a linker flag through the compiler.
3740
# Object file suffix (normally "o").
3743
# Old archive suffix (normally "a").
3746
# Executable file suffix (normally "").
3749
# Additional compiler flags for building library objects.
3750
pic_flag=$lt_pic_flag
3753
# Does compiler simultaneously support -c and -o options?
3754
compiler_c_o=$lt_compiler_c_o
3756
# Can we write directly to a .lo ?
3757
compiler_o_lo=$lt_compiler_o_lo
3759
# Must we lock files when doing compilation ?
3760
need_locks=$lt_need_locks
3762
# Do we need the lib prefix for modules?
3763
need_lib_prefix=$need_lib_prefix
3765
# Do we need a version for libraries?
3766
need_version=$need_version
3768
# Whether dlopen is supported.
3769
dlopen_support=$enable_dlopen
3771
# Whether dlopen of programs is supported.
3772
dlopen_self=$enable_dlopen_self
3774
# Whether dlopen of statically linked programs is supported.
3775
dlopen_self_static=$enable_dlopen_self_static
3777
# Compiler flag to prevent dynamic linking.
3778
link_static_flag=$lt_link_static_flag
3780
# Compiler flag to turn off builtin functions.
3781
no_builtin_flag=$lt_no_builtin_flag
3783
# Compiler flag to allow reflexive dlopens.
3784
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3786
# Compiler flag to generate shared objects directly from archives.
3787
whole_archive_flag_spec=$lt_whole_archive_flag_spec
3789
# Compiler flag to generate thread-safe objects.
3790
thread_safe_flag_spec=$lt_thread_safe_flag_spec
3792
# Library versioning type.
3793
version_type=$version_type
3795
# Format of library name prefix.
3796
libname_spec=$lt_libname_spec
3798
# List of archive names. First name is the real one, the rest are links.
3799
# The last name is the one that the linker finds with -lNAME.
3800
library_names_spec=$lt_library_names_spec
3802
# The coded name of the library, if different from the real name.
3803
soname_spec=$lt_soname_spec
3805
# Commands used to build and install an old-style archive.
3807
old_archive_cmds=$lt_old_archive_cmds
3808
old_postinstall_cmds=$lt_old_postinstall_cmds
3809
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3811
# Create an old-style archive from a shared archive.
3812
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3814
# Create a temporary old-style archive to link instead of a shared archive.
3815
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3817
# Commands used to build and install a shared archive.
3818
archive_cmds=$lt_archive_cmds
3819
archive_expsym_cmds=$lt_archive_expsym_cmds
3820
postinstall_cmds=$lt_postinstall_cmds
3821
postuninstall_cmds=$lt_postuninstall_cmds
3823
# Commands to strip libraries.
3824
old_striplib=$lt_old_striplib
3825
striplib=$lt_striplib
3827
# Method to check whether dependent libraries are shared objects.
3828
deplibs_check_method=$lt_deplibs_check_method
3830
# Command to use when deplibs_check_method == file_magic.
3831
file_magic_cmd=$lt_file_magic_cmd
3833
# Flag that allows shared libraries with undefined symbols to be built.
3834
allow_undefined_flag=$lt_allow_undefined_flag
3836
# Flag that forces no undefined symbols.
3837
no_undefined_flag=$lt_no_undefined_flag
3839
# Commands used to finish a libtool library installation in a directory.
3840
finish_cmds=$lt_finish_cmds
3842
# Same as above, but a single script fragment to be evaled but not shown.
3843
finish_eval=$lt_finish_eval
3845
# Take the output of nm and produce a listing of raw symbols and C names.
3846
global_symbol_pipe=$lt_global_symbol_pipe
3848
# Transform the output of nm in a proper C declaration
3849
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3851
# Transform the output of nm in a C name address pair
3852
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3854
# This is the shared library runtime path variable.
3855
runpath_var=$runpath_var
3857
# This is the shared library path variable.
3858
shlibpath_var=$shlibpath_var
3860
# Is shlibpath searched before the hard-coded library search path?
3861
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3863
# How to hardcode a shared library path into an executable.
3864
hardcode_action=$hardcode_action
3866
# Whether we should hardcode library paths into libraries.
3867
hardcode_into_libs=$hardcode_into_libs
3869
# Flag to hardcode \$libdir into a binary during linking.
3870
# This must work even if \$libdir does not exist.
3871
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3873
# Whether we need a single -rpath flag with a separated argument.
3874
hardcode_libdir_separator=$lt_hardcode_libdir_separator
3876
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3878
hardcode_direct=$hardcode_direct
3880
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3882
hardcode_minus_L=$hardcode_minus_L
3884
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3885
# the resulting binary.
3886
hardcode_shlibpath_var=$hardcode_shlibpath_var
3888
# Variables whose values should be saved in libtool wrapper scripts and
3889
# restored at relink time.
3890
variables_saved_for_relink="$variables_saved_for_relink"
3892
# Whether libtool must link a program against all its dependency libraries.
3893
link_all_deplibs=$link_all_deplibs
3895
# Compile-time system search path for libraries
3896
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3898
# Run-time system search path for libraries
3899
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3901
# Fix the shell variable \$srcfile for the compiler.
3902
fix_srcfile_path="$fix_srcfile_path"
3904
# Set to yes if exported symbols are required.
3905
always_export_symbols=$always_export_symbols
3907
# The commands to list exported symbols.
3908
export_symbols_cmds=$lt_export_symbols_cmds
3910
# The commands to extract the exported symbol list from a shared archive.
3911
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3913
# Symbols that should not be listed in the preloaded symbols.
3914
exclude_expsyms=$lt_exclude_expsyms
3916
# Symbols that must always be exported.
3917
include_expsyms=$lt_include_expsyms
3919
# ### END LIBTOOL CONFIG
3925
cat <<\EOF >> "${ofile}T"
3927
# AIX sometimes has problems with the GCC collect2 program. For some
3928
# reason, if we set the COLLECT_NAMES environment variable, the problems
3929
# vanish in a puff of smoke.
3930
if test "X${COLLECT_NAMES+set}" != Xset; then
3932
export COLLECT_NAMES
3939
cygwin* | mingw* | pw32* | os2*)
3940
cat <<'EOF' >> "${ofile}T"
3941
# This is a source program that is used to create dlls on Windows
3942
# Don't remove nor modify the starting and closing comments
3943
# /* ltdll.c starts here */
3944
# #define WIN32_LEAN_AND_MEAN
3945
# #include <windows.h>
3946
# #undef WIN32_LEAN_AND_MEAN
3947
# #include <stdio.h>
3949
# #ifndef __CYGWIN__
3950
# # ifdef __CYGWIN32__
3951
# # define __CYGWIN__ __CYGWIN32__
3955
# #ifdef __cplusplus
3958
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3959
# #ifdef __cplusplus
3964
# #include <cygwin/cygwin_dll.h>
3965
# DECLARE_CYGWIN_DLL( DllMain );
3967
# HINSTANCE __hDllInstance_base;
3970
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3972
# __hDllInstance_base = hInst;
3975
# /* ltdll.c ends here */
3976
# This is a source program that is used to create import libraries
3977
# on Windows for dlls which lack them. Don't remove nor modify the
3978
# starting and closing comments
3979
# /* impgen.c starts here */
3980
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3982
# This file is part of GNU libtool.
3984
# This program is free software; you can redistribute it and/or modify
3985
# it under the terms of the GNU General Public License as published by
3986
# the Free Software Foundation; either version 2 of the License, or
3987
# (at your option) any later version.
3989
# This program is distributed in the hope that it will be useful,
3990
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3991
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3992
# GNU General Public License for more details.
3994
# You should have received a copy of the GNU General Public License
3995
# along with this program; if not, write to the Free Software
3996
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3999
# #include <stdio.h> /* for printf() */
4000
# #include <unistd.h> /* for open(), lseek(), read() */
4001
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
4002
# #include <string.h> /* for strdup() */
4004
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
4006
# #define O_BINARY 0
4009
# static unsigned int
4010
# pe_get16 (fd, offset)
4014
# unsigned char b[2];
4015
# lseek (fd, offset, SEEK_SET);
4017
# return b[0] + (b[1]<<8);
4020
# static unsigned int
4021
# pe_get32 (fd, offset)
4025
# unsigned char b[4];
4026
# lseek (fd, offset, SEEK_SET);
4028
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
4031
# static unsigned int
4035
# unsigned char *b = ptr;
4036
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
4045
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
4046
# unsigned long export_rva, export_size, nsections, secptr, expptr;
4047
# unsigned long name_rvas, nexp;
4048
# unsigned char *expdata, *erva;
4049
# char *filename, *dll_name;
4051
# filename = argv[1];
4053
# dll = open(filename, O_RDONLY|O_BINARY);
4057
# dll_name = filename;
4059
# for (i=0; filename[i]; i++)
4060
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
4061
# dll_name = filename + i +1;
4063
# pe_header_offset = pe_get32 (dll, 0x3c);
4064
# opthdr_ofs = pe_header_offset + 4 + 20;
4065
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
4067
# if (num_entries < 1) /* no exports */
4070
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
4071
# export_size = pe_get32 (dll, opthdr_ofs + 100);
4072
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
4073
# secptr = (pe_header_offset + 4 + 20 +
4074
# pe_get16 (dll, pe_header_offset + 4 + 16));
4077
# for (i = 0; i < nsections; i++)
4080
# unsigned long secptr1 = secptr + 40 * i;
4081
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
4082
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
4083
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
4084
# lseek(dll, secptr1, SEEK_SET);
4085
# read(dll, sname, 8);
4086
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
4088
# expptr = fptr + (export_rva - vaddr);
4089
# if (export_rva + export_size > vaddr + vsize)
4090
# export_size = vsize - (export_rva - vaddr);
4095
# expdata = (unsigned char*)malloc(export_size);
4096
# lseek (dll, expptr, SEEK_SET);
4097
# read (dll, expdata, export_size);
4098
# erva = expdata - export_rva;
4100
# nexp = pe_as32 (expdata+24);
4101
# name_rvas = pe_as32 (expdata+32);
4103
# printf ("EXPORTS\n");
4104
# for (i = 0; i<nexp; i++)
4106
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
4107
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
4112
# /* impgen.c ends here */
4118
# We use sed instead of cat because bash on DJGPP gets confused if
4119
# if finds mixed CR/LF and LF-only lines. Since sed operates in
4120
# text mode, it properly converts lines to CR/LF. This bash problem
4121
# is reportedly fixed, but why not run on old versions too?
4122
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
4124
mv -f "${ofile}T" "$ofile" || \
4125
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
4129
])# _LT_AC_LTCONFIG_HACK
4131
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
4132
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
4134
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
4135
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
4137
# AC_ENABLE_SHARED - implement the --enable-shared flag
4138
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
4139
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4141
AC_DEFUN([AC_ENABLE_SHARED],
4142
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4143
AC_ARG_ENABLE(shared,
4144
changequote(<<, >>)dnl
4145
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4146
changequote([, ])dnl
4147
[p=${PACKAGE-default}
4149
yes) enable_shared=yes ;;
4150
no) enable_shared=no ;;
4153
# Look at the argument we got. We use all the common list separators.
4154
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4155
for pkg in $enableval; do
4156
if test "X$pkg" = "X$p"; then
4163
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
4166
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
4167
AC_DEFUN([AC_DISABLE_SHARED],
4168
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4169
AC_ENABLE_SHARED(no)])
4171
# AC_ENABLE_STATIC - implement the --enable-static flag
4172
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
4173
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4175
AC_DEFUN([AC_ENABLE_STATIC],
4176
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4177
AC_ARG_ENABLE(static,
4178
changequote(<<, >>)dnl
4179
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4180
changequote([, ])dnl
4181
[p=${PACKAGE-default}
4183
yes) enable_static=yes ;;
4184
no) enable_static=no ;;
4187
# Look at the argument we got. We use all the common list separators.
4188
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4189
for pkg in $enableval; do
4190
if test "X$pkg" = "X$p"; then
4197
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4200
# AC_DISABLE_STATIC - set the default static flag to --disable-static
4201
AC_DEFUN([AC_DISABLE_STATIC],
4202
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4203
AC_ENABLE_STATIC(no)])
4206
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4207
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4208
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4210
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4211
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4212
AC_ARG_ENABLE(fast-install,
4213
changequote(<<, >>)dnl
4214
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4215
changequote([, ])dnl
4216
[p=${PACKAGE-default}
4218
yes) enable_fast_install=yes ;;
4219
no) enable_fast_install=no ;;
4221
enable_fast_install=no
4222
# Look at the argument we got. We use all the common list separators.
4223
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4224
for pkg in $enableval; do
4225
if test "X$pkg" = "X$p"; then
4226
enable_fast_install=yes
4232
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4235
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4236
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4237
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4238
AC_ENABLE_FAST_INSTALL(no)])
4240
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4241
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4242
# Where MODE is either `yes' or `no'. If omitted, it defaults to
4244
AC_DEFUN([AC_LIBTOOL_PICMODE],
4245
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4246
pic_mode=ifelse($#,1,$1,default)])
4249
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4250
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4251
[AC_MSG_CHECKING([for $1])
4252
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4255
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4258
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4261
ac_save_MAGIC_CMD="$MAGIC_CMD"
4262
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4263
dnl $ac_dummy forces splitting on constant user-supplied paths.
4264
dnl POSIX.2 word splitting is done only on the output of word expansions,
4265
dnl not every word. This closes a longstanding sh security hole.
4266
ac_dummy="ifelse([$2], , $PATH, [$2])"
4267
for ac_dir in $ac_dummy; do
4268
test -z "$ac_dir" && ac_dir=.
4269
if test -f $ac_dir/$1; then
4270
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4271
if test -n "$file_magic_test_file"; then
4272
case $deplibs_check_method in
4274
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4275
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4276
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4277
egrep "$file_magic_regex" > /dev/null; then
4282
*** Warning: the command libtool uses to detect shared libraries,
4283
*** $file_magic_cmd, produces output that libtool cannot recognize.
4284
*** The result is that libtool may fail to recognize shared libraries
4285
*** as such. This will affect the creation of libtool libraries that
4286
*** depend on shared libraries, but programs linked with such libtool
4287
*** libraries will work regardless of this problem. Nevertheless, you
4288
*** may want to report the problem to your system manager and/or to
4289
*** bug-libtool@gnu.org
4299
MAGIC_CMD="$ac_save_MAGIC_CMD"
4302
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4303
if test -n "$MAGIC_CMD"; then
4304
AC_MSG_RESULT($MAGIC_CMD)
4311
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4312
AC_DEFUN([AC_PATH_MAGIC],
4313
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4314
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4315
if test -z "$lt_cv_path_MAGIC_CMD"; then
4316
if test -n "$ac_tool_prefix"; then
4317
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4325
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4326
AC_DEFUN([AC_PROG_LD],
4327
[AC_ARG_WITH(gnu-ld,
4328
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4329
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4330
AC_REQUIRE([AC_PROG_CC])dnl
4331
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4332
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4333
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4335
if test "$GCC" = yes; then
4336
# Check if gcc -print-prog-name=ld gives a path.
4337
AC_MSG_CHECKING([for ld used by GCC])
4340
# gcc leaves a trailing carriage return which upsets mingw
4341
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4343
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4346
# Accept absolute paths.
4347
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4348
re_direlt='/[[^/]][[^/]]*/\.\./'
4349
# Canonicalize the path of ld
4350
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4351
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4352
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4354
test -z "$LD" && LD="$ac_prog"
4357
# If it fails, then pretend we aren't using GCC.
4361
# If it is relative, then search for the first ld in PATH.
4365
elif test "$with_gnu_ld" = yes; then
4366
AC_MSG_CHECKING([for GNU ld])
4368
AC_MSG_CHECKING([for non-GNU ld])
4370
AC_CACHE_VAL(lt_cv_path_LD,
4371
[if test -z "$LD"; then
4372
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4373
for ac_dir in $PATH; do
4374
test -z "$ac_dir" && ac_dir=.
4375
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4376
lt_cv_path_LD="$ac_dir/$ac_prog"
4377
# Check to see if the program is GNU ld. I'd rather use --version,
4378
# but apparently some GNU ld's only accept -v.
4379
# Break only if it was the GNU/non-GNU ld that we prefer.
4380
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4381
test "$with_gnu_ld" != no && break
4383
test "$with_gnu_ld" != yes && break
4389
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4392
if test -n "$LD"; then
4397
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4402
AC_DEFUN([AC_PROG_LD_GNU],
4403
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4404
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4405
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4406
lt_cv_prog_gnu_ld=yes
4408
lt_cv_prog_gnu_ld=no
4410
with_gnu_ld=$lt_cv_prog_gnu_ld
4413
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4414
# -- PORTME Some linkers may need a different reload flag.
4415
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4416
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4417
[lt_cv_ld_reload_flag='-r'])
4418
reload_flag=$lt_cv_ld_reload_flag
4419
test -n "$reload_flag" && reload_flag=" $reload_flag"
4422
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4423
# -- PORTME fill in with the dynamic library characteristics
4424
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4425
[AC_CACHE_CHECK([how to recognise dependent libraries],
4426
lt_cv_deplibs_check_method,
4427
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4428
lt_cv_file_magic_test_file=
4429
lt_cv_deplibs_check_method='unknown'
4430
# Need to set the preceding variable on all platforms that support
4431
# interlibrary dependencies.
4432
# 'none' -- dependencies not supported.
4433
# `unknown' -- same as none, but documents that we really don't know.
4434
# 'pass_all' -- all dependencies passed with no checks.
4435
# 'test_compile' -- check by making test program.
4436
# 'file_magic [[regex]]' -- check by looking for files in library path
4437
# which responds to the $file_magic_cmd with a given egrep regex.
4438
# If you have `file' or equivalent on your system and you're not sure
4439
# whether `pass_all' will *always* work, you probably want this one.
4443
lt_cv_deplibs_check_method=pass_all
4447
lt_cv_deplibs_check_method=pass_all
4451
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4452
lt_cv_file_magic_cmd='/usr/bin/file -L'
4453
lt_cv_file_magic_test_file=/shlib/libc.so
4456
cygwin* | mingw* | pw32*)
4457
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4458
lt_cv_file_magic_cmd='$OBJDUMP -f'
4461
darwin* | rhapsody*)
4462
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4463
lt_cv_file_magic_cmd='/usr/bin/file -L'
4465
rhapsody* | darwin1.[[012]])
4466
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4469
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4475
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4478
# Not sure whether the presence of OpenBSD here was a mistake.
4479
# Let's accept both of them until this is cleared up.
4480
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4481
lt_cv_file_magic_cmd=/usr/bin/file
4482
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4486
lt_cv_deplibs_check_method=pass_all
4491
lt_cv_deplibs_check_method=pass_all
4495
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4496
lt_cv_file_magic_cmd=/usr/bin/file
4497
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4500
irix5* | irix6* | nonstopux*)
4502
irix5* | nonstopux*)
4503
# this will be overridden with pass_all, but let us keep it just in case
4504
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4508
*-32|*"-32 ") libmagic=32-bit;;
4509
*-n32|*"-n32 ") libmagic=N32;;
4510
*-64|*"-64 ") libmagic=64-bit;;
4511
*) libmagic=never-match;;
4513
# this will be overridden with pass_all, but let us keep it just in case
4514
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4517
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4518
lt_cv_deplibs_check_method=pass_all
4521
# This must be Linux ELF.
4524
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | x86_64*)
4525
lt_cv_deplibs_check_method=pass_all ;;
4527
# glibc up to 2.1.1 does not perform some relocations on ARM
4528
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4530
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4534
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4535
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4537
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4542
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4543
lt_cv_file_magic_cmd=/usr/bin/file
4544
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4548
lt_cv_file_magic_cmd=/usr/bin/file
4549
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4550
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4551
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4553
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4557
osf3* | osf4* | osf5*)
4558
# this will be overridden with pass_all, but let us keep it just in case
4559
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4560
lt_cv_file_magic_test_file=/shlib/libc.so
4561
lt_cv_deplibs_check_method=pass_all
4565
lt_cv_deplibs_check_method=pass_all
4569
lt_cv_deplibs_check_method=pass_all
4570
lt_cv_file_magic_test_file=/lib/libc.so
4573
sysv5uw[[78]]* | sysv4*uw2*)
4574
lt_cv_deplibs_check_method=pass_all
4577
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4578
case $host_vendor in
4580
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]]'
4581
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4584
lt_cv_deplibs_check_method=pass_all
4587
lt_cv_file_magic_cmd='/bin/file'
4588
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4591
lt_cv_file_magic_cmd='/bin/file'
4592
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4593
lt_cv_file_magic_test_file=/lib/libc.so
4596
lt_cv_deplibs_check_method=pass_all
4602
file_magic_cmd=$lt_cv_file_magic_cmd
4603
deplibs_check_method=$lt_cv_deplibs_check_method
4607
# AC_PROG_NM - find the path to a BSD-compatible name lister
4608
AC_DEFUN([AC_PROG_NM],
4609
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4610
AC_MSG_CHECKING([for BSD-compatible nm])
4611
AC_CACHE_VAL(lt_cv_path_NM,
4612
[if test -n "$NM"; then
4613
# Let the user override the test.
4616
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4617
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4618
test -z "$ac_dir" && ac_dir=.
4619
tmp_nm=$ac_dir/${ac_tool_prefix}nm
4620
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4621
# Check to see if the nm accepts a BSD-compat flag.
4622
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4623
# nm: unknown option "B" ignored
4624
# Tru64's nm complains that /dev/null is an invalid object file
4625
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4626
lt_cv_path_NM="$tmp_nm -B"
4628
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4629
lt_cv_path_NM="$tmp_nm -p"
4632
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4633
continue # so that we can try to find one that supports BSD flags
4638
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4641
AC_MSG_RESULT([$NM])
4644
# AC_CHECK_LIBM - check for math library
4645
AC_DEFUN([AC_CHECK_LIBM],
4646
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4649
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4650
# These system don't have libm
4653
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4654
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4657
AC_CHECK_LIB(m, main, LIBM="-lm")
4662
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4663
# the libltdl convenience library and LTDLINCL to the include flags for
4664
# the libltdl header and adds --enable-ltdl-convenience to the
4665
# configure arguments. Note that LIBLTDL and LTDLINCL are not
4666
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4667
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4668
# with '${top_builddir}/' and LTDLINCL will be prefixed with
4669
# '${top_srcdir}/' (note the single quotes!). If your package is not
4670
# flat and you're not using automake, define top_builddir and
4671
# top_srcdir appropriately in the Makefiles.
4672
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4673
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4674
case $enable_ltdl_convenience in
4675
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4676
"") enable_ltdl_convenience=yes
4677
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4679
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4680
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4681
# For backwards non-gettext consistent compatibility...
4685
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4686
# the libltdl installable library and LTDLINCL to the include flags for
4687
# the libltdl header and adds --enable-ltdl-install to the configure
4688
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4689
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4690
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4691
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4692
# with '${top_srcdir}/' (note the single quotes!). If your package is
4693
# not flat and you're not using automake, define top_builddir and
4694
# top_srcdir appropriately in the Makefiles.
4695
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4696
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4697
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4698
AC_CHECK_LIB(ltdl, main,
4699
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4700
[if test x"$enable_ltdl_install" = xno; then
4701
AC_MSG_WARN([libltdl not installed, but installation disabled])
4703
enable_ltdl_install=yes
4706
if test x"$enable_ltdl_install" = x"yes"; then
4707
ac_configure_args="$ac_configure_args --enable-ltdl-install"
4708
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4709
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4711
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4715
# For backwards non-gettext consistent compatibility...
4720
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4721
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4722
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4723
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4724
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4725
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4726
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4728
# This is just to silence aclocal about the macro not being used
4729
ifelse([AC_DISABLE_FAST_INSTALL])
4731
# NOTE: This macro has been submitted for inclusion into #
4732
# GNU Autoconf as AC_PROG_SED. When it is available in #
4733
# a released version of Autoconf we should remove this #
4734
# macro and use it instead. #
4737
# Check for a fully-functional sed program, that truncates
4738
# as few characters as possible. Prefer GNU sed if found.
4739
AC_DEFUN([LT_AC_PROG_SED],
4740
[AC_MSG_CHECKING([for a sed that does not truncate output])
4741
AC_CACHE_VAL(lt_cv_path_SED,
4742
[# Loop through the user's path and test for sed and gsed.
4743
# Then use that list of sed's as ones to test for truncation.
4744
as_executable_p="test -f"
4745
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4749
test -z "$as_dir" && as_dir=.
4750
for ac_prog in sed gsed; do
4751
for ac_exec_ext in '' $ac_executable_extensions; do
4752
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4753
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4759
# Create a temporary directory, and hook for its removal unless debugging.
4762
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4763
trap '{ (exit 1); exit 1; }' 1 2 13 15
4766
# Create a (secure) tmp directory for tmp files.
4769
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4770
test -n "$tmp" && test -d "$tmp"
4773
tmp=$TMPDIR/sed$$-$RANDOM
4774
(umask 077 && mkdir $tmp)
4777
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4778
{ (exit 1); exit 1; }
4782
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
4783
# along with /bin/sed that truncates output.
4784
for _sed in $_sed_list /usr/xpg4/bin/sed; do
4785
test ! -f ${_sed} && break
4786
cat /dev/null > "$tmp/sed.in"
4788
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4789
# Check for GNU sed and select it if it is found.
4790
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4791
lt_cv_path_SED=${_sed}
4795
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4796
mv "$tmp/sed.tmp" "$tmp/sed.in"
4797
cp "$tmp/sed.in" "$tmp/sed.nl"
4798
echo >>"$tmp/sed.nl"
4799
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4800
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4801
# 40000 chars as input seems more than enough
4802
test $_count -gt 10 && break
4803
_count=`expr $_count + 1`
4804
if test $_count -gt $_max; then
4806
lt_cv_path_SED=$_sed
4812
if test "X$SED" != "X"; then
4817
AC_MSG_RESULT([$SED])
4821
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4822
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4823
dnl also defines GSTUFF_PKG_ERRORS on error
4824
AC_DEFUN(PKG_CHECK_MODULES, [
4827
if test -z "$PKG_CONFIG"; then
4828
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
4831
if test "$PKG_CONFIG" = "no" ; then
4832
echo "*** The pkg-config script could not be found. Make sure it is"
4833
echo "*** in your path, or set the PKG_CONFIG environment variable"
4834
echo "*** to the full path to pkg-config."
4835
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
4837
PKG_CONFIG_MIN_VERSION=0.9.0
4838
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
4839
AC_MSG_CHECKING(for $2)
4841
if $PKG_CONFIG --exists "$2" ; then
4845
AC_MSG_CHECKING($1_CFLAGS)
4846
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
4847
AC_MSG_RESULT($$1_CFLAGS)
4849
AC_MSG_CHECKING($1_LIBS)
4850
$1_LIBS=`$PKG_CONFIG --libs "$2"`
4851
AC_MSG_RESULT($$1_LIBS)
4855
## If we have a custom action on failure, don't print errors, but
4856
## do set a variable so people can do so.
4857
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4858
ifelse([$4], ,echo $$1_PKG_ERRORS,)
4864
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
4865
echo "*** See http://www.freedesktop.org/software/pkgconfig"
4869
if test $succeeded = yes; then
4870
ifelse([$3], , :, [$3])
4872
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
4878
dnl AM_GCONF_SOURCE_2
4879
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
4880
dnl (i.e. pass to gconftool-2
4881
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
4882
dnl you should install foo.schemas files
4885
AC_DEFUN([AM_GCONF_SOURCE_2],
4887
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
4888
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
4890
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
4893
AC_ARG_WITH(gconf-source,
4894
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
4896
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
4897
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
4899
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
4900
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/'
4902
GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR
4905
AC_ARG_WITH(gconf-schema-file-dir,
4906
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
4908
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
4909
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
4911
AC_ARG_ENABLE(schemas-install,
4912
[ --disable-schemas-install Disable the schemas installation],
4913
[case "${enableval}" in
4914
yes) schemas_install=true ;;
4915
no) schemas_install=false ;;
4916
*) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
4917
esac],[schemas_install=true])
4918
AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
4921
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
4922
# Copyright (C) 2001-2003 Red Hat, Inc.
4924
# This file is free software, distributed under the terms of the GNU
4925
# General Public License. As a special exception to the GNU General
4926
# Public License, this file may be distributed as part of a program
4927
# that contains a configuration script generated by Autoconf, under
4928
# the same distribution terms as the rest of that program.
4930
# This file can be copied and used freely without restrictions. It can
4931
# be used in projects which are not available under the GNU Public License
4932
# but which still want to provide support for the GNU gettext functionality.
4934
# Macro to add for using GNU gettext.
4935
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
4937
# Modified to never use included libintl.
4938
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
4940
# Major rework to remove unused code
4941
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
4943
# Added better handling of ALL_LINGUAS from GNU gettext version
4944
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
4947
# We need this here as well, since someone might use autoconf-2.5x
4948
# to configure GLib then an older version to configure a package
4949
# using AM_GLIB_GNU_GETTEXT
4953
dnl We go to great lengths to make sure that aclocal won't
4954
dnl try to pull in the installed version of these macros
4955
dnl when running aclocal in the glib directory.
4957
m4_copy([AC_DEFUN],[glib_DEFUN])
4958
m4_copy([AC_REQUIRE],[glib_REQUIRE])
4960
dnl At the end, if we're not within glib, we'll define the public
4961
dnl definitions in terms of our private definitions.
4965
#--------------------
4966
glib_DEFUN([GLIB_LC_MESSAGES],
4967
[AC_CHECK_HEADERS([locale.h])
4968
if test $ac_cv_header_locale_h = yes; then
4969
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
4970
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
4971
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
4972
if test $am_cv_val_LC_MESSAGES = yes; then
4973
AC_DEFINE(HAVE_LC_MESSAGES, 1,
4974
[Define if your <locale.h> file defines LC_MESSAGES.])
4978
# GLIB_PATH_PROG_WITH_TEST
4979
#----------------------------
4980
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
4981
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
4982
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
4983
[# Extract the first word of "$2", so it can be a program name with args.
4984
set dummy $2; ac_word=[$]2
4985
AC_MSG_CHECKING([for $ac_word])
4986
AC_CACHE_VAL(ac_cv_path_$1,
4989
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4992
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4993
for ac_dir in ifelse([$5], , $PATH, [$5]); do
4994
test -z "$ac_dir" && ac_dir=.
4995
if test -f $ac_dir/$ac_word; then
4997
ac_cv_path_$1="$ac_dir/$ac_word"
5003
dnl If no 4th arg is given, leave the cache variable unset,
5004
dnl so AC_PATH_PROGS will keep looking.
5005
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5010
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5011
AC_MSG_RESULT([$]$1)
5020
glib_DEFUN([GLIB_WITH_NLS],
5021
dnl NLS is obligatory
5025
gt_cv_have_gettext=no
5031
AC_CHECK_HEADER(libintl.h,
5032
[gt_cv_func_dgettext_libintl="no"
5033
libintl_extra_libs=""
5036
# First check in libc
5038
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
5040
#include <libintl.h>
5042
[return (int) dgettext ("","")],
5043
gt_cv_func_dgettext_libc=yes,
5044
gt_cv_func_dgettext_libc=no)
5047
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
5048
AC_CHECK_FUNCS(bind_textdomain_codeset)
5052
# If we don't have everything we want, check in libintl
5054
if test "$gt_cv_func_dgettext_libc" != "yes" \
5055
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
5057
AC_CHECK_LIB(intl, bindtextdomain,
5058
[AC_CHECK_LIB(intl, dgettext,
5059
gt_cv_func_dgettext_libintl=yes)])
5061
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
5062
AC_MSG_CHECKING([if -liconv is needed to use gettext])
5064
AC_CHECK_LIB(intl, dcgettext,
5065
[gt_cv_func_dgettext_libintl=yes
5066
libintl_extra_libs=-liconv],
5071
# If we found libintl, then check in it for bind_textdomain_codeset();
5072
# we'll prefer libc if neither have bind_textdomain_codeset(),
5073
# and both have dgettext
5075
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
5076
glib_save_LIBS="$LIBS"
5077
LIBS="$LIBS -lintl $libintl_extra_libs"
5078
unset ac_cv_func_bind_textdomain_codeset
5079
AC_CHECK_FUNCS(bind_textdomain_codeset)
5080
LIBS="$glib_save_LIBS"
5082
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
5083
gt_cv_func_dgettext_libc=no
5085
if test "$gt_cv_func_dgettext_libc" = "yes"; then
5086
gt_cv_func_dgettext_libintl=no
5092
if test "$gt_cv_func_dgettext_libc" = "yes" \
5093
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
5094
gt_cv_have_gettext=yes
5097
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
5098
INTLLIBS="-lintl $libintl_extra_libs"
5101
if test "$gt_cv_have_gettext" = "yes"; then
5102
AC_DEFINE(HAVE_GETTEXT,1,
5103
[Define if the GNU gettext() function is already present or preinstalled.])
5104
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5105
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
5106
if test "$MSGFMT" != "no"; then
5107
glib_save_LIBS="$LIBS"
5108
LIBS="$LIBS $INTLLIBS"
5109
AC_CHECK_FUNCS(dcgettext)
5110
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5111
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5112
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
5113
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
5114
return _nl_msg_cat_cntr],
5119
dnl On Solaris, if bind_textdomain_codeset is in libc,
5120
dnl GNU format message catalog is always supported,
5121
dnl since both are added to the libc all together.
5122
dnl Hence, we'd like to go with DATADIRNAME=share and
5123
dnl and CATOBJEXT=.gmo in this case.
5124
AC_CHECK_FUNC(bind_textdomain_codeset,
5135
LIBS="$glib_save_LIBS"
5138
gt_cv_have_gettext=no
5143
if test "$gt_cv_have_gettext" = "yes" ; then
5144
AC_DEFINE(ENABLE_NLS, 1,
5145
[always defined to indicate that i18n is enabled])
5148
dnl Test whether we really found GNU xgettext.
5149
if test "$XGETTEXT" != ":"; then
5150
dnl If it is not GNU xgettext we define it as : so that the
5151
dnl Makefiles still can work.
5152
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5156
[found xgettext program is not GNU xgettext; ignore it])
5161
# We need to process the po/ directory.
5165
[case "$CONFIG_FILES" in *po/Makefile.in*)
5166
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
5169
dnl These rules are solely for the distribution goal. While doing this
5170
dnl we only have to keep exactly one list of the available catalogs
5171
dnl in configure.in.
5172
for lang in $ALL_LINGUAS; do
5173
GMOFILES="$GMOFILES $lang.gmo"
5174
POFILES="$POFILES $lang.po"
5177
dnl Make all variables we use known to autoconf.
5180
AC_SUBST(DATADIRNAME)
5182
AC_SUBST(INSTOBJEXT)
5184
AC_SUBST(PO_IN_DATADIR_TRUE)
5185
AC_SUBST(PO_IN_DATADIR_FALSE)
5190
# AM_GLIB_GNU_GETTEXT
5191
# -------------------
5192
# Do checks necessary for use of gettext. If a suitable implementation
5193
# of gettext is found in either in libintl or in the C library,
5194
# it will set INTLLIBS to the libraries needed for use of gettext
5195
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
5196
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
5197
# on various variables needed by the Makefile.in.in installed by
5200
glib_DEFUN([GLIB_GNU_GETTEXT],
5201
[AC_REQUIRE([AC_PROG_CC])dnl
5202
AC_REQUIRE([AC_HEADER_STDC])dnl
5207
if test "$gt_cv_have_gettext" = "yes"; then
5208
if test "x$ALL_LINGUAS" = "x"; then
5211
AC_MSG_CHECKING(for catalogs to be installed)
5213
for presentlang in $ALL_LINGUAS; do
5215
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
5216
desiredlanguages="$LINGUAS"
5218
desiredlanguages="$ALL_LINGUAS"
5220
for desiredlang in $desiredlanguages; do
5221
# Use the presentlang catalog if desiredlang is
5222
# a. equal to presentlang, or
5223
# b. a variant of presentlang (because in this case,
5224
# presentlang can be used as a fallback for messages
5225
# which are not translated in the desiredlang catalog).
5226
case "$desiredlang" in
5227
"$presentlang"*) useit=yes;;
5230
if test $useit = yes; then
5231
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
5234
LINGUAS=$NEW_LINGUAS
5235
AC_MSG_RESULT($LINGUAS)
5238
dnl Construct list of names of catalog files to be constructed.
5239
if test -n "$LINGUAS"; then
5240
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5244
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
5245
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
5246
dnl Try to locate is.
5248
if test -n "$ac_aux_dir"; then
5249
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5251
if test -z "$MKINSTALLDIRS"; then
5252
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5254
AC_SUBST(MKINSTALLDIRS)
5256
dnl Generate list of files to be processed by xgettext which will
5257
dnl be included in po/Makefile.
5258
test -d po || mkdir po
5259
if test "x$srcdir" != "x."; then
5260
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5261
posrcprefix="$srcdir/"
5263
posrcprefix="../$srcdir/"
5269
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5270
< $srcdir/po/POTFILES.in > po/POTFILES
5273
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
5274
# -------------------------------
5275
# Define VARIABLE to the location where catalog files will
5276
# be installed by po/Makefile.
5277
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
5278
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
5279
glib_save_prefix="$prefix"
5280
glib_save_exec_prefix="$exec_prefix"
5281
test "x$prefix" = xNONE && prefix=$ac_default_prefix
5282
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
5283
if test "x$CATOBJEXT" = "x.mo" ; then
5284
localedir=`eval echo "${libdir}/locale"`
5286
localedir=`eval echo "${datadir}/locale"`
5288
prefix="$glib_save_prefix"
5289
exec_prefix="$glib_save_exec_prefix"
5290
AC_DEFINE_UNQUOTED($1, "$localedir",
5291
[Define the location where the catalogs will be installed])
5295
dnl Now the definitions that aclocal will find
5297
ifdef(glib_configure_in,[],[
5298
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
5299
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])