From: Todd C. Miller Date: Mon, 18 Jun 2012 14:21:05 +0000 (-0400) Subject: Link check_symbols with SUDO_LIBS to make sure we link with the X-Git-Tag: SUDO_1_8_6^2~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdcc8e1fce6b8c459f6ffe731fee49c5647718d3;p=sudo Link check_symbols with SUDO_LIBS to make sure we link with the requisite libraries to successfully dlopen sudoers.so. This is needed on HP-UX where a program dlopen()ing a shared object that uses pthreads must also be linked with pthreads (and HP-UX LDAP uses pthreads). --- diff --git a/configure b/configure index e9cae161f..e978051d3 100755 --- a/configure +++ b/configure @@ -19929,10 +19929,10 @@ if test X"$LIBDL" != X""; then SUDOERS_LIBS="${SUDOERS_LIBS} $LIBDL" fi -# On HP-UX, you cannot dlopen() a shared object that uses pthreads -# unless the main program is linked against -lpthread. Since we -# have no knowledge what libraries a plugin may depend on, we always -# link against -lpthread on HP-UX if it is available. +# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless +# the main program is linked against -lpthread. We have no knowledge of +# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads) +# so always link against -lpthread on HP-UX if it is available. # This check should go after all other libraries tests. case "$host" in *-*-hpux*) diff --git a/configure.in b/configure.in index 344e90635..a87d38147 100644 --- a/configure.in +++ b/configure.in @@ -3135,10 +3135,10 @@ if test X"$LIBDL" != X""; then SUDOERS_LIBS="${SUDOERS_LIBS} $LIBDL" fi -# On HP-UX, you cannot dlopen() a shared object that uses pthreads -# unless the main program is linked against -lpthread. Since we -# have no knowledge what libraries a plugin may depend on, we always -# link against -lpthread on HP-UX if it is available. +# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless +# the main program is linked against -lpthread. We have no knowledge of +# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads) +# so always link against -lpthread on HP-UX if it is available. # This check should go after all other libraries tests. case "$host" in *-*-hpux*) diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index d086fd086..40240143c 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -191,7 +191,7 @@ check_fill: $(CHECK_FILL_OBJS) $(LT_LIBS) $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_FILL_OBJS) $(LDFLAGS) $(LIBS) check_symbols: $(CHECK_SYMBOLS_OBJS) $(LT_LIBS) - $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(LIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(LIBS) @SUDO_LIBS@ check_wrap: $(CHECK_WRAP_OBJS) $(LT_LIBS) $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_WRAP_OBJS) $(LDFLAGS) $(LIBS)