13521
13829
enable_fast_install=needless
13526
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
13527
echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
13528
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
13529
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
13530
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
13531
echo "$as_me:$LINENO: result: yes" >&5
13532
echo "${ECHO_T}yes" >&6
13534
# FIXME - insert some real tests, host_os isn't really good enough
13537
if test -n "$STRIP" ; then
13538
striplib="$STRIP -x"
13539
echo "$as_me:$LINENO: result: yes" >&5
13540
echo "${ECHO_T}yes" >&6
13542
echo "$as_me:$LINENO: result: no" >&5
13543
echo "${ECHO_T}no" >&6
13547
echo "$as_me:$LINENO: result: no" >&5
13548
echo "${ECHO_T}no" >&6
13553
if test "x$enable_dlopen" != xyes; then
13554
enable_dlopen=unknown
13555
enable_dlopen_self=unknown
13556
enable_dlopen_self_static=unknown
13563
lt_cv_dlopen="load_add_on"
13565
lt_cv_dlopen_self=yes
13569
lt_cv_dlopen="LoadLibrary"
13574
lt_cv_dlopen="dlopen"
13579
# if libdl is installed we need to link against it
13580
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13581
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
13582
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13583
echo $ECHO_N "(cached) $ECHO_C" >&6
13585
ac_check_lib_save_LIBS=$LIBS
13587
cat >conftest.$ac_ext <<_ACEOF
13590
cat confdefs.h >>conftest.$ac_ext
13591
cat >>conftest.$ac_ext <<_ACEOF
13592
/* end confdefs.h. */
13594
/* Override any gcc2 internal prototype to avoid an error. */
13598
/* We use char because int might match the return type of a gcc2
13599
builtin and then its argument prototype would still apply. */
13609
rm -f conftest.$ac_objext conftest$ac_exeext
13610
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13611
(eval $ac_link) 2>conftest.er1
13613
grep -v '^ *+' conftest.er1 >conftest.err
13615
cat conftest.err >&5
13616
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617
(exit $ac_status); } &&
13618
{ ac_try='test -z "$ac_cxx_werror_flag"
13619
|| test ! -s conftest.err'
13620
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13621
(eval $ac_try) 2>&5
13623
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13624
(exit $ac_status); }; } &&
13625
{ ac_try='test -s conftest$ac_exeext'
13626
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13627
(eval $ac_try) 2>&5
13629
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13630
(exit $ac_status); }; }; then
13631
ac_cv_lib_dl_dlopen=yes
13633
echo "$as_me: failed program was:" >&5
13634
sed 's/^/| /' conftest.$ac_ext >&5
13636
ac_cv_lib_dl_dlopen=no
13638
rm -f conftest.err conftest.$ac_objext \
13639
conftest$ac_exeext conftest.$ac_ext
13640
LIBS=$ac_check_lib_save_LIBS
13642
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13643
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
13644
if test $ac_cv_lib_dl_dlopen = yes; then
13645
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13648
lt_cv_dlopen="dyld"
13650
lt_cv_dlopen_self=yes
13657
echo "$as_me:$LINENO: checking for shl_load" >&5
13658
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
13659
if test "${ac_cv_func_shl_load+set}" = set; then
13660
echo $ECHO_N "(cached) $ECHO_C" >&6
13662
cat >conftest.$ac_ext <<_ACEOF
13665
cat confdefs.h >>conftest.$ac_ext
13666
cat >>conftest.$ac_ext <<_ACEOF
13667
/* end confdefs.h. */
13668
/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
13669
For example, HP-UX 11i <limits.h> declares gettimeofday. */
13670
#define shl_load innocuous_shl_load
13672
/* System header to define __stub macros and hopefully few prototypes,
13673
which can conflict with char shl_load (); below.
13674
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13675
<limits.h> exists even on freestanding compilers. */
13678
# include <limits.h>
13680
# include <assert.h>
13685
/* Override any gcc2 internal prototype to avoid an error. */
13690
/* We use char because int might match the return type of a gcc2
13691
builtin and then its argument prototype would still apply. */
13693
/* The GNU C library defines this for functions which it implements
13694
to always fail with ENOSYS. Some functions are actually named
13695
something starting with __ and the normal name is an alias. */
13696
#if defined (__stub_shl_load) || defined (__stub___shl_load)
13699
char (*f) () = shl_load;
13708
return f != shl_load;
13713
rm -f conftest.$ac_objext conftest$ac_exeext
13714
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13715
(eval $ac_link) 2>conftest.er1
13717
grep -v '^ *+' conftest.er1 >conftest.err
13719
cat conftest.err >&5
13720
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13721
(exit $ac_status); } &&
13722
{ ac_try='test -z "$ac_cxx_werror_flag"
13723
|| test ! -s conftest.err'
13724
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13725
(eval $ac_try) 2>&5
13727
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728
(exit $ac_status); }; } &&
13729
{ ac_try='test -s conftest$ac_exeext'
13730
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731
(eval $ac_try) 2>&5
13733
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734
(exit $ac_status); }; }; then
13735
ac_cv_func_shl_load=yes
13737
echo "$as_me: failed program was:" >&5
13738
sed 's/^/| /' conftest.$ac_ext >&5
13740
ac_cv_func_shl_load=no
13742
rm -f conftest.err conftest.$ac_objext \
13743
conftest$ac_exeext conftest.$ac_ext
13745
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
13746
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
13747
if test $ac_cv_func_shl_load = yes; then
13748
lt_cv_dlopen="shl_load"
13750
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13751
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
13752
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13753
echo $ECHO_N "(cached) $ECHO_C" >&6
13755
ac_check_lib_save_LIBS=$LIBS
13757
cat >conftest.$ac_ext <<_ACEOF
13760
cat confdefs.h >>conftest.$ac_ext
13761
cat >>conftest.$ac_ext <<_ACEOF
13762
/* end confdefs.h. */
13764
/* Override any gcc2 internal prototype to avoid an error. */
13768
/* We use char because int might match the return type of a gcc2
13769
builtin and then its argument prototype would still apply. */
13779
rm -f conftest.$ac_objext conftest$ac_exeext
13780
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13781
(eval $ac_link) 2>conftest.er1
13783
grep -v '^ *+' conftest.er1 >conftest.err
13785
cat conftest.err >&5
13786
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787
(exit $ac_status); } &&
13788
{ ac_try='test -z "$ac_cxx_werror_flag"
13789
|| test ! -s conftest.err'
13790
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13791
(eval $ac_try) 2>&5
13793
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794
(exit $ac_status); }; } &&
13795
{ ac_try='test -s conftest$ac_exeext'
13796
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13797
(eval $ac_try) 2>&5
13799
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800
(exit $ac_status); }; }; then
13801
ac_cv_lib_dld_shl_load=yes
13803
echo "$as_me: failed program was:" >&5
13804
sed 's/^/| /' conftest.$ac_ext >&5
13806
ac_cv_lib_dld_shl_load=no
13808
rm -f conftest.err conftest.$ac_objext \
13809
conftest$ac_exeext conftest.$ac_ext
13810
LIBS=$ac_check_lib_save_LIBS
13812
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13813
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
13814
if test $ac_cv_lib_dld_shl_load = yes; then
13815
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
13817
echo "$as_me:$LINENO: checking for dlopen" >&5
13818
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
13819
if test "${ac_cv_func_dlopen+set}" = set; then
13820
echo $ECHO_N "(cached) $ECHO_C" >&6
13822
cat >conftest.$ac_ext <<_ACEOF
13825
cat confdefs.h >>conftest.$ac_ext
13826
cat >>conftest.$ac_ext <<_ACEOF
13827
/* end confdefs.h. */
13828
/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
13829
For example, HP-UX 11i <limits.h> declares gettimeofday. */
13830
#define dlopen innocuous_dlopen
13832
/* System header to define __stub macros and hopefully few prototypes,
13833
which can conflict with char dlopen (); below.
13834
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13835
<limits.h> exists even on freestanding compilers. */
13838
# include <limits.h>
13840
# include <assert.h>
13845
/* Override any gcc2 internal prototype to avoid an error. */
13850
/* We use char because int might match the return type of a gcc2
13851
builtin and then its argument prototype would still apply. */
13853
/* The GNU C library defines this for functions which it implements
13854
to always fail with ENOSYS. Some functions are actually named
13855
something starting with __ and the normal name is an alias. */
13856
#if defined (__stub_dlopen) || defined (__stub___dlopen)
13859
char (*f) () = dlopen;
13868
return f != dlopen;
13873
rm -f conftest.$ac_objext conftest$ac_exeext
13874
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13875
(eval $ac_link) 2>conftest.er1
13877
grep -v '^ *+' conftest.er1 >conftest.err
13879
cat conftest.err >&5
13880
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881
(exit $ac_status); } &&
13882
{ ac_try='test -z "$ac_cxx_werror_flag"
13883
|| test ! -s conftest.err'
13884
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13885
(eval $ac_try) 2>&5
13887
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888
(exit $ac_status); }; } &&
13889
{ ac_try='test -s conftest$ac_exeext'
13890
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13891
(eval $ac_try) 2>&5
13893
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894
(exit $ac_status); }; }; then
13895
ac_cv_func_dlopen=yes
13897
echo "$as_me: failed program was:" >&5
13898
sed 's/^/| /' conftest.$ac_ext >&5
13900
ac_cv_func_dlopen=no
13902
rm -f conftest.err conftest.$ac_objext \
13903
conftest$ac_exeext conftest.$ac_ext
13905
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
13906
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
13907
if test $ac_cv_func_dlopen = yes; then
13908
lt_cv_dlopen="dlopen"
13910
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13911
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
13912
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13913
echo $ECHO_N "(cached) $ECHO_C" >&6
13915
ac_check_lib_save_LIBS=$LIBS
13917
cat >conftest.$ac_ext <<_ACEOF
13920
cat confdefs.h >>conftest.$ac_ext
13921
cat >>conftest.$ac_ext <<_ACEOF
13922
/* end confdefs.h. */
13924
/* Override any gcc2 internal prototype to avoid an error. */
13928
/* We use char because int might match the return type of a gcc2
13929
builtin and then its argument prototype would still apply. */
13939
rm -f conftest.$ac_objext conftest$ac_exeext
13940
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13941
(eval $ac_link) 2>conftest.er1
13943
grep -v '^ *+' conftest.er1 >conftest.err
13945
cat conftest.err >&5
13946
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947
(exit $ac_status); } &&
13948
{ ac_try='test -z "$ac_cxx_werror_flag"
13949
|| test ! -s conftest.err'
13950
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13951
(eval $ac_try) 2>&5
13953
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954
(exit $ac_status); }; } &&
13955
{ ac_try='test -s conftest$ac_exeext'
13956
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957
(eval $ac_try) 2>&5
13959
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960
(exit $ac_status); }; }; then
13961
ac_cv_lib_dl_dlopen=yes
13963
echo "$as_me: failed program was:" >&5
13964
sed 's/^/| /' conftest.$ac_ext >&5
13966
ac_cv_lib_dl_dlopen=no
13968
rm -f conftest.err conftest.$ac_objext \
13969
conftest$ac_exeext conftest.$ac_ext
13970
LIBS=$ac_check_lib_save_LIBS
13972
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13973
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
13974
if test $ac_cv_lib_dl_dlopen = yes; then
13975
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13977
echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
13978
echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
13979
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
13980
echo $ECHO_N "(cached) $ECHO_C" >&6
13982
ac_check_lib_save_LIBS=$LIBS
13983
LIBS="-lsvld $LIBS"
13984
cat >conftest.$ac_ext <<_ACEOF
13987
cat confdefs.h >>conftest.$ac_ext
13988
cat >>conftest.$ac_ext <<_ACEOF
13989
/* end confdefs.h. */
13991
/* Override any gcc2 internal prototype to avoid an error. */
13995
/* We use char because int might match the return type of a gcc2
13996
builtin and then its argument prototype would still apply. */
14006
rm -f conftest.$ac_objext conftest$ac_exeext
14007
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14008
(eval $ac_link) 2>conftest.er1
14010
grep -v '^ *+' conftest.er1 >conftest.err
14012
cat conftest.err >&5
14013
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14014
(exit $ac_status); } &&
14015
{ ac_try='test -z "$ac_cxx_werror_flag"
14016
|| test ! -s conftest.err'
14017
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14018
(eval $ac_try) 2>&5
14020
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14021
(exit $ac_status); }; } &&
14022
{ ac_try='test -s conftest$ac_exeext'
14023
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14024
(eval $ac_try) 2>&5
14026
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027
(exit $ac_status); }; }; then
14028
ac_cv_lib_svld_dlopen=yes
14030
echo "$as_me: failed program was:" >&5
14031
sed 's/^/| /' conftest.$ac_ext >&5
14033
ac_cv_lib_svld_dlopen=no
14035
rm -f conftest.err conftest.$ac_objext \
14036
conftest$ac_exeext conftest.$ac_ext
14037
LIBS=$ac_check_lib_save_LIBS
14039
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
14040
echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
14041
if test $ac_cv_lib_svld_dlopen = yes; then
14042
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
14044
echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
14045
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
14046
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
14047
echo $ECHO_N "(cached) $ECHO_C" >&6
14049
ac_check_lib_save_LIBS=$LIBS
14051
cat >conftest.$ac_ext <<_ACEOF
14054
cat confdefs.h >>conftest.$ac_ext
14055
cat >>conftest.$ac_ext <<_ACEOF
14056
/* end confdefs.h. */
14058
/* Override any gcc2 internal prototype to avoid an error. */
14062
/* We use char because int might match the return type of a gcc2
14063
builtin and then its argument prototype would still apply. */
14073
rm -f conftest.$ac_objext conftest$ac_exeext
14074
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14075
(eval $ac_link) 2>conftest.er1
14077
grep -v '^ *+' conftest.er1 >conftest.err
14079
cat conftest.err >&5
14080
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081
(exit $ac_status); } &&
14082
{ ac_try='test -z "$ac_cxx_werror_flag"
14083
|| test ! -s conftest.err'
14084
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14085
(eval $ac_try) 2>&5
14087
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088
(exit $ac_status); }; } &&
14089
{ ac_try='test -s conftest$ac_exeext'
14090
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091
(eval $ac_try) 2>&5
14093
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094
(exit $ac_status); }; }; then
14095
ac_cv_lib_dld_dld_link=yes
14097
echo "$as_me: failed program was:" >&5
14098
sed 's/^/| /' conftest.$ac_ext >&5
14100
ac_cv_lib_dld_dld_link=no
14102
rm -f conftest.err conftest.$ac_objext \
14103
conftest$ac_exeext conftest.$ac_ext
14104
LIBS=$ac_check_lib_save_LIBS
14106
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
14107
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
14108
if test $ac_cv_lib_dld_dld_link = yes; then
14109
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
14130
if test "x$lt_cv_dlopen" != xno; then
14136
case $lt_cv_dlopen in
14138
save_CPPFLAGS="$CPPFLAGS"
14139
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14141
save_LDFLAGS="$LDFLAGS"
14142
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14145
LIBS="$lt_cv_dlopen_libs $LIBS"
14147
echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
14148
echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
14149
if test "${lt_cv_dlopen_self+set}" = set; then
14150
echo $ECHO_N "(cached) $ECHO_C" >&6
14152
if test "$cross_compiling" = yes; then :
14153
lt_cv_dlopen_self=cross
14155
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14156
lt_status=$lt_dlunknown
14157
cat > conftest.$ac_ext <<EOF
14158
#line 14158 "configure"
14159
#include "confdefs.h"
14168
# define LT_DLGLOBAL RTLD_GLOBAL
14171
# define LT_DLGLOBAL DL_GLOBAL
14173
# define LT_DLGLOBAL 0
14177
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14178
find out it does not work in some platform. */
14179
#ifndef LT_DLLAZY_OR_NOW
14181
# define LT_DLLAZY_OR_NOW RTLD_LAZY
14184
# define LT_DLLAZY_OR_NOW DL_LAZY
14187
# define LT_DLLAZY_OR_NOW RTLD_NOW
14190
# define LT_DLLAZY_OR_NOW DL_NOW
14192
# define LT_DLLAZY_OR_NOW 0
14200
extern "C" void exit (int);
14203
void fnord() { int i=42;}
14206
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14207
int status = $lt_dlunknown;
14211
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14212
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14213
/* dlclose (self); */
14219
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14220
(eval $ac_link) 2>&5
14222
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14223
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
14224
(./conftest; exit; ) >&5 2>/dev/null
14226
case x$lt_status in
14227
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14228
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14229
x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
14232
# compilation failed
14233
lt_cv_dlopen_self=no
14240
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
14241
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
14243
if test "x$lt_cv_dlopen_self" = xyes; then
14244
LDFLAGS="$LDFLAGS $link_static_flag"
14245
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
14246
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
14247
if test "${lt_cv_dlopen_self_static+set}" = set; then
14248
echo $ECHO_N "(cached) $ECHO_C" >&6
14250
if test "$cross_compiling" = yes; then :
14251
lt_cv_dlopen_self_static=cross
14253
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14254
lt_status=$lt_dlunknown
14255
cat > conftest.$ac_ext <<EOF
14256
#line 14256 "configure"
14257
#include "confdefs.h"
14266
# define LT_DLGLOBAL RTLD_GLOBAL
14269
# define LT_DLGLOBAL DL_GLOBAL
14271
# define LT_DLGLOBAL 0
14275
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14276
find out it does not work in some platform. */
14277
#ifndef LT_DLLAZY_OR_NOW
14279
# define LT_DLLAZY_OR_NOW RTLD_LAZY
14282
# define LT_DLLAZY_OR_NOW DL_LAZY
14285
# define LT_DLLAZY_OR_NOW RTLD_NOW
14288
# define LT_DLLAZY_OR_NOW DL_NOW
14290
# define LT_DLLAZY_OR_NOW 0
14298
extern "C" void exit (int);
14301
void fnord() { int i=42;}
14304
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14305
int status = $lt_dlunknown;
14309
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14310
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14311
/* dlclose (self); */
14317
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14318
(eval $ac_link) 2>&5
14320
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
14322
(./conftest; exit; ) >&5 2>/dev/null
14324
case x$lt_status in
14325
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14326
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14327
x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
14330
# compilation failed
14331
lt_cv_dlopen_self_static=no
14338
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
14339
echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
14342
CPPFLAGS="$save_CPPFLAGS"
14343
LDFLAGS="$save_LDFLAGS"
14348
case $lt_cv_dlopen_self in
14349
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14350
*) enable_dlopen_self=unknown ;;
14353
case $lt_cv_dlopen_self_static in
14354
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14355
*) enable_dlopen_self_static=unknown ;;
14360
13833
# The else clause should only fire when bootstrapping the
14361
13834
# libtool distribution, otherwise you forgot to ship ltmain.sh
19268
19011
enable_fast_install=needless
19273
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
19274
echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
19275
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
19276
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19277
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19278
echo "$as_me:$LINENO: result: yes" >&5
19279
echo "${ECHO_T}yes" >&6
19281
# FIXME - insert some real tests, host_os isn't really good enough
19284
if test -n "$STRIP" ; then
19285
striplib="$STRIP -x"
19286
echo "$as_me:$LINENO: result: yes" >&5
19287
echo "${ECHO_T}yes" >&6
19289
echo "$as_me:$LINENO: result: no" >&5
19290
echo "${ECHO_T}no" >&6
19294
echo "$as_me:$LINENO: result: no" >&5
19295
echo "${ECHO_T}no" >&6
19300
if test "x$enable_dlopen" != xyes; then
19301
enable_dlopen=unknown
19302
enable_dlopen_self=unknown
19303
enable_dlopen_self_static=unknown
19310
lt_cv_dlopen="load_add_on"
19312
lt_cv_dlopen_self=yes
19316
lt_cv_dlopen="LoadLibrary"
19321
lt_cv_dlopen="dlopen"
19326
# if libdl is installed we need to link against it
19327
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19328
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19329
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19330
echo $ECHO_N "(cached) $ECHO_C" >&6
19332
ac_check_lib_save_LIBS=$LIBS
19334
cat >conftest.$ac_ext <<_ACEOF
19337
cat confdefs.h >>conftest.$ac_ext
19338
cat >>conftest.$ac_ext <<_ACEOF
19339
/* end confdefs.h. */
19341
/* Override any gcc2 internal prototype to avoid an error. */
19345
/* We use char because int might match the return type of a gcc2
19346
builtin and then its argument prototype would still apply. */
19356
rm -f conftest.$ac_objext conftest$ac_exeext
19357
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19358
(eval $ac_link) 2>conftest.er1
19360
grep -v '^ *+' conftest.er1 >conftest.err
19362
cat conftest.err >&5
19363
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19364
(exit $ac_status); } &&
19365
{ ac_try='test -z "$ac_c_werror_flag"
19366
|| test ! -s conftest.err'
19367
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19368
(eval $ac_try) 2>&5
19370
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19371
(exit $ac_status); }; } &&
19372
{ ac_try='test -s conftest$ac_exeext'
19373
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19374
(eval $ac_try) 2>&5
19376
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19377
(exit $ac_status); }; }; then
19378
ac_cv_lib_dl_dlopen=yes
19380
echo "$as_me: failed program was:" >&5
19381
sed 's/^/| /' conftest.$ac_ext >&5
19383
ac_cv_lib_dl_dlopen=no
19385
rm -f conftest.err conftest.$ac_objext \
19386
conftest$ac_exeext conftest.$ac_ext
19387
LIBS=$ac_check_lib_save_LIBS
19389
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19390
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19391
if test $ac_cv_lib_dl_dlopen = yes; then
19392
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19395
lt_cv_dlopen="dyld"
19397
lt_cv_dlopen_self=yes
19404
echo "$as_me:$LINENO: checking for shl_load" >&5
19405
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
19406
if test "${ac_cv_func_shl_load+set}" = set; then
19407
echo $ECHO_N "(cached) $ECHO_C" >&6
19409
cat >conftest.$ac_ext <<_ACEOF
19412
cat confdefs.h >>conftest.$ac_ext
19413
cat >>conftest.$ac_ext <<_ACEOF
19414
/* end confdefs.h. */
19415
/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
19416
For example, HP-UX 11i <limits.h> declares gettimeofday. */
19417
#define shl_load innocuous_shl_load
19419
/* System header to define __stub macros and hopefully few prototypes,
19420
which can conflict with char shl_load (); below.
19421
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19422
<limits.h> exists even on freestanding compilers. */
19425
# include <limits.h>
19427
# include <assert.h>
19432
/* Override any gcc2 internal prototype to avoid an error. */
19437
/* We use char because int might match the return type of a gcc2
19438
builtin and then its argument prototype would still apply. */
19440
/* The GNU C library defines this for functions which it implements
19441
to always fail with ENOSYS. Some functions are actually named
19442
something starting with __ and the normal name is an alias. */
19443
#if defined (__stub_shl_load) || defined (__stub___shl_load)
19446
char (*f) () = shl_load;
19455
return f != shl_load;
19460
rm -f conftest.$ac_objext conftest$ac_exeext
19461
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19462
(eval $ac_link) 2>conftest.er1
19464
grep -v '^ *+' conftest.er1 >conftest.err
19466
cat conftest.err >&5
19467
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19468
(exit $ac_status); } &&
19469
{ ac_try='test -z "$ac_c_werror_flag"
19470
|| test ! -s conftest.err'
19471
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19472
(eval $ac_try) 2>&5
19474
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19475
(exit $ac_status); }; } &&
19476
{ ac_try='test -s conftest$ac_exeext'
19477
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19478
(eval $ac_try) 2>&5
19480
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19481
(exit $ac_status); }; }; then
19482
ac_cv_func_shl_load=yes
19484
echo "$as_me: failed program was:" >&5
19485
sed 's/^/| /' conftest.$ac_ext >&5
19487
ac_cv_func_shl_load=no
19489
rm -f conftest.err conftest.$ac_objext \
19490
conftest$ac_exeext conftest.$ac_ext
19492
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
19493
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
19494
if test $ac_cv_func_shl_load = yes; then
19495
lt_cv_dlopen="shl_load"
19497
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
19498
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
19499
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
19500
echo $ECHO_N "(cached) $ECHO_C" >&6
19502
ac_check_lib_save_LIBS=$LIBS
19504
cat >conftest.$ac_ext <<_ACEOF
19507
cat confdefs.h >>conftest.$ac_ext
19508
cat >>conftest.$ac_ext <<_ACEOF
19509
/* end confdefs.h. */
19511
/* Override any gcc2 internal prototype to avoid an error. */
19515
/* We use char because int might match the return type of a gcc2
19516
builtin and then its argument prototype would still apply. */
19526
rm -f conftest.$ac_objext conftest$ac_exeext
19527
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19528
(eval $ac_link) 2>conftest.er1
19530
grep -v '^ *+' conftest.er1 >conftest.err
19532
cat conftest.err >&5
19533
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19534
(exit $ac_status); } &&
19535
{ ac_try='test -z "$ac_c_werror_flag"
19536
|| test ! -s conftest.err'
19537
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19538
(eval $ac_try) 2>&5
19540
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19541
(exit $ac_status); }; } &&
19542
{ ac_try='test -s conftest$ac_exeext'
19543
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19544
(eval $ac_try) 2>&5
19546
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19547
(exit $ac_status); }; }; then
19548
ac_cv_lib_dld_shl_load=yes
19550
echo "$as_me: failed program was:" >&5
19551
sed 's/^/| /' conftest.$ac_ext >&5
19553
ac_cv_lib_dld_shl_load=no
19555
rm -f conftest.err conftest.$ac_objext \
19556
conftest$ac_exeext conftest.$ac_ext
19557
LIBS=$ac_check_lib_save_LIBS
19559
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
19560
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
19561
if test $ac_cv_lib_dld_shl_load = yes; then
19562
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
19564
echo "$as_me:$LINENO: checking for dlopen" >&5
19565
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
19566
if test "${ac_cv_func_dlopen+set}" = set; then
19567
echo $ECHO_N "(cached) $ECHO_C" >&6
19569
cat >conftest.$ac_ext <<_ACEOF
19572
cat confdefs.h >>conftest.$ac_ext
19573
cat >>conftest.$ac_ext <<_ACEOF
19574
/* end confdefs.h. */
19575
/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
19576
For example, HP-UX 11i <limits.h> declares gettimeofday. */
19577
#define dlopen innocuous_dlopen
19579
/* System header to define __stub macros and hopefully few prototypes,
19580
which can conflict with char dlopen (); below.
19581
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19582
<limits.h> exists even on freestanding compilers. */
19585
# include <limits.h>
19587
# include <assert.h>
19592
/* Override any gcc2 internal prototype to avoid an error. */
19597
/* We use char because int might match the return type of a gcc2
19598
builtin and then its argument prototype would still apply. */
19600
/* The GNU C library defines this for functions which it implements
19601
to always fail with ENOSYS. Some functions are actually named
19602
something starting with __ and the normal name is an alias. */
19603
#if defined (__stub_dlopen) || defined (__stub___dlopen)
19606
char (*f) () = dlopen;
19615
return f != dlopen;
19620
rm -f conftest.$ac_objext conftest$ac_exeext
19621
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19622
(eval $ac_link) 2>conftest.er1
19624
grep -v '^ *+' conftest.er1 >conftest.err
19626
cat conftest.err >&5
19627
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19628
(exit $ac_status); } &&
19629
{ ac_try='test -z "$ac_c_werror_flag"
19630
|| test ! -s conftest.err'
19631
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19632
(eval $ac_try) 2>&5
19634
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19635
(exit $ac_status); }; } &&
19636
{ ac_try='test -s conftest$ac_exeext'
19637
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19638
(eval $ac_try) 2>&5
19640
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19641
(exit $ac_status); }; }; then
19642
ac_cv_func_dlopen=yes
19644
echo "$as_me: failed program was:" >&5
19645
sed 's/^/| /' conftest.$ac_ext >&5
19647
ac_cv_func_dlopen=no
19649
rm -f conftest.err conftest.$ac_objext \
19650
conftest$ac_exeext conftest.$ac_ext
19652
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
19653
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
19654
if test $ac_cv_func_dlopen = yes; then
19655
lt_cv_dlopen="dlopen"
19657
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19658
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19659
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19660
echo $ECHO_N "(cached) $ECHO_C" >&6
19662
ac_check_lib_save_LIBS=$LIBS
19664
cat >conftest.$ac_ext <<_ACEOF
19667
cat confdefs.h >>conftest.$ac_ext
19668
cat >>conftest.$ac_ext <<_ACEOF
19669
/* end confdefs.h. */
19671
/* Override any gcc2 internal prototype to avoid an error. */
19675
/* We use char because int might match the return type of a gcc2
19676
builtin and then its argument prototype would still apply. */
19686
rm -f conftest.$ac_objext conftest$ac_exeext
19687
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19688
(eval $ac_link) 2>conftest.er1
19690
grep -v '^ *+' conftest.er1 >conftest.err
19692
cat conftest.err >&5
19693
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19694
(exit $ac_status); } &&
19695
{ ac_try='test -z "$ac_c_werror_flag"
19696
|| test ! -s conftest.err'
19697
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19698
(eval $ac_try) 2>&5
19700
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19701
(exit $ac_status); }; } &&
19702
{ ac_try='test -s conftest$ac_exeext'
19703
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19704
(eval $ac_try) 2>&5
19706
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19707
(exit $ac_status); }; }; then
19708
ac_cv_lib_dl_dlopen=yes
19710
echo "$as_me: failed program was:" >&5
19711
sed 's/^/| /' conftest.$ac_ext >&5
19713
ac_cv_lib_dl_dlopen=no
19715
rm -f conftest.err conftest.$ac_objext \
19716
conftest$ac_exeext conftest.$ac_ext
19717
LIBS=$ac_check_lib_save_LIBS
19719
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19720
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19721
if test $ac_cv_lib_dl_dlopen = yes; then
19722
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19724
echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
19725
echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
19726
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
19727
echo $ECHO_N "(cached) $ECHO_C" >&6
19729
ac_check_lib_save_LIBS=$LIBS
19730
LIBS="-lsvld $LIBS"
19731
cat >conftest.$ac_ext <<_ACEOF
19734
cat confdefs.h >>conftest.$ac_ext
19735
cat >>conftest.$ac_ext <<_ACEOF
19736
/* end confdefs.h. */
19738
/* Override any gcc2 internal prototype to avoid an error. */
19742
/* We use char because int might match the return type of a gcc2
19743
builtin and then its argument prototype would still apply. */
19753
rm -f conftest.$ac_objext conftest$ac_exeext
19754
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19755
(eval $ac_link) 2>conftest.er1
19757
grep -v '^ *+' conftest.er1 >conftest.err
19759
cat conftest.err >&5
19760
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19761
(exit $ac_status); } &&
19762
{ ac_try='test -z "$ac_c_werror_flag"
19763
|| test ! -s conftest.err'
19764
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19765
(eval $ac_try) 2>&5
19767
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19768
(exit $ac_status); }; } &&
19769
{ ac_try='test -s conftest$ac_exeext'
19770
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19771
(eval $ac_try) 2>&5
19773
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19774
(exit $ac_status); }; }; then
19775
ac_cv_lib_svld_dlopen=yes
19777
echo "$as_me: failed program was:" >&5
19778
sed 's/^/| /' conftest.$ac_ext >&5
19780
ac_cv_lib_svld_dlopen=no
19782
rm -f conftest.err conftest.$ac_objext \
19783
conftest$ac_exeext conftest.$ac_ext
19784
LIBS=$ac_check_lib_save_LIBS
19786
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
19787
echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
19788
if test $ac_cv_lib_svld_dlopen = yes; then
19789
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
19791
echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
19792
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
19793
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
19794
echo $ECHO_N "(cached) $ECHO_C" >&6
19796
ac_check_lib_save_LIBS=$LIBS
19798
cat >conftest.$ac_ext <<_ACEOF
19801
cat confdefs.h >>conftest.$ac_ext
19802
cat >>conftest.$ac_ext <<_ACEOF
19803
/* end confdefs.h. */
19805
/* Override any gcc2 internal prototype to avoid an error. */
19809
/* We use char because int might match the return type of a gcc2
19810
builtin and then its argument prototype would still apply. */
19820
rm -f conftest.$ac_objext conftest$ac_exeext
19821
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19822
(eval $ac_link) 2>conftest.er1
19824
grep -v '^ *+' conftest.er1 >conftest.err
19826
cat conftest.err >&5
19827
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19828
(exit $ac_status); } &&
19829
{ ac_try='test -z "$ac_c_werror_flag"
19830
|| test ! -s conftest.err'
19831
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19832
(eval $ac_try) 2>&5
19834
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19835
(exit $ac_status); }; } &&
19836
{ ac_try='test -s conftest$ac_exeext'
19837
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19838
(eval $ac_try) 2>&5
19840
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19841
(exit $ac_status); }; }; then
19842
ac_cv_lib_dld_dld_link=yes
19844
echo "$as_me: failed program was:" >&5
19845
sed 's/^/| /' conftest.$ac_ext >&5
19847
ac_cv_lib_dld_dld_link=no
19849
rm -f conftest.err conftest.$ac_objext \
19850
conftest$ac_exeext conftest.$ac_ext
19851
LIBS=$ac_check_lib_save_LIBS
19853
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
19854
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
19855
if test $ac_cv_lib_dld_dld_link = yes; then
19856
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
19877
if test "x$lt_cv_dlopen" != xno; then
19883
case $lt_cv_dlopen in
19885
save_CPPFLAGS="$CPPFLAGS"
19886
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19888
save_LDFLAGS="$LDFLAGS"
19889
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19892
LIBS="$lt_cv_dlopen_libs $LIBS"
19894
echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
19895
echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
19896
if test "${lt_cv_dlopen_self+set}" = set; then
19897
echo $ECHO_N "(cached) $ECHO_C" >&6
19899
if test "$cross_compiling" = yes; then :
19900
lt_cv_dlopen_self=cross
19902
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19903
lt_status=$lt_dlunknown
19904
cat > conftest.$ac_ext <<EOF
19905
#line 19905 "configure"
19906
#include "confdefs.h"
19915
# define LT_DLGLOBAL RTLD_GLOBAL
19918
# define LT_DLGLOBAL DL_GLOBAL
19920
# define LT_DLGLOBAL 0
19924
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19925
find out it does not work in some platform. */
19926
#ifndef LT_DLLAZY_OR_NOW
19928
# define LT_DLLAZY_OR_NOW RTLD_LAZY
19931
# define LT_DLLAZY_OR_NOW DL_LAZY
19934
# define LT_DLLAZY_OR_NOW RTLD_NOW
19937
# define LT_DLLAZY_OR_NOW DL_NOW
19939
# define LT_DLLAZY_OR_NOW 0
19947
extern "C" void exit (int);
19950
void fnord() { int i=42;}
19953
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19954
int status = $lt_dlunknown;
19958
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19959
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19960
/* dlclose (self); */
19966
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19967
(eval $ac_link) 2>&5
19969
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19970
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19971
(./conftest; exit; ) >&5 2>/dev/null
19973
case x$lt_status in
19974
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19975
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19976
x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
19979
# compilation failed
19980
lt_cv_dlopen_self=no
19987
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19988
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19990
if test "x$lt_cv_dlopen_self" = xyes; then
19991
LDFLAGS="$LDFLAGS $link_static_flag"
19992
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19993
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19994
if test "${lt_cv_dlopen_self_static+set}" = set; then
19995
echo $ECHO_N "(cached) $ECHO_C" >&6
19997
if test "$cross_compiling" = yes; then :
19998
lt_cv_dlopen_self_static=cross
20000
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
20001
lt_status=$lt_dlunknown
20002
cat > conftest.$ac_ext <<EOF
20003
#line 20003 "configure"
20004
#include "confdefs.h"
20013
# define LT_DLGLOBAL RTLD_GLOBAL
20016
# define LT_DLGLOBAL DL_GLOBAL
20018
# define LT_DLGLOBAL 0
20022
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
20023
find out it does not work in some platform. */
20024
#ifndef LT_DLLAZY_OR_NOW
20026
# define LT_DLLAZY_OR_NOW RTLD_LAZY
20029
# define LT_DLLAZY_OR_NOW DL_LAZY
20032
# define LT_DLLAZY_OR_NOW RTLD_NOW
20035
# define LT_DLLAZY_OR_NOW DL_NOW
20037
# define LT_DLLAZY_OR_NOW 0
20045
extern "C" void exit (int);
20048
void fnord() { int i=42;}
20051
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
20052
int status = $lt_dlunknown;
20056
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
20057
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
20058
/* dlclose (self); */
20064
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20065
(eval $ac_link) 2>&5
20067
echo "$as_me:$LINENO: \$? = $ac_status" >&5
20068
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
20069
(./conftest; exit; ) >&5 2>/dev/null
20071
case x$lt_status in
20072
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
20073
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
20074
x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
20077
# compilation failed
20078
lt_cv_dlopen_self_static=no
20085
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
20086
echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
20089
CPPFLAGS="$save_CPPFLAGS"
20090
LDFLAGS="$save_LDFLAGS"
20095
case $lt_cv_dlopen_self in
20096
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20097
*) enable_dlopen_self=unknown ;;
20100
case $lt_cv_dlopen_self_static in
20101
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20102
*) enable_dlopen_self_static=unknown ;;
20107
19015
# The else clause should only fire when bootstrapping the
20108
19016
# libtool distribution, otherwise you forgot to ship ltmain.sh