]> granicus.if.org Git - procps-ng/commitdiff
build-sys: allow a build when libdl.so is truly absent
authorJim Warner <james.warner@comcast.net>
Sun, 5 May 2013 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Fri, 10 May 2013 22:23:52 +0000 (08:23 +1000)
The earlier commit purporting to allow top to be built
in the absence of that dynamic linking library stopped
just a little short of the truth. So this will fix it.

Reference(s):
commit 5686877cd4c83a2daf1be6f2f7f93cd2c1451e75

Signed-off-by: Jim Warner <james.warner@comcast.net>
configure.ac
top/Makefile.am

index dcc351c4699ce702c2663e9570d5318c668e787c..19a8f2609622533f0d3d713c9d1d843e3b982457 100644 (file)
@@ -195,6 +195,7 @@ if test "x$enable_sigwinch" = xyes; then
   AC_DEFINE(SIGNALS_LESS, 1, [reduce impact of x-windows resize operations on top])
 fi
 
+DL_LIB=
 AC_ARG_ENABLE([numa],
   AS_HELP_STRING([--disable-numa], [disable NUMA/Node support in top]),
   [disable_numa=yes], [])
@@ -203,7 +204,9 @@ if test "x$disable_numa" = x"yes"; then
 else
   AC_SEARCH_LIBS([dlopen], [dl], [],
     [AC_MSG_ERROR([dynamic linking unavailable, circumvent with --disable-numa])])
+  DL_LIB="$ac_cv_search_dlopen"
 fi
+AC_SUBST([DL_LIB])
 
 AC_ARG_ENABLE([w-from],
   AS_HELP_STRING([--enable-w-from], [enable w from field by default]),
index 4958e54c79ba1bb2e1e69ee0be38477215a3cf58..bba36bc9b3dc18e08b8d120cf9b620d4192a3521 100644 (file)
@@ -3,7 +3,8 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
        -DLOCALEDIR=\"$(localedir)\"
 
-AM_LDFLAGS = ../proc/libprocps.la -ldl
+AM_LDFLAGS = ../proc/libprocps.la
+AM_LDFLAGS += $(DL_LIB)
 
 if WITH_NCURSES
 usrbin_exec_PROGRAMS = \