Changeset 2154 for ThirdParty/ASL


Ignore:
Timestamp:
Mar 30, 2011 5:55:37 AM (9 years ago)
Author:
stefan
Message:

check for dynamic library loader

Location:
ThirdParty/ASL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/ASL/trunk/configure

    r2146 r2154  
    2029720297
    2029820298
     20299# Check for dlopen, ASL uses it to load userdefined function libraries
     20300  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
     20301echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
     20302if test "${ac_cv_lib_dl_dlopen+set}" = set; then
     20303  echo $ECHO_N "(cached) $ECHO_C" >&6
     20304else
     20305  ac_check_lib_save_LIBS=$LIBS
     20306LIBS="-ldl  $LIBS"
     20307cat >conftest.$ac_ext <<_ACEOF
     20308/* confdefs.h.  */
     20309_ACEOF
     20310cat confdefs.h >>conftest.$ac_ext
     20311cat >>conftest.$ac_ext <<_ACEOF
     20312/* end confdefs.h.  */
     20313
     20314/* Override any gcc2 internal prototype to avoid an error.  */
     20315#ifdef __cplusplus
     20316extern "C"
     20317#endif
     20318/* We use char because int might match the return type of a gcc2
     20319   builtin and then its argument prototype would still apply.  */
     20320char dlopen ();
     20321int
     20322main ()
     20323{
     20324dlopen ();
     20325  ;
     20326  return 0;
     20327}
     20328_ACEOF
     20329rm -f conftest.$ac_objext conftest$ac_exeext
     20330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     20331  (eval $ac_link) 2>conftest.er1
     20332  ac_status=$?
     20333  grep -v '^ *+' conftest.er1 >conftest.err
     20334  rm -f conftest.er1
     20335  cat conftest.err >&5
     20336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     20337  (exit $ac_status); } &&
     20338         { ac_try='test -z "$ac_c_werror_flag"
     20339                         || test ! -s conftest.err'
     20340  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     20341  (eval $ac_try) 2>&5
     20342  ac_status=$?
     20343  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     20344  (exit $ac_status); }; } &&
     20345         { ac_try='test -s conftest$ac_exeext'
     20346  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     20347  (eval $ac_try) 2>&5
     20348  ac_status=$?
     20349  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     20350  (exit $ac_status); }; }; then
     20351  ac_cv_lib_dl_dlopen=yes
     20352else
     20353  echo "$as_me: failed program was:" >&5
     20354sed 's/^/| /' conftest.$ac_ext >&5
     20355
     20356ac_cv_lib_dl_dlopen=no
     20357fi
     20358rm -f conftest.err conftest.$ac_objext \
     20359      conftest$ac_exeext conftest.$ac_ext
     20360LIBS=$ac_check_lib_save_LIBS
     20361fi
     20362echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
     20363echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
     20364if test $ac_cv_lib_dl_dlopen = yes; then
     20365
     20366    ASL_PCLIBS="-ldl $ASL_PCLIBS"
     20367
     20368cat >>confdefs.h <<\_ACEOF
     20369#define HAVE_DLFCN 1
     20370_ACEOF
     20371
     20372
     20373fi
     20374
     20375
    2029920376# Back to whatever language we were in.
    2030020377  ac_ext=c
  • ThirdParty/ASL/trunk/configure.ac

    r2141 r2154  
    116116    [asladdcflags="$asladdcflags -DNO_LONG_LONG"],[])
    117117
     118# Check for dlopen, ASL uses it to load userdefined function libraries
     119  AC_CHECK_LIB(dl,[dlopen],[
     120    ASL_PCLIBS="-ldl $ASL_PCLIBS"
     121    AC_DEFINE([HAVE_DLFCN],[1],[Define to 1 if dlfcn support is available])
     122  ])
     123
    118124# Back to whatever language we were in.
    119125  AC_LANG_POP(C)
Note: See TracChangeset for help on using the changeset viewer.