12565
12825
enable_fast_install=needless
12570
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
12571
echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
12572
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
12573
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12574
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12575
echo "$as_me:$LINENO: result: yes" >&5
12576
echo "${ECHO_T}yes" >&6
12578
# FIXME - insert some real tests, host_os isn't really good enough
12581
if test -n "$STRIP" ; then
12582
striplib="$STRIP -x"
12583
echo "$as_me:$LINENO: result: yes" >&5
12584
echo "${ECHO_T}yes" >&6
12586
echo "$as_me:$LINENO: result: no" >&5
12587
echo "${ECHO_T}no" >&6
12591
echo "$as_me:$LINENO: result: no" >&5
12592
echo "${ECHO_T}no" >&6
12597
if test "x$enable_dlopen" != xyes; then
12598
enable_dlopen=unknown
12599
enable_dlopen_self=unknown
12600
enable_dlopen_self_static=unknown
12607
lt_cv_dlopen="load_add_on"
12609
lt_cv_dlopen_self=yes
12613
lt_cv_dlopen="LoadLibrary"
12618
lt_cv_dlopen="dlopen"
12623
# if libdl is installed we need to link against it
12624
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12625
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12626
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12627
echo $ECHO_N "(cached) $ECHO_C" >&6
12629
ac_check_lib_save_LIBS=$LIBS
12631
cat >conftest.$ac_ext <<_ACEOF
12634
cat confdefs.h >>conftest.$ac_ext
12635
cat >>conftest.$ac_ext <<_ACEOF
12636
/* end confdefs.h. */
12638
/* Override any gcc2 internal prototype to avoid an error. */
12642
/* We use char because int might match the return type of a gcc2
12643
builtin and then its argument prototype would still apply. */
12653
rm -f conftest.$ac_objext conftest$ac_exeext
12654
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12655
(eval $ac_link) 2>conftest.er1
12657
grep -v '^ *+' conftest.er1 >conftest.err
12659
cat conftest.err >&5
12660
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661
(exit $ac_status); } &&
12662
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12663
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12664
(eval $ac_try) 2>&5
12666
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667
(exit $ac_status); }; } &&
12668
{ ac_try='test -s conftest$ac_exeext'
12669
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12670
(eval $ac_try) 2>&5
12672
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673
(exit $ac_status); }; }; then
12674
ac_cv_lib_dl_dlopen=yes
12676
echo "$as_me: failed program was:" >&5
12677
sed 's/^/| /' conftest.$ac_ext >&5
12679
ac_cv_lib_dl_dlopen=no
12681
rm -f conftest.err conftest.$ac_objext \
12682
conftest$ac_exeext conftest.$ac_ext
12683
LIBS=$ac_check_lib_save_LIBS
12685
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12686
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12687
if test $ac_cv_lib_dl_dlopen = yes; then
12688
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12691
lt_cv_dlopen="dyld"
12693
lt_cv_dlopen_self=yes
12700
echo "$as_me:$LINENO: checking for shl_load" >&5
12701
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
12702
if test "${ac_cv_func_shl_load+set}" = set; then
12703
echo $ECHO_N "(cached) $ECHO_C" >&6
12705
cat >conftest.$ac_ext <<_ACEOF
12708
cat confdefs.h >>conftest.$ac_ext
12709
cat >>conftest.$ac_ext <<_ACEOF
12710
/* end confdefs.h. */
12711
/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
12712
For example, HP-UX 11i <limits.h> declares gettimeofday. */
12713
#define shl_load innocuous_shl_load
12715
/* System header to define __stub macros and hopefully few prototypes,
12716
which can conflict with char shl_load (); below.
12717
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12718
<limits.h> exists even on freestanding compilers. */
12721
# include <limits.h>
12723
# include <assert.h>
12728
/* Override any gcc2 internal prototype to avoid an error. */
12733
/* We use char because int might match the return type of a gcc2
12734
builtin and then its argument prototype would still apply. */
12736
/* The GNU C library defines this for functions which it implements
12737
to always fail with ENOSYS. Some functions are actually named
12738
something starting with __ and the normal name is an alias. */
12739
#if defined (__stub_shl_load) || defined (__stub___shl_load)
12742
char (*f) () = shl_load;
12751
return f != shl_load;
12756
rm -f conftest.$ac_objext conftest$ac_exeext
12757
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12758
(eval $ac_link) 2>conftest.er1
12760
grep -v '^ *+' conftest.er1 >conftest.err
12762
cat conftest.err >&5
12763
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12764
(exit $ac_status); } &&
12765
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12766
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12767
(eval $ac_try) 2>&5
12769
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12770
(exit $ac_status); }; } &&
12771
{ ac_try='test -s conftest$ac_exeext'
12772
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12773
(eval $ac_try) 2>&5
12775
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12776
(exit $ac_status); }; }; then
12777
ac_cv_func_shl_load=yes
12779
echo "$as_me: failed program was:" >&5
12780
sed 's/^/| /' conftest.$ac_ext >&5
12782
ac_cv_func_shl_load=no
12784
rm -f conftest.err conftest.$ac_objext \
12785
conftest$ac_exeext conftest.$ac_ext
12787
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
12788
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
12789
if test $ac_cv_func_shl_load = yes; then
12790
lt_cv_dlopen="shl_load"
12792
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12793
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
12794
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12795
echo $ECHO_N "(cached) $ECHO_C" >&6
12797
ac_check_lib_save_LIBS=$LIBS
12799
cat >conftest.$ac_ext <<_ACEOF
12802
cat confdefs.h >>conftest.$ac_ext
12803
cat >>conftest.$ac_ext <<_ACEOF
12804
/* end confdefs.h. */
12806
/* Override any gcc2 internal prototype to avoid an error. */
12810
/* We use char because int might match the return type of a gcc2
12811
builtin and then its argument prototype would still apply. */
12821
rm -f conftest.$ac_objext conftest$ac_exeext
12822
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12823
(eval $ac_link) 2>conftest.er1
12825
grep -v '^ *+' conftest.er1 >conftest.err
12827
cat conftest.err >&5
12828
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829
(exit $ac_status); } &&
12830
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12831
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12832
(eval $ac_try) 2>&5
12834
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835
(exit $ac_status); }; } &&
12836
{ ac_try='test -s conftest$ac_exeext'
12837
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838
(eval $ac_try) 2>&5
12840
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841
(exit $ac_status); }; }; then
12842
ac_cv_lib_dld_shl_load=yes
12844
echo "$as_me: failed program was:" >&5
12845
sed 's/^/| /' conftest.$ac_ext >&5
12847
ac_cv_lib_dld_shl_load=no
12849
rm -f conftest.err conftest.$ac_objext \
12850
conftest$ac_exeext conftest.$ac_ext
12851
LIBS=$ac_check_lib_save_LIBS
12853
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12854
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
12855
if test $ac_cv_lib_dld_shl_load = yes; then
12856
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
12858
echo "$as_me:$LINENO: checking for dlopen" >&5
12859
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
12860
if test "${ac_cv_func_dlopen+set}" = set; then
12861
echo $ECHO_N "(cached) $ECHO_C" >&6
12863
cat >conftest.$ac_ext <<_ACEOF
12866
cat confdefs.h >>conftest.$ac_ext
12867
cat >>conftest.$ac_ext <<_ACEOF
12868
/* end confdefs.h. */
12869
/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
12870
For example, HP-UX 11i <limits.h> declares gettimeofday. */
12871
#define dlopen innocuous_dlopen
12873
/* System header to define __stub macros and hopefully few prototypes,
12874
which can conflict with char dlopen (); below.
12875
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12876
<limits.h> exists even on freestanding compilers. */
12879
# include <limits.h>
12881
# include <assert.h>
12886
/* Override any gcc2 internal prototype to avoid an error. */
12891
/* We use char because int might match the return type of a gcc2
12892
builtin and then its argument prototype would still apply. */
12894
/* The GNU C library defines this for functions which it implements
12895
to always fail with ENOSYS. Some functions are actually named
12896
something starting with __ and the normal name is an alias. */
12897
#if defined (__stub_dlopen) || defined (__stub___dlopen)
12900
char (*f) () = dlopen;
12909
return f != dlopen;
12914
rm -f conftest.$ac_objext conftest$ac_exeext
12915
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12916
(eval $ac_link) 2>conftest.er1
12918
grep -v '^ *+' conftest.er1 >conftest.err
12920
cat conftest.err >&5
12921
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922
(exit $ac_status); } &&
12923
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12924
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925
(eval $ac_try) 2>&5
12927
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928
(exit $ac_status); }; } &&
12929
{ ac_try='test -s conftest$ac_exeext'
12930
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931
(eval $ac_try) 2>&5
12933
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934
(exit $ac_status); }; }; then
12935
ac_cv_func_dlopen=yes
12937
echo "$as_me: failed program was:" >&5
12938
sed 's/^/| /' conftest.$ac_ext >&5
12940
ac_cv_func_dlopen=no
12942
rm -f conftest.err conftest.$ac_objext \
12943
conftest$ac_exeext conftest.$ac_ext
12945
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
12946
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
12947
if test $ac_cv_func_dlopen = yes; then
12948
lt_cv_dlopen="dlopen"
12950
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12951
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12952
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12953
echo $ECHO_N "(cached) $ECHO_C" >&6
12955
ac_check_lib_save_LIBS=$LIBS
12957
cat >conftest.$ac_ext <<_ACEOF
12960
cat confdefs.h >>conftest.$ac_ext
12961
cat >>conftest.$ac_ext <<_ACEOF
12962
/* end confdefs.h. */
12964
/* Override any gcc2 internal prototype to avoid an error. */
12968
/* We use char because int might match the return type of a gcc2
12969
builtin and then its argument prototype would still apply. */
12979
rm -f conftest.$ac_objext conftest$ac_exeext
12980
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12981
(eval $ac_link) 2>conftest.er1
12983
grep -v '^ *+' conftest.er1 >conftest.err
12985
cat conftest.err >&5
12986
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987
(exit $ac_status); } &&
12988
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12989
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12990
(eval $ac_try) 2>&5
12992
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993
(exit $ac_status); }; } &&
12994
{ ac_try='test -s conftest$ac_exeext'
12995
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12996
(eval $ac_try) 2>&5
12998
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12999
(exit $ac_status); }; }; then
13000
ac_cv_lib_dl_dlopen=yes
13002
echo "$as_me: failed program was:" >&5
13003
sed 's/^/| /' conftest.$ac_ext >&5
13005
ac_cv_lib_dl_dlopen=no
13007
rm -f conftest.err conftest.$ac_objext \
13008
conftest$ac_exeext conftest.$ac_ext
13009
LIBS=$ac_check_lib_save_LIBS
13011
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13012
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
13013
if test $ac_cv_lib_dl_dlopen = yes; then
13014
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13016
echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
13017
echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
13018
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
13019
echo $ECHO_N "(cached) $ECHO_C" >&6
13021
ac_check_lib_save_LIBS=$LIBS
13022
LIBS="-lsvld $LIBS"
13023
cat >conftest.$ac_ext <<_ACEOF
13026
cat confdefs.h >>conftest.$ac_ext
13027
cat >>conftest.$ac_ext <<_ACEOF
13028
/* end confdefs.h. */
13030
/* Override any gcc2 internal prototype to avoid an error. */
13034
/* We use char because int might match the return type of a gcc2
13035
builtin and then its argument prototype would still apply. */
13045
rm -f conftest.$ac_objext conftest$ac_exeext
13046
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13047
(eval $ac_link) 2>conftest.er1
13049
grep -v '^ *+' conftest.er1 >conftest.err
13051
cat conftest.err >&5
13052
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053
(exit $ac_status); } &&
13054
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
13055
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13056
(eval $ac_try) 2>&5
13058
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13059
(exit $ac_status); }; } &&
13060
{ ac_try='test -s conftest$ac_exeext'
13061
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13062
(eval $ac_try) 2>&5
13064
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065
(exit $ac_status); }; }; then
13066
ac_cv_lib_svld_dlopen=yes
13068
echo "$as_me: failed program was:" >&5
13069
sed 's/^/| /' conftest.$ac_ext >&5
13071
ac_cv_lib_svld_dlopen=no
13073
rm -f conftest.err conftest.$ac_objext \
13074
conftest$ac_exeext conftest.$ac_ext
13075
LIBS=$ac_check_lib_save_LIBS
13077
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
13078
echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
13079
if test $ac_cv_lib_svld_dlopen = yes; then
13080
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13082
echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
13083
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
13084
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
13085
echo $ECHO_N "(cached) $ECHO_C" >&6
13087
ac_check_lib_save_LIBS=$LIBS
13089
cat >conftest.$ac_ext <<_ACEOF
13092
cat confdefs.h >>conftest.$ac_ext
13093
cat >>conftest.$ac_ext <<_ACEOF
13094
/* end confdefs.h. */
13096
/* Override any gcc2 internal prototype to avoid an error. */
13100
/* We use char because int might match the return type of a gcc2
13101
builtin and then its argument prototype would still apply. */
13111
rm -f conftest.$ac_objext conftest$ac_exeext
13112
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13113
(eval $ac_link) 2>conftest.er1
13115
grep -v '^ *+' conftest.er1 >conftest.err
13117
cat conftest.err >&5
13118
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119
(exit $ac_status); } &&
13120
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
13121
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13122
(eval $ac_try) 2>&5
13124
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13125
(exit $ac_status); }; } &&
13126
{ ac_try='test -s conftest$ac_exeext'
13127
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13128
(eval $ac_try) 2>&5
13130
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131
(exit $ac_status); }; }; then
13132
ac_cv_lib_dld_dld_link=yes
13134
echo "$as_me: failed program was:" >&5
13135
sed 's/^/| /' conftest.$ac_ext >&5
13137
ac_cv_lib_dld_dld_link=no
13139
rm -f conftest.err conftest.$ac_objext \
13140
conftest$ac_exeext conftest.$ac_ext
13141
LIBS=$ac_check_lib_save_LIBS
13143
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
13144
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
13145
if test $ac_cv_lib_dld_dld_link = yes; then
13146
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
13167
if test "x$lt_cv_dlopen" != xno; then
13173
case $lt_cv_dlopen in
13175
save_CPPFLAGS="$CPPFLAGS"
13176
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13178
save_LDFLAGS="$LDFLAGS"
13179
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13182
LIBS="$lt_cv_dlopen_libs $LIBS"
13184
echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
13185
echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
13186
if test "${lt_cv_dlopen_self+set}" = set; then
13187
echo $ECHO_N "(cached) $ECHO_C" >&6
13189
if test "$cross_compiling" = yes; then :
13190
lt_cv_dlopen_self=cross
13192
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13193
lt_status=$lt_dlunknown
13194
cat > conftest.$ac_ext <<EOF
13195
#line 13195 "configure"
13196
#include "confdefs.h"
13205
# define LT_DLGLOBAL RTLD_GLOBAL
13208
# define LT_DLGLOBAL DL_GLOBAL
13210
# define LT_DLGLOBAL 0
13214
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13215
find out it does not work in some platform. */
13216
#ifndef LT_DLLAZY_OR_NOW
13218
# define LT_DLLAZY_OR_NOW RTLD_LAZY
13221
# define LT_DLLAZY_OR_NOW DL_LAZY
13224
# define LT_DLLAZY_OR_NOW RTLD_NOW
13227
# define LT_DLLAZY_OR_NOW DL_NOW
13229
# define LT_DLLAZY_OR_NOW 0
13237
extern "C" void exit (int);
13240
void fnord() { int i=42;}
13243
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13244
int status = $lt_dlunknown;
13248
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13249
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13250
/* dlclose (self); */
13256
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13257
(eval $ac_link) 2>&5
13259
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13261
(./conftest; exit; ) >&5 2>/dev/null
13263
case x$lt_status in
13264
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13265
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13266
x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
13269
# compilation failed
13270
lt_cv_dlopen_self=no
13277
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
13278
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
13280
if test "x$lt_cv_dlopen_self" = xyes; then
13281
LDFLAGS="$LDFLAGS $link_static_flag"
13282
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
13283
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
13284
if test "${lt_cv_dlopen_self_static+set}" = set; then
13285
echo $ECHO_N "(cached) $ECHO_C" >&6
13287
if test "$cross_compiling" = yes; then :
13288
lt_cv_dlopen_self_static=cross
13290
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13291
lt_status=$lt_dlunknown
13292
cat > conftest.$ac_ext <<EOF
13293
#line 13293 "configure"
13294
#include "confdefs.h"
13303
# define LT_DLGLOBAL RTLD_GLOBAL
13306
# define LT_DLGLOBAL DL_GLOBAL
13308
# define LT_DLGLOBAL 0
13312
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13313
find out it does not work in some platform. */
13314
#ifndef LT_DLLAZY_OR_NOW
13316
# define LT_DLLAZY_OR_NOW RTLD_LAZY
13319
# define LT_DLLAZY_OR_NOW DL_LAZY
13322
# define LT_DLLAZY_OR_NOW RTLD_NOW
13325
# define LT_DLLAZY_OR_NOW DL_NOW
13327
# define LT_DLLAZY_OR_NOW 0
13335
extern "C" void exit (int);
13338
void fnord() { int i=42;}
13341
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13342
int status = $lt_dlunknown;
13346
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13347
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13348
/* dlclose (self); */
13354
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13355
(eval $ac_link) 2>&5
13357
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13359
(./conftest; exit; ) >&5 2>/dev/null
13361
case x$lt_status in
13362
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13363
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13364
x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
13367
# compilation failed
13368
lt_cv_dlopen_self_static=no
13375
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
13376
echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
13379
CPPFLAGS="$save_CPPFLAGS"
13380
LDFLAGS="$save_LDFLAGS"
13385
case $lt_cv_dlopen_self in
13386
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13387
*) enable_dlopen_self=unknown ;;
13390
case $lt_cv_dlopen_self_static in
13391
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13392
*) enable_dlopen_self_static=unknown ;;
13397
12829
# The else clause should only fire when bootstrapping the
13398
12830
# libtool distribution, otherwise you forgot to ship ltmain.sh
18327
17981
enable_fast_install=needless
18332
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
18333
echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
18334
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
18335
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
18336
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
18337
echo "$as_me:$LINENO: result: yes" >&5
18338
echo "${ECHO_T}yes" >&6
18340
# FIXME - insert some real tests, host_os isn't really good enough
18343
if test -n "$STRIP" ; then
18344
striplib="$STRIP -x"
18345
echo "$as_me:$LINENO: result: yes" >&5
18346
echo "${ECHO_T}yes" >&6
18348
echo "$as_me:$LINENO: result: no" >&5
18349
echo "${ECHO_T}no" >&6
18353
echo "$as_me:$LINENO: result: no" >&5
18354
echo "${ECHO_T}no" >&6
18359
if test "x$enable_dlopen" != xyes; then
18360
enable_dlopen=unknown
18361
enable_dlopen_self=unknown
18362
enable_dlopen_self_static=unknown
18369
lt_cv_dlopen="load_add_on"
18371
lt_cv_dlopen_self=yes
18375
lt_cv_dlopen="LoadLibrary"
18380
lt_cv_dlopen="dlopen"
18385
# if libdl is installed we need to link against it
18386
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18387
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
18388
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18389
echo $ECHO_N "(cached) $ECHO_C" >&6
18391
ac_check_lib_save_LIBS=$LIBS
18393
cat >conftest.$ac_ext <<_ACEOF
18396
cat confdefs.h >>conftest.$ac_ext
18397
cat >>conftest.$ac_ext <<_ACEOF
18398
/* end confdefs.h. */
18400
/* Override any gcc2 internal prototype to avoid an error. */
18404
/* We use char because int might match the return type of a gcc2
18405
builtin and then its argument prototype would still apply. */
18415
rm -f conftest.$ac_objext conftest$ac_exeext
18416
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18417
(eval $ac_link) 2>conftest.er1
18419
grep -v '^ *+' conftest.er1 >conftest.err
18421
cat conftest.err >&5
18422
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18423
(exit $ac_status); } &&
18424
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18425
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18426
(eval $ac_try) 2>&5
18428
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18429
(exit $ac_status); }; } &&
18430
{ ac_try='test -s conftest$ac_exeext'
18431
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18432
(eval $ac_try) 2>&5
18434
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18435
(exit $ac_status); }; }; then
18436
ac_cv_lib_dl_dlopen=yes
18438
echo "$as_me: failed program was:" >&5
18439
sed 's/^/| /' conftest.$ac_ext >&5
18441
ac_cv_lib_dl_dlopen=no
18443
rm -f conftest.err conftest.$ac_objext \
18444
conftest$ac_exeext conftest.$ac_ext
18445
LIBS=$ac_check_lib_save_LIBS
18447
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18448
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
18449
if test $ac_cv_lib_dl_dlopen = yes; then
18450
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
18453
lt_cv_dlopen="dyld"
18455
lt_cv_dlopen_self=yes
18462
echo "$as_me:$LINENO: checking for shl_load" >&5
18463
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
18464
if test "${ac_cv_func_shl_load+set}" = set; then
18465
echo $ECHO_N "(cached) $ECHO_C" >&6
18467
cat >conftest.$ac_ext <<_ACEOF
18470
cat confdefs.h >>conftest.$ac_ext
18471
cat >>conftest.$ac_ext <<_ACEOF
18472
/* end confdefs.h. */
18473
/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
18474
For example, HP-UX 11i <limits.h> declares gettimeofday. */
18475
#define shl_load innocuous_shl_load
18477
/* System header to define __stub macros and hopefully few prototypes,
18478
which can conflict with char shl_load (); below.
18479
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18480
<limits.h> exists even on freestanding compilers. */
18483
# include <limits.h>
18485
# include <assert.h>
18490
/* Override any gcc2 internal prototype to avoid an error. */
18495
/* We use char because int might match the return type of a gcc2
18496
builtin and then its argument prototype would still apply. */
18498
/* The GNU C library defines this for functions which it implements
18499
to always fail with ENOSYS. Some functions are actually named
18500
something starting with __ and the normal name is an alias. */
18501
#if defined (__stub_shl_load) || defined (__stub___shl_load)
18504
char (*f) () = shl_load;
18513
return f != shl_load;
18518
rm -f conftest.$ac_objext conftest$ac_exeext
18519
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18520
(eval $ac_link) 2>conftest.er1
18522
grep -v '^ *+' conftest.er1 >conftest.err
18524
cat conftest.err >&5
18525
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18526
(exit $ac_status); } &&
18527
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18528
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18529
(eval $ac_try) 2>&5
18531
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18532
(exit $ac_status); }; } &&
18533
{ ac_try='test -s conftest$ac_exeext'
18534
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18535
(eval $ac_try) 2>&5
18537
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538
(exit $ac_status); }; }; then
18539
ac_cv_func_shl_load=yes
18541
echo "$as_me: failed program was:" >&5
18542
sed 's/^/| /' conftest.$ac_ext >&5
18544
ac_cv_func_shl_load=no
18546
rm -f conftest.err conftest.$ac_objext \
18547
conftest$ac_exeext conftest.$ac_ext
18549
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
18550
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
18551
if test $ac_cv_func_shl_load = yes; then
18552
lt_cv_dlopen="shl_load"
18554
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
18555
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
18556
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
18557
echo $ECHO_N "(cached) $ECHO_C" >&6
18559
ac_check_lib_save_LIBS=$LIBS
18561
cat >conftest.$ac_ext <<_ACEOF
18564
cat confdefs.h >>conftest.$ac_ext
18565
cat >>conftest.$ac_ext <<_ACEOF
18566
/* end confdefs.h. */
18568
/* Override any gcc2 internal prototype to avoid an error. */
18572
/* We use char because int might match the return type of a gcc2
18573
builtin and then its argument prototype would still apply. */
18583
rm -f conftest.$ac_objext conftest$ac_exeext
18584
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18585
(eval $ac_link) 2>conftest.er1
18587
grep -v '^ *+' conftest.er1 >conftest.err
18589
cat conftest.err >&5
18590
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18591
(exit $ac_status); } &&
18592
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18593
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18594
(eval $ac_try) 2>&5
18596
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18597
(exit $ac_status); }; } &&
18598
{ ac_try='test -s conftest$ac_exeext'
18599
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18600
(eval $ac_try) 2>&5
18602
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603
(exit $ac_status); }; }; then
18604
ac_cv_lib_dld_shl_load=yes
18606
echo "$as_me: failed program was:" >&5
18607
sed 's/^/| /' conftest.$ac_ext >&5
18609
ac_cv_lib_dld_shl_load=no
18611
rm -f conftest.err conftest.$ac_objext \
18612
conftest$ac_exeext conftest.$ac_ext
18613
LIBS=$ac_check_lib_save_LIBS
18615
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
18616
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
18617
if test $ac_cv_lib_dld_shl_load = yes; then
18618
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
18620
echo "$as_me:$LINENO: checking for dlopen" >&5
18621
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
18622
if test "${ac_cv_func_dlopen+set}" = set; then
18623
echo $ECHO_N "(cached) $ECHO_C" >&6
18625
cat >conftest.$ac_ext <<_ACEOF
18628
cat confdefs.h >>conftest.$ac_ext
18629
cat >>conftest.$ac_ext <<_ACEOF
18630
/* end confdefs.h. */
18631
/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
18632
For example, HP-UX 11i <limits.h> declares gettimeofday. */
18633
#define dlopen innocuous_dlopen
18635
/* System header to define __stub macros and hopefully few prototypes,
18636
which can conflict with char dlopen (); below.
18637
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18638
<limits.h> exists even on freestanding compilers. */
18641
# include <limits.h>
18643
# include <assert.h>
18648
/* Override any gcc2 internal prototype to avoid an error. */
18653
/* We use char because int might match the return type of a gcc2
18654
builtin and then its argument prototype would still apply. */
18656
/* The GNU C library defines this for functions which it implements
18657
to always fail with ENOSYS. Some functions are actually named
18658
something starting with __ and the normal name is an alias. */
18659
#if defined (__stub_dlopen) || defined (__stub___dlopen)
18662
char (*f) () = dlopen;
18671
return f != dlopen;
18676
rm -f conftest.$ac_objext conftest$ac_exeext
18677
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18678
(eval $ac_link) 2>conftest.er1
18680
grep -v '^ *+' conftest.er1 >conftest.err
18682
cat conftest.err >&5
18683
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684
(exit $ac_status); } &&
18685
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18686
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18687
(eval $ac_try) 2>&5
18689
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18690
(exit $ac_status); }; } &&
18691
{ ac_try='test -s conftest$ac_exeext'
18692
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18693
(eval $ac_try) 2>&5
18695
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18696
(exit $ac_status); }; }; then
18697
ac_cv_func_dlopen=yes
18699
echo "$as_me: failed program was:" >&5
18700
sed 's/^/| /' conftest.$ac_ext >&5
18702
ac_cv_func_dlopen=no
18704
rm -f conftest.err conftest.$ac_objext \
18705
conftest$ac_exeext conftest.$ac_ext
18707
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
18708
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
18709
if test $ac_cv_func_dlopen = yes; then
18710
lt_cv_dlopen="dlopen"
18712
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18713
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
18714
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18715
echo $ECHO_N "(cached) $ECHO_C" >&6
18717
ac_check_lib_save_LIBS=$LIBS
18719
cat >conftest.$ac_ext <<_ACEOF
18722
cat confdefs.h >>conftest.$ac_ext
18723
cat >>conftest.$ac_ext <<_ACEOF
18724
/* end confdefs.h. */
18726
/* Override any gcc2 internal prototype to avoid an error. */
18730
/* We use char because int might match the return type of a gcc2
18731
builtin and then its argument prototype would still apply. */
18741
rm -f conftest.$ac_objext conftest$ac_exeext
18742
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18743
(eval $ac_link) 2>conftest.er1
18745
grep -v '^ *+' conftest.er1 >conftest.err
18747
cat conftest.err >&5
18748
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18749
(exit $ac_status); } &&
18750
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18751
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18752
(eval $ac_try) 2>&5
18754
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755
(exit $ac_status); }; } &&
18756
{ ac_try='test -s conftest$ac_exeext'
18757
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18758
(eval $ac_try) 2>&5
18760
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18761
(exit $ac_status); }; }; then
18762
ac_cv_lib_dl_dlopen=yes
18764
echo "$as_me: failed program was:" >&5
18765
sed 's/^/| /' conftest.$ac_ext >&5
18767
ac_cv_lib_dl_dlopen=no
18769
rm -f conftest.err conftest.$ac_objext \
18770
conftest$ac_exeext conftest.$ac_ext
18771
LIBS=$ac_check_lib_save_LIBS
18773
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18774
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
18775
if test $ac_cv_lib_dl_dlopen = yes; then
18776
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
18778
echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
18779
echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
18780
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
18781
echo $ECHO_N "(cached) $ECHO_C" >&6
18783
ac_check_lib_save_LIBS=$LIBS
18784
LIBS="-lsvld $LIBS"
18785
cat >conftest.$ac_ext <<_ACEOF
18788
cat confdefs.h >>conftest.$ac_ext
18789
cat >>conftest.$ac_ext <<_ACEOF
18790
/* end confdefs.h. */
18792
/* Override any gcc2 internal prototype to avoid an error. */
18796
/* We use char because int might match the return type of a gcc2
18797
builtin and then its argument prototype would still apply. */
18807
rm -f conftest.$ac_objext conftest$ac_exeext
18808
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18809
(eval $ac_link) 2>conftest.er1
18811
grep -v '^ *+' conftest.er1 >conftest.err
18813
cat conftest.err >&5
18814
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18815
(exit $ac_status); } &&
18816
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18817
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18818
(eval $ac_try) 2>&5
18820
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18821
(exit $ac_status); }; } &&
18822
{ ac_try='test -s conftest$ac_exeext'
18823
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18824
(eval $ac_try) 2>&5
18826
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18827
(exit $ac_status); }; }; then
18828
ac_cv_lib_svld_dlopen=yes
18830
echo "$as_me: failed program was:" >&5
18831
sed 's/^/| /' conftest.$ac_ext >&5
18833
ac_cv_lib_svld_dlopen=no
18835
rm -f conftest.err conftest.$ac_objext \
18836
conftest$ac_exeext conftest.$ac_ext
18837
LIBS=$ac_check_lib_save_LIBS
18839
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
18840
echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
18841
if test $ac_cv_lib_svld_dlopen = yes; then
18842
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
18844
echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
18845
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
18846
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
18847
echo $ECHO_N "(cached) $ECHO_C" >&6
18849
ac_check_lib_save_LIBS=$LIBS
18851
cat >conftest.$ac_ext <<_ACEOF
18854
cat confdefs.h >>conftest.$ac_ext
18855
cat >>conftest.$ac_ext <<_ACEOF
18856
/* end confdefs.h. */
18858
/* Override any gcc2 internal prototype to avoid an error. */
18862
/* We use char because int might match the return type of a gcc2
18863
builtin and then its argument prototype would still apply. */
18873
rm -f conftest.$ac_objext conftest$ac_exeext
18874
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18875
(eval $ac_link) 2>conftest.er1
18877
grep -v '^ *+' conftest.er1 >conftest.err
18879
cat conftest.err >&5
18880
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18881
(exit $ac_status); } &&
18882
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18883
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18884
(eval $ac_try) 2>&5
18886
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18887
(exit $ac_status); }; } &&
18888
{ ac_try='test -s conftest$ac_exeext'
18889
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18890
(eval $ac_try) 2>&5
18892
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18893
(exit $ac_status); }; }; then
18894
ac_cv_lib_dld_dld_link=yes
18896
echo "$as_me: failed program was:" >&5
18897
sed 's/^/| /' conftest.$ac_ext >&5
18899
ac_cv_lib_dld_dld_link=no
18901
rm -f conftest.err conftest.$ac_objext \
18902
conftest$ac_exeext conftest.$ac_ext
18903
LIBS=$ac_check_lib_save_LIBS
18905
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
18906
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
18907
if test $ac_cv_lib_dld_dld_link = yes; then
18908
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
18929
if test "x$lt_cv_dlopen" != xno; then
18935
case $lt_cv_dlopen in
18937
save_CPPFLAGS="$CPPFLAGS"
18938
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18940
save_LDFLAGS="$LDFLAGS"
18941
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18944
LIBS="$lt_cv_dlopen_libs $LIBS"
18946
echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
18947
echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
18948
if test "${lt_cv_dlopen_self+set}" = set; then
18949
echo $ECHO_N "(cached) $ECHO_C" >&6
18951
if test "$cross_compiling" = yes; then :
18952
lt_cv_dlopen_self=cross
18954
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18955
lt_status=$lt_dlunknown
18956
cat > conftest.$ac_ext <<EOF
18957
#line 18957 "configure"
18958
#include "confdefs.h"
18967
# define LT_DLGLOBAL RTLD_GLOBAL
18970
# define LT_DLGLOBAL DL_GLOBAL
18972
# define LT_DLGLOBAL 0
18976
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18977
find out it does not work in some platform. */
18978
#ifndef LT_DLLAZY_OR_NOW
18980
# define LT_DLLAZY_OR_NOW RTLD_LAZY
18983
# define LT_DLLAZY_OR_NOW DL_LAZY
18986
# define LT_DLLAZY_OR_NOW RTLD_NOW
18989
# define LT_DLLAZY_OR_NOW DL_NOW
18991
# define LT_DLLAZY_OR_NOW 0
18999
extern "C" void exit (int);
19002
void fnord() { int i=42;}
19005
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19006
int status = $lt_dlunknown;
19010
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19011
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19012
/* dlclose (self); */
19018
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19019
(eval $ac_link) 2>&5
19021
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19022
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19023
(./conftest; exit; ) >&5 2>/dev/null
19025
case x$lt_status in
19026
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19027
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19028
x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
19031
# compilation failed
19032
lt_cv_dlopen_self=no
19039
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19040
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19042
if test "x$lt_cv_dlopen_self" = xyes; then
19043
LDFLAGS="$LDFLAGS $link_static_flag"
19044
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19045
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19046
if test "${lt_cv_dlopen_self_static+set}" = set; then
19047
echo $ECHO_N "(cached) $ECHO_C" >&6
19049
if test "$cross_compiling" = yes; then :
19050
lt_cv_dlopen_self_static=cross
19052
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19053
lt_status=$lt_dlunknown
19054
cat > conftest.$ac_ext <<EOF
19055
#line 19055 "configure"
19056
#include "confdefs.h"
19065
# define LT_DLGLOBAL RTLD_GLOBAL
19068
# define LT_DLGLOBAL DL_GLOBAL
19070
# define LT_DLGLOBAL 0
19074
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19075
find out it does not work in some platform. */
19076
#ifndef LT_DLLAZY_OR_NOW
19078
# define LT_DLLAZY_OR_NOW RTLD_LAZY
19081
# define LT_DLLAZY_OR_NOW DL_LAZY
19084
# define LT_DLLAZY_OR_NOW RTLD_NOW
19087
# define LT_DLLAZY_OR_NOW DL_NOW
19089
# define LT_DLLAZY_OR_NOW 0
19097
extern "C" void exit (int);
19100
void fnord() { int i=42;}
19103
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19104
int status = $lt_dlunknown;
19108
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19109
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19110
/* dlclose (self); */
19116
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19117
(eval $ac_link) 2>&5
19119
echo "$as_me:$LINENO: \$? = $ac_status" >&5
19120
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19121
(./conftest; exit; ) >&5 2>/dev/null
19123
case x$lt_status in
19124
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19125
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19126
x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
19129
# compilation failed
19130
lt_cv_dlopen_self_static=no
19137
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
19138
echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
19141
CPPFLAGS="$save_CPPFLAGS"
19142
LDFLAGS="$save_LDFLAGS"
19147
case $lt_cv_dlopen_self in
19148
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19149
*) enable_dlopen_self=unknown ;;
19152
case $lt_cv_dlopen_self_static in
19153
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19154
*) enable_dlopen_self_static=unknown ;;
19159
17985
# The else clause should only fire when bootstrapping the
19160
17986
# libtool distribution, otherwise you forgot to ship ltmain.sh