[PATCH ipvsadm 2/2] Fallback to libpopt on shared object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Use shared library if no static library is installed.

Signed-off-by: Julian Anastasov <ja@xxxxxx>
---
 Makefile |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index e4e03cc..b411649 100644
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,21 @@ POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
     fi; \
   fi; \
 done)
+ifeq (,$(POPT_LIB))
+POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
+  f1=""; \
+  for so in $$i/libpopt.so*; do \
+    if [ -f $$so ]; then \
+      if objdump -T $$so | fgrep -q poptGetContext; then \
+	  echo "-lpopt"; \
+	  f1=y; \
+	  break; \
+      fi; \
+    fi; \
+  done; \
+  [ "$$f1" != "" ] && break; \
+done)
+endif
 endif
 
 ifneq (,$(POPT_LIB))
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Devel]     [Linux NFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [X.Org]

  Powered by Linux