]> granicus.if.org Git - sudo/commitdiff
Link check_symbols with SUDO_LIBS to make sure we link with the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jun 2012 14:21:05 +0000 (10:21 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jun 2012 14:21:05 +0000 (10:21 -0400)
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).

configure
configure.in
plugins/sudoers/Makefile.in

index e9cae161f8bb791ab95558f75eeedf093efe4db0..e978051d3493419d6f3ece3f5384965493f5bad3 100755 (executable)
--- 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*)
index 344e906359411d7a1dc3ba8afbb65e7af024910e..a87d3814773d64ef833d228099a604af99c12668 100644 (file)
@@ -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*)
index d086fd086ce5cebb35e1bb9c3aad010f62dc7db9..40240143c2b5225795964c847fb5d09c80fc4a12 100644 (file)
@@ -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)