Fix dlopen() detection for systems where dlopen() is in a separate library.

This commit is contained in:
Todd C. Miller
2010-10-11 09:21:56 -04:00
parent 6a52054147
commit 443d18b11a
2 changed files with 20 additions and 21 deletions

32
configure vendored
View File

@@ -18083,6 +18083,8 @@ fi
# #
case "$lt_cv_dlopen" in case "$lt_cv_dlopen" in
dlopen) dlopen)
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo" SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo"
LT_STATIC="--tag=disable-static" LT_STATIC="--tag=disable-static"
;; ;;
@@ -18091,33 +18093,26 @@ case "$lt_cv_dlopen" in
SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo" SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo"
LT_STATIC="--tag=disable-static" LT_STATIC="--tag=disable-static"
case " $LIBOBJS " in
*" dlopen.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
;; ;;
no) esac
;;
*)
# Preload sudoers module symbols # Preload sudoers module symbols
SUDO_OBJS="${SUDO_OBJS} preload.o" SUDO_OBJS="${SUDO_OBJS} preload.o"
SUDO_LIBS="${SUDO_LIBS} \$(top_builddir)/plugins/sudoers/sudoers.la" SUDO_LIBS="${SUDO_LIBS} \$(top_builddir)/plugins/sudoers/sudoers.la"
LT_STATIC="" LT_STATIC=""
;;
esac
for ac_func in dlopen
do :
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLOPEN 1
_ACEOF
else
case " $LIBOBJS " in case " $LIBOBJS " in
*" $ac_func.$ac_objext "* ) ;; *" dlopen.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
;; ;;
esac esac
fi ;;
done esac
# #
# Add library needed for dynamic loading, if any. # Add library needed for dynamic loading, if any.
@@ -20602,5 +20597,6 @@ fi

View File

@@ -2668,6 +2668,7 @@ fi
# #
case "$lt_cv_dlopen" in case "$lt_cv_dlopen" in
dlopen) dlopen)
AC_DEFINE(HAVE_DLOPEN)
SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo" SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo"
LT_STATIC="--tag=disable-static" LT_STATIC="--tag=disable-static"
;; ;;
@@ -2675,15 +2676,16 @@ case "$lt_cv_dlopen" in
AC_DEFINE(HAVE_SHL_LOAD) AC_DEFINE(HAVE_SHL_LOAD)
SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo" SUDOERS_OBJS="$SUDOERS_OBJS plugin_error.lo"
LT_STATIC="--tag=disable-static" LT_STATIC="--tag=disable-static"
AC_LIBOBJ(dlopen)
;; ;;
no) *)
# Preload sudoers module symbols # Preload sudoers module symbols
SUDO_OBJS="${SUDO_OBJS} preload.o" SUDO_OBJS="${SUDO_OBJS} preload.o"
SUDO_LIBS="${SUDO_LIBS} \$(top_builddir)/plugins/sudoers/sudoers.la" SUDO_LIBS="${SUDO_LIBS} \$(top_builddir)/plugins/sudoers/sudoers.la"
LT_STATIC="" LT_STATIC=""
AC_LIBOBJ(dlopen)
;; ;;
esac esac
AC_REPLACE_FUNCS(dlopen)
# #
# Add library needed for dynamic loading, if any. # Add library needed for dynamic loading, if any.
@@ -2847,6 +2849,7 @@ AH_TEMPLATE(HAVE_DD_FD, [Define to 1 if your `DIR' contains dd_fd.])
AH_TEMPLATE(HAVE_DIRFD, [Define to 1 if you have the `dirfd' function or macro.]) AH_TEMPLATE(HAVE_DIRFD, [Define to 1 if you have the `dirfd' function or macro.])
AH_TEMPLATE(HAVE_DGETTEXT, [Define to 1 if you have the `dgettext' function.]) AH_TEMPLATE(HAVE_DGETTEXT, [Define to 1 if you have the `dgettext' function.])
AH_TEMPLATE(HAVE_DISPCRYPT, [Define to 1 if you have the `dispcrypt' function.]) AH_TEMPLATE(HAVE_DISPCRYPT, [Define to 1 if you have the `dispcrypt' function.])
AH_TEMPLATE(HAVE_DLOPEN, [Define to 1 if you have the `dlopen' function.])
AH_TEMPLATE(HAVE_EXTENDED_GLOB, [Define to 1 if your glob.h defines the GLOB_BRACE and GLOB_TILDE flags.]) AH_TEMPLATE(HAVE_EXTENDED_GLOB, [Define to 1 if your glob.h defines the GLOB_BRACE and GLOB_TILDE flags.])
AH_TEMPLATE(HAVE_FCNTL_CLOSEM, [Define to 1 if your system has the F_CLOSEM fcntl.]) AH_TEMPLATE(HAVE_FCNTL_CLOSEM, [Define to 1 if your system has the F_CLOSEM fcntl.])
AH_TEMPLATE(HAVE_FNMATCH, [Define to 1 if you have the `fnmatch' function.]) AH_TEMPLATE(HAVE_FNMATCH, [Define to 1 if you have the `fnmatch' function.])