2423
2520
# Let the user override the test.
2424
2521
lt_cv_path_NM="$NM"
2426
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2427
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2429
test -z "$ac_dir" && ac_dir=.
2430
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2431
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2432
# Check to see if the nm accepts a BSD-compat flag.
2433
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2434
# nm: unknown option "B" ignored
2435
# Tru64's nm complains that /dev/null is an invalid object file
2436
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2437
*/dev/null* | *'Invalid file or object type'*)
2438
lt_cv_path_NM="$tmp_nm -B"
2442
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2444
lt_cv_path_NM="$tmp_nm -p"
2523
lt_nm_to_check="${ac_tool_prefix}nm"
2524
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2525
lt_nm_to_check="$lt_nm_to_check nm"
2527
for lt_tmp_nm in $lt_nm_to_check; do
2528
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2529
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2531
test -z "$ac_dir" && ac_dir=.
2532
tmp_nm="$ac_dir/$lt_tmp_nm"
2533
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2534
# Check to see if the nm accepts a BSD-compat flag.
2535
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2536
# nm: unknown option "B" ignored
2537
# Tru64's nm complains that /dev/null is an invalid object file
2538
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2539
*/dev/null* | *'Invalid file or object type'*)
2540
lt_cv_path_NM="$tmp_nm -B"
2448
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2449
continue # so that we can try to find one that supports BSD flags
2544
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2546
lt_cv_path_NM="$tmp_nm -p"
2550
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2551
continue # so that we can try to find one that supports BSD flags
2456
2560
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2458
2562
NM="$lt_cv_path_NM"
2972
3048
# -berok will link without error, but may produce a broken library.
2973
3049
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2974
3050
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2975
# -bexpall does not export symbols beginning with underscore (_)
2976
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
2977
3051
# Exported symbols can be pulled into shared objects from archives
2978
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3052
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2979
3053
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2980
# This is similar to how AIX traditionally builds it's shared libraries.
2981
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3054
# This is similar to how AIX traditionally builds its shared libraries.
3055
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3061
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3062
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3063
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3064
# support --undefined. This deserves some investigation. FIXME
3065
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3067
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2986
3072
case $cc_basename in
3148
3233
hpux10*|hpux11*)
3149
3234
if test $with_gnu_ld = no; then
3152
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3235
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3236
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3153
3240
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3154
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3157
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3160
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3161
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3162
3243
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3168
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3169
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3172
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3173
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3174
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3175
# but as the default
3176
# location of the library.
3249
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3250
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3179
3253
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3623
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3624
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3697
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3698
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3699
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3700
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3701
runpath_var='LD_RUN_PATH'
3703
case $cc_basename in
3705
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3706
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3709
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3710
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3714
sysv5* | sco3.2v5* | sco5v6*)
3715
# Note: We can NOT use -z defs as we might desire, because we do not
3716
# link with -lc, and that would cause any symbols used from libc to
3717
# always be unresolved, which means just about no library would
3718
# ever link correctly. If we're not using GNU ld we use -z text
3719
# though, which does catch some bad symbols but isn't as heavy-handed
3721
# For security reasons, it is highly recommended that you always
3722
# use absolute paths for naming shared libraries, and exclude the
3723
# DT_RUNPATH tag from executables and libraries. But doing so
3724
# requires that you compile everything twice, which is a pain.
3725
# So that behaviour is only enabled if SCOABSPATH is set to a
3726
# non-empty value in the environment. Most likely only useful for
3727
# creating official distributions of packages.
3728
# This is a hack until libtool officially supports absolute path
3729
# names for shared libraries.
3730
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3731
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3732
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3733
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3734
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3735
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3736
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3737
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3738
runpath_var='LD_RUN_PATH'
3740
case $cc_basename in
3742
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3743
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3746
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3747
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3627
3752
case $cc_basename in
5394
5573
echo EXPORTS > $output_objdir/$soname.def;
5395
5574
cat $export_symbols >> $output_objdir/$soname.def;
5397
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5576
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5399
5578
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5583
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5584
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5585
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5586
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5587
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5588
# Instead, shared libraries are loaded at an image base (0x10000000 by
5589
# default) and relocated if they conflict, which is a slow very memory
5590
# consuming and fragmenting process. To avoid this, we pick a random,
5591
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5592
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5593
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5594
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5404
5598
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5406
5600
case $cc_basename,$host_cpu in
5407
5601
pgcc*) # Portland Group C compiler
5408
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5602
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5603
tmp_addflag=' $pic_flag'
5410
pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
5411
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5412
tmp_addflag=' -fpic -Mnomain' ;;
5605
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5606
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5607
tmp_addflag=' $pic_flag -Mnomain' ;;
5413
5608
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5414
5609
tmp_addflag=' -i_dynamic' ;;
5415
5610
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5756
5978
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5760
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5982
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5983
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5985
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5987
if test "$with_gnu_ld" = no; then
5988
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5989
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5991
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5992
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5994
# hardcode_minus_L: Not really in the search PATH,
5995
# but as the default location of the library.
5996
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6001
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5763
6004
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6007
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5766
6010
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5772
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6016
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6019
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5775
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6022
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5779
6026
if test "$with_gnu_ld" = no; then
5782
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6027
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6028
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5783
6032
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5784
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5785
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5786
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5789
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5790
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5791
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5793
# hardcode_minus_L: Not really in the search PATH,
5794
# but as the default location of the library.
5795
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6033
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6034
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5798
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5799
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5800
6037
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5801
6038
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5995
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5996
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5997
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5998
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5999
hardcode_runpath_var=yes
6000
runpath_var=LD_RUN_PATH
6003
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6004
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6005
if test "$GCC" = yes; then
6006
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6008
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6010
runpath_var='LD_RUN_PATH'
6011
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6015
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6016
# $CC -shared without GNU ld will not create a library from C++
6017
# object files and a static libstdc++, better avoid it by now
6018
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6020
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6021
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6022
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6023
runpath_var='LD_RUN_PATH'
6223
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6224
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6225
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6226
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6227
runpath_var='LD_RUN_PATH'
6229
if test "$GCC" = yes; then
6230
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6231
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6233
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6234
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6238
sysv5* | sco3.2v5* | sco5v6*)
6239
# Note: We can NOT use -z defs as we might desire, because we do not
6240
# link with -lc, and that would cause any symbols used from libc to
6241
# always be unresolved, which means just about no library would
6242
# ever link correctly. If we're not using GNU ld we use -z text
6243
# though, which does catch some bad symbols but isn't as heavy-handed
6245
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6246
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6247
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6248
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6249
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6250
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6251
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6252
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6253
runpath_var='LD_RUN_PATH'
6255
if test "$GCC" = yes; then
6256
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6257
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6259
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6260
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6225
6459
AC_MSG_RESULT([$SED])
6229
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
6230
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
6231
dnl also defines GSTUFF_PKG_ERRORS on error
6232
AC_DEFUN([PKG_CHECK_MODULES], [
6235
if test -z "$PKG_CONFIG"; then
6236
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
6239
if test "$PKG_CONFIG" = "no" ; then
6240
echo "*** The pkg-config script could not be found. Make sure it is"
6241
echo "*** in your path, or set the PKG_CONFIG environment variable"
6242
echo "*** to the full path to pkg-config."
6243
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
6245
PKG_CONFIG_MIN_VERSION=0.9.0
6246
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6247
AC_MSG_CHECKING(for $2)
6249
if $PKG_CONFIG --exists "$2" ; then
6253
AC_MSG_CHECKING($1_CFLAGS)
6254
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
6255
AC_MSG_RESULT($$1_CFLAGS)
6257
AC_MSG_CHECKING($1_LIBS)
6258
$1_LIBS=`$PKG_CONFIG --libs "$2"`
6259
AC_MSG_RESULT($$1_LIBS)
6263
## If we have a custom action on failure, don't print errors, but
6264
## do set a variable so people can do so.
6265
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6266
ifelse([$4], ,echo $$1_PKG_ERRORS,)
6462
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6464
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6466
# This program is free software; you can redistribute it and/or modify
6467
# it under the terms of the GNU General Public License as published by
6468
# the Free Software Foundation; either version 2 of the License, or
6469
# (at your option) any later version.
6471
# This program is distributed in the hope that it will be useful, but
6472
# WITHOUT ANY WARRANTY; without even the implied warranty of
6473
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6474
# General Public License for more details.
6476
# You should have received a copy of the GNU General Public License
6477
# along with this program; if not, write to the Free Software
6478
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6480
# As a special exception to the GNU General Public License, if you
6481
# distribute this file as part of a program that contains a
6482
# configuration script generated by Autoconf, you may include it under
6483
# the same distribution terms that you use for the rest of that program.
6485
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6486
# ----------------------------------
6487
AC_DEFUN([PKG_PROG_PKG_CONFIG],
6488
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6489
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6490
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6491
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6492
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6494
if test -n "$PKG_CONFIG"; then
6495
_pkg_min_version=m4_default([$1], [0.9.0])
6496
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6497
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6498
AC_MSG_RESULT([yes])
6505
])# PKG_PROG_PKG_CONFIG
6507
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6509
# Check to see whether a particular set of modules exists. Similar
6510
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6513
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6514
# this or PKG_CHECK_MODULES is called, or make sure to call
6515
# PKG_CHECK_EXISTS manually
6516
# --------------------------------------------------------------
6517
AC_DEFUN([PKG_CHECK_EXISTS],
6518
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6519
if test -n "$PKG_CONFIG" && \
6520
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6521
m4_ifval([$2], [$2], [:])
6522
m4_ifvaln([$3], [else
6527
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6528
# ---------------------------------------------
6529
m4_define([_PKG_CONFIG],
6530
[if test -n "$PKG_CONFIG"; then
6531
if test -n "$$1"; then
6534
PKG_CHECK_EXISTS([$3],
6535
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6543
# _PKG_SHORT_ERRORS_SUPPORTED
6544
# -----------------------------
6545
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6546
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6547
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6548
_pkg_short_errors_supported=yes
6550
_pkg_short_errors_supported=no
6552
])# _PKG_SHORT_ERRORS_SUPPORTED
6555
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6556
# [ACTION-IF-NOT-FOUND])
6559
# Note that if there is a possibility the first call to
6560
# PKG_CHECK_MODULES might not happen, you should be sure to include an
6561
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6564
# --------------------------------------------------------------
6565
AC_DEFUN([PKG_CHECK_MODULES],
6566
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6567
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6568
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6571
AC_MSG_CHECKING([for $1])
6573
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6574
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6576
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6577
and $1[]_LIBS to avoid the need to call pkg-config.
6578
See the pkg-config man page for more details.])
6580
if test $pkg_failed = yes; then
6581
_PKG_SHORT_ERRORS_SUPPORTED
6582
if test $_pkg_short_errors_supported = yes; then
6583
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6585
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6272
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6273
echo "*** See http://www.freedesktop.org/software/pkgconfig"
6277
if test $succeeded = yes; then
6278
ifelse([$3], , :, [$3])
6280
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])
6587
# Put the nasty error message in config.log where it belongs
6588
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6590
ifelse([$4], , [AC_MSG_ERROR(dnl
6591
[Package requirements ($2) were not met:
6595
Consider adjusting the PKG_CONFIG_PATH environment variable if you
6596
installed software in a non-standard prefix.
6601
elif test $pkg_failed = untried; then
6602
ifelse([$4], , [AC_MSG_FAILURE(dnl
6603
[The pkg-config script could not be found or is too old. Make sure it
6604
is in your PATH or set the PKG_CONFIG environment variable to the full
6609
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6612
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6613
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6614
AC_MSG_RESULT([yes])
6615
ifelse([$3], , :, [$3])
6617
])# PKG_CHECK_MODULES
6286
6619
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.