293
295
# If we don't find anything, use the default library path according
294
296
# to the aix ld manual.
295
297
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
298
[AC_REQUIRE([LT_AC_PROG_SED])dnl
299
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
301
/Import File Strings/,/^$/ {
307
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
299
308
# Check for a 64-bit object if we didn't find anything.
300
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
309
if test -z "$aix_libpath"; then
310
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
302
312
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303
313
])# _LT_AC_SYS_LIBPATH_AIX
785
# If test is not a shell built-in, we'll probably end up computing a
786
# maximum length that is only half of the actual maximum length, but
788
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
803
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
804
if test -n "$lt_cv_sys_max_cmd_len"; then
805
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
806
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
808
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
809
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790
810
= "XX$teststring") >/dev/null 2>&1 &&
791
new_result=`expr "X$teststring" : ".*" 2>&1` &&
792
lt_cv_sys_max_cmd_len=$new_result &&
793
test $i != 17 # 1/2 MB should be enough
796
teststring=$teststring$teststring
799
# Add a significant safety factor because C++ compilers can tack on massive
800
# amounts of additional arguments before passing them to the linker.
801
# It appears as though 1/2 is a usable value.
802
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
811
new_result=`expr "X$teststring" : ".*" 2>&1` &&
812
lt_cv_sys_max_cmd_len=$new_result &&
813
test $i != 17 # 1/2 MB should be enough
816
teststring=$teststring$teststring
819
# Add a significant safety factor because C++ compilers can tack on massive
820
# amounts of additional arguments before passing them to the linker.
821
# It appears as though 1/2 is a usable value.
822
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1205
1229
version_type=none
1206
1230
dynamic_linker="$host_os ld.so"
1207
1231
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1208
1233
if test "$GCC" = yes; then
1209
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1235
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1236
*) lt_awk_arg="/^libraries:/" ;;
1238
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1239
if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1211
1240
# if the path contains ";" then we assume it to be the separator
1212
1241
# otherwise default to the standard path separator (i.e. ":") - it is
1213
1242
# assumed that no part of a normal pathname contains ";" but that should
1214
1243
# okay in the real world where ";" in dirpaths is itself problematic.
1215
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1244
lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1217
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1246
lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1248
# Ok, now we have the path, separated by spaces, we can step through it
1249
# and add multilib dir if necessary.
1250
lt_tmp_lt_search_path_spec=
1251
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1252
for lt_sys_path in $lt_search_path_spec; do
1253
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1254
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1256
test -d "$lt_sys_path" && \
1257
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1260
lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1261
BEGIN {RS=" "; FS="/|\n";} {
1264
for (lt_i = NF; lt_i > 0; lt_i--) {
1265
if ($lt_i != "" && $lt_i != ".") {
1266
if ($lt_i == "..") {
1269
if (lt_count == 0) {
1270
lt_foo="/" $lt_i lt_foo;
1277
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1278
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1280
sys_lib_search_path_spec=`echo $lt_search_path_spec`
1220
1282
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1222
1284
need_lib_prefix=unknown
1223
1285
hardcode_into_libs=no
1578
1624
# before this can be enabled.
1579
1625
hardcode_into_libs=yes
1581
# find out which ABI we are using
1584
x86_64*|s390x*|powerpc64*)
1585
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1586
if AC_TRY_EVAL(ac_compile); then
1587
case `/usr/bin/file conftest.$ac_objext` in
1590
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1598
1627
# Append ld.so.conf contents to the search path
1599
1628
if test -f /etc/ld.so.conf; then
1600
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1601
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1629
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1630
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1604
1633
# We used to test for /lib/ld.so.1 and disable shared libraries on
2319
2353
mingw* | pw32*)
2320
2354
# Base MSYS/MinGW do not provide the 'file' command needed by
2321
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2322
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2323
lt_cv_file_magic_cmd='$OBJDUMP -f'
2355
# func_win32_libid shell function, so use a weaker test based on 'objdump',
2356
# unless we find 'file', for example because we are cross-compiling.
2357
if ( file / ) >/dev/null 2>&1; then
2358
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2359
lt_cv_file_magic_cmd='func_win32_libid'
2361
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2362
lt_cv_file_magic_cmd='$OBJDUMP -f'
2326
2366
darwin* | rhapsody*)
2327
2367
lt_cv_deplibs_check_method=pass_all
2330
freebsd* | kfreebsd*-gnu | dragonfly*)
2370
freebsd* | dragonfly*)
2331
2371
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2332
2372
case $host_cpu in
3096
3140
case $cc_basename in
3098
3142
output_verbose_link_cmd='echo'
3099
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3143
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3100
3144
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3101
3145
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3102
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3146
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3103
3147
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3372
3414
# dependencies.
3373
3415
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3418
case `$CC -V 2>&1 | sed 5q` in
3421
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3422
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3423
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3424
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3425
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3427
# Not sure whether something based on
3428
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3430
output_verbose_link_cmd='echo'
3432
# Archives containing C++ object files must be created using
3433
# "CC -xar", where "CC" is the Sun C++ compiler. This is
3434
# necessary to make sure instantiated templates are included
3436
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3410
3475
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3413
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3414
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3416
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3419
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3420
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3478
if test -f /usr/libexec/ld.so; then
3479
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3480
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3481
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3482
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3483
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3484
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3485
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3486
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3488
output_verbose_link_cmd='echo'
3490
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3422
output_verbose_link_cmd='echo'
3425
3494
case $cc_basename in
3581
3650
case $host_os in
3582
3651
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3584
# The C++ compiler is used as linker so we must use $wl
3585
# flag to pass the commands to the underlying system
3586
# linker. We must also pass each convience library through
3587
# to the system linker between allextract/defaultextract.
3588
# The C++ compiler will combine linker options so we
3589
# cannot just pass the convience library names through
3653
# The compiler driver will combine and reorder linker options,
3654
# but understands `-z linker_flag'.
3591
3655
# Supported since Solaris 2.6 (maybe 2.5.1?)
3592
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3656
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3595
3659
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3887
3957
_LT_AC_TAGVAR(postdeps,$1)=
3961
case `$CC -V 2>&1 | sed 5q` in
3965
# The more standards-conforming stlport4 library is
3966
# incompatible with the Cstd library. Avoid specifying
3967
# it if it's in CXXFLAGS. Ignore libCrun as
3968
# -library=stlport4 depends on it.
3969
case " $CXX $CXXFLAGS " in
3970
*" -library=stlport4 "*)
3971
solaris_use_stlport4=yes
3974
if test "$solaris_use_stlport4" != yes; then
3975
_LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3891
3982
case $cc_basename in
3984
# The more standards-conforming stlport4 library is
3985
# incompatible with the Cstd library. Avoid specifying
3986
# it if it's in CXXFLAGS. Ignore libCrun as
3987
# -library=stlport4 depends on it.
3988
case " $CXX $CXXFLAGS " in
3989
*" -library=stlport4 "*)
3990
solaris_use_stlport4=yes
3893
3994
# Adding this requires a known-good setup of shared libraries for
3894
3995
# Sun compiler versions before 5.6, else PIC objects from an old
3895
3996
# archive will be linked into the output, leading to subtle bugs.
3896
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3997
if test "$solaris_use_stlport4" != yes; then
3998
_LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5558
5706
ifc* | ifort*) # Intel Fortran compiler
5559
5707
tmp_addflag=' -nofor_main' ;;
5561
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5709
case `$CC -V 2>&1 | sed 5q` in
5710
*Sun\ C*) # Sun C 5.9
5711
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5712
tmp_sharedflag='-G' ;;
5713
*Sun\ F*) # Sun Fortran 8.3
5714
tmp_sharedflag='-G' ;;
5716
tmp_sharedflag='-shared' ;;
5718
_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5563
5720
if test $supports_anon_versioning = yes; then
5564
5721
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5565
5722
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5566
5723
$echo "local: *; };" >> $output_objdir/$libname.ver~
5567
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5724
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5726
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
5570
5728
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5732
netbsd* | netbsdelf*-gnu)
5575
5733
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5576
5734
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5858
6016
case $cc_basename in
5860
6018
output_verbose_link_cmd='echo'
5861
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6019
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
5862
6020
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5863
6021
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5864
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6022
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5865
6023
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6026
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6027
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6028
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6029
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6030
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6031
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6184
if test -f /usr/libexec/ld.so; then
6185
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6186
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6187
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6188
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6189
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6190
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6191
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6194
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6195
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6196
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6199
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6200
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6035
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6036
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6037
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6040
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6041
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6205
_LT_AC_TAGVAR(ld_shlibs, $1)=no
6099
6261
case $host_os in
6100
6262
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6102
# The compiler driver will combine linker options so we
6103
# cannot just pass the convience library names through
6104
# without $wl, iff we do not link with $LD.
6105
# Luckily, gcc supports the same syntax we need for Sun Studio.
6264
# The compiler driver will combine and reorder linker options,
6265
# but understands `-z linker_flag'. GCC discards it without `$wl',
6266
# but is careful enough not to reorder.
6106
6267
# Supported since Solaris 2.6 (maybe 2.5.1?)
6109
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6111
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6268
if test "$GCC" = yes; then
6269
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6271
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6114
6275
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6344
6505
[AC_CHECK_TOOL(RC, windres, no)
6509
# Cheap backport of AS_EXECUTABLE_P and required macros
6510
# from Autoconf 2.59; we should not use $as_executable_p directly.
6514
m4_ifndef([_AS_TEST_PREPARE],
6515
[m4_defun([_AS_TEST_PREPARE],
6516
[if test -x / >/dev/null 2>&1; then
6517
as_executable_p='test -x'
6519
as_executable_p='test -f'
6521
])])# _AS_TEST_PREPARE
6525
# Check whether a file is executable.
6526
m4_ifndef([AS_EXECUTABLE_P],
6527
[m4_defun([AS_EXECUTABLE_P],
6528
[AS_REQUIRE([_AS_TEST_PREPARE])dnl
6529
$as_executable_p $1[]dnl
6530
])])# AS_EXECUTABLE_P
6347
6532
# NOTE: This macro has been submitted for inclusion into #
6348
6533
# GNU Autoconf as AC_PROG_SED. When it is available in #
6349
6534
# a released version of Autoconf we should remove this #
6563
6751
])# PKG_CHECK_MODULES
6565
dnl $Id: xorg-macros.m4,v 1.8 2005/12/09 15:28:41 kem Exp $
6567
dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved.
6569
dnl Permission to use, copy, modify, distribute, and sell this software and its
6570
dnl documentation for any purpose is hereby granted without fee, provided that
6571
dnl the above copyright notice appear in all copies and that both that
6572
dnl copyright notice and this permission notice appear in supporting
6575
dnl The above copyright notice and this permission notice shall be included
6576
dnl in all copies or substantial portions of the Software.
6754
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
6756
dnl Permission is hereby granted, free of charge, to any person obtaining a
6757
dnl copy of this software and associated documentation files (the
6758
dnl "Software"), to deal in the Software without restriction, including
6759
dnl without limitation the rights to use, copy, modify, merge, publish,
6760
dnl distribute, and/or sell copies of the Software, and to permit persons
6761
dnl to whom the Software is furnished to do so, provided that the above
6762
dnl copyright notice(s) and this permission notice appear in all copies of
6763
dnl the Software and that both the above copyright notice(s) and this
6764
dnl permission notice appear in supporting documentation.
6578
6766
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6579
6767
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6580
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6581
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6582
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6583
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6584
dnl OTHER DEALINGS IN THE SOFTWARE.
6586
dnl Except as contained in this notice, the name of the copyright holders shall
6587
dnl not be used in advertising or otherwise to promote the sale, use or
6588
dnl other dealings in this Software without prior written authorization
6589
dnl from the copyright holders.
6768
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
6769
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
6770
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
6771
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
6772
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
6773
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
6774
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6776
dnl Except as contained in this notice, the name of a copyright holder
6777
dnl shall not be used in advertising or otherwise to promote the sale, use
6778
dnl or other dealings in this Software without prior written authorization
6779
dnl of the copyright holder.
6781
# XORG_MACROS_VERSION(required-version)
6782
# -------------------------------------
6783
# Minimum version: 1.1.0
6785
# If you're using a macro added in Version 1.1 or newer, include this in
6786
# your configure.ac with the minimum required version, such as:
6787
# XORG_MACROS_VERSION(1.1)
6789
# To force at least a version with this macro defined, also add:
6790
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
6793
# See the "minimum version" comment for each macro you use to see what
6794
# version you require.
6795
AC_DEFUN([XORG_MACROS_VERSION],[
6796
[XORG_MACROS_needed_version=$1
6797
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
6798
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6799
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
6800
[XORG_MACROS_version=1.1.5
6801
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
6802
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
6803
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
6804
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
6806
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
6807
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
6809
AC_MSG_RESULT([yes, $XORG_MACROS_version])
6810
]) # XORG_MACROS_VERSION
6592
6812
# XORG_PROG_RAWCPP()
6593
6813
# ------------------
6814
# Minimum version: 1.0.0
6594
6816
# Find cpp program and necessary flags for use in pre-processing text files
6595
6817
# such as man pages and config files
6596
6818
AC_DEFUN([XORG_PROG_RAWCPP],[
6642
6866
AC_REQUIRE([AC_CANONICAL_HOST])
6644
6868
if test x$APP_MAN_SUFFIX = x ; then
6646
linux*) APP_MAN_SUFFIX=1x ;;
6647
*) APP_MAN_SUFFIX=1 ;;
6650
6871
if test x$APP_MAN_DIR = x ; then
6652
linux*) APP_MAN_DIR='$(mandir)/man1' ;;
6653
*) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
6872
APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
6657
6875
if test x$LIB_MAN_SUFFIX = x ; then
6659
linux*) LIB_MAN_SUFFIX=3x ;;
6660
*) LIB_MAN_SUFFIX=3 ;;
6663
6878
if test x$LIB_MAN_DIR = x ; then
6665
linux*) LIB_MAN_DIR='$(mandir)/man3' ;;
6666
*) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
6879
LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
6670
6882
if test x$FILE_MAN_SUFFIX = x ; then
6671
6883
case $host_os in
6672
linux*) FILE_MAN_SUFFIX=5x ;;
6673
6884
solaris*) FILE_MAN_SUFFIX=4 ;;
6674
6885
*) FILE_MAN_SUFFIX=5 ;;
6677
6888
if test x$FILE_MAN_DIR = x ; then
6679
linux*) FILE_MAN_DIR='$(mandir)/man5' ;;
6680
*) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
6889
FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
6684
# In Imake's linux.cf, the misc man suffix & dir was only changed for
6685
# LinuxDebian, not other Linuxes, so we leave it unchanged here
6686
6892
if test x$MISC_MAN_SUFFIX = x ; then
6687
6893
case $host_os in
6688
# linux*) MISC_MAN_SUFFIX=7x ;;
6689
6894
solaris*) MISC_MAN_SUFFIX=5 ;;
6690
6895
*) MISC_MAN_SUFFIX=7 ;;
6693
6898
if test x$MISC_MAN_DIR = x ; then
6695
# linux*) MISC_MAN_DIR='$(mandir)/man7' ;;
6696
*) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
6899
MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
6700
# In Imake's linux.cf, the driver man suffix & dir was only changed for
6701
# LinuxDebian, not other Linuxes, so we leave it unchanged here
6702
6902
if test x$DRIVER_MAN_SUFFIX = x ; then
6703
6903
case $host_os in
6704
# linux*) DRIVER_MAN_SUFFIX=4x ;;
6705
6904
solaris*) DRIVER_MAN_SUFFIX=7 ;;
6706
6905
*) DRIVER_MAN_SUFFIX=4 ;;
6709
6908
if test x$DRIVER_MAN_DIR = x ; then
6711
# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;;
6712
*) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
6909
DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
6716
6912
if test x$ADMIN_MAN_SUFFIX = x ; then
6741
6937
# XORG_CHECK_LINUXDOC
6742
6938
# -------------------
6939
# Minimum version: 1.0.0
6743
6941
# Defines the variable MAKE_TEXT if the necessary tools and
6744
6942
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
6745
6943
# Whether or not the necessary tools and files are found can be checked
6746
6944
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
6747
6945
AC_DEFUN([XORG_CHECK_LINUXDOC],[
6749
[$prefix/share/X11/sgml/defs.ent],
6750
[DEFS_ENT_PATH=$prefix/share/X11/sgml],
6946
XORG_SGML_PATH=$prefix/share/sgml
6949
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
6754
6951
AC_PATH_PROG(LINUXDOC, linuxdoc)
6755
6952
AC_PATH_PROG(PS2PDF, ps2pdf)
6757
6954
AC_MSG_CHECKING([Whether to build documentation])
6759
if test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
6956
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
6789
6986
AC_SUBST(MAKE_HTML)
6790
6987
]) # XORG_CHECK_LINUXDOC
6989
# XORG_CHECK_DOCBOOK
6990
# -------------------
6991
# Minimum version: 1.0.0
6993
# Checks for the ability to build output formats from SGML DocBook source.
6994
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
6995
# indicates whether the necessary tools and files are found and, if set,
6996
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
6997
AC_DEFUN([XORG_CHECK_DOCBOOK],[
6998
XORG_SGML_PATH=$prefix/share/sgml
7005
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7007
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
7008
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
7009
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
7010
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7012
AC_MSG_CHECKING([Whether to build text documentation])
7013
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
7014
test x$BUILD_TXTDOC != xno; then
7017
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
7018
AC_MSG_RESULT([$BUILDTXTDOC])
7020
AC_MSG_CHECKING([Whether to build PDF documentation])
7021
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
7022
test x$BUILD_PDFDOC != xno; then
7025
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7026
AC_MSG_RESULT([$BUILDPDFDOC])
7028
AC_MSG_CHECKING([Whether to build PostScript documentation])
7029
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
7030
test x$BUILD_PSDOC != xno; then
7033
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
7034
AC_MSG_RESULT([$BUILDPSDOC])
7036
AC_MSG_CHECKING([Whether to build HTML documentation])
7037
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
7038
test x$BUILD_HTMLDOC != xno; then
7041
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
7042
AC_MSG_RESULT([$BUILDHTMLDOC])
7044
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
7045
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
7046
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
7047
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7053
]) # XORG_CHECK_DOCBOOK
6792
7055
# XORG_CHECK_MALLOC_ZERO
6793
7056
# ----------------------
7057
# Minimum version: 1.0.0
6794
7059
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
6795
7060
# malloc(0) returns NULL. Packages should add one of these cflags to
6796
7061
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
6835
7100
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
6836
7101
]) # XORG_CHECK_MALLOC_ZERO
7105
# Minimum version: 1.1.0
7107
# Sets up flags for source checkers such as lint and sparse if --with-lint
7108
# is specified. (Use --with-lint=sparse for sparse.)
7109
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
7110
# Sets $LINT_FLAGS to flags to pass to source checker
7111
# Sets LINT automake conditional if enabled (default: disabled)
7113
AC_DEFUN([XORG_WITH_LINT],[
7115
# Allow checking code with lint, sparse, etc.
7116
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
7117
[Use a lint-style source code checker (default: disabled)])],
7118
[use_lint=$withval], [use_lint=no])
7119
if test "x$use_lint" = "xyes" ; then
7124
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
7129
LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
7137
AC_SUBST(LINT_FLAGS)
7138
AM_CONDITIONAL(LINT, [test x$LINT != xno])
7142
# XORG_LINT_LIBRARY(LIBNAME)
7143
# --------------------------
7144
# Minimum version: 1.1.0
7146
# Sets up flags for building lint libraries for checking programs that call
7147
# functions in the library.
7148
# Disabled by default, enable with --enable-lint-library
7150
# @LINTLIB@ - name of lint library file to make
7151
# MAKE_LINT_LIB - automake conditional
7154
AC_DEFUN([XORG_LINT_LIBRARY],[
7155
AC_REQUIRE([XORG_WITH_LINT])
7156
# Build lint "library" for more indepth checks of programs calling this library
7157
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
7158
[Create lint library (default: disabled)])],
7159
[make_lint_lib=$enableval], [make_lint_lib=no])
7160
if test "x$make_lint_lib" != "xno" ; then
7161
if test "x$LINT" = "xno" ; then
7162
AC_MSG_ERROR([Cannot make lint library without --with-lint])
7164
if test "x$make_lint_lib" = "xyes" ; then
7167
LINTLIB=$make_lint_lib
7171
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7173
]) # XORG_LINT_LIBRARY
6838
7175
dnl Copyright 2005 Red Hat, Inc
6840
7177
dnl Permission to use, copy, modify, distribute, and sell this software and its
6926
7264
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6927
7265
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
7267
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
7268
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
7269
[Major version of this package])
7270
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
7271
if test "x$PVM" = "x"; then
7274
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7276
[Minor version of this package])
7277
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
7278
if test "x$PVP" = "x"; then
7281
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
7283
[Patch version of this package])
6931
7286
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.