]> mj.ucw.cz Git - libucw.git/commitdiff
allow libucw to depend on other libraries
authorRobert Spalek <robert@ucw.cz>
Thu, 27 Nov 2008 15:39:50 +0000 (07:39 -0800)
committerRobert Spalek <robert@ucw.cz>
Thu, 27 Nov 2008 15:39:50 +0000 (07:39 -0800)
I need it when CONFIG_PCRE is enabled.  After the internal copy of a
reliable regexp library has been deleted from Sherlock source codes, I
cannot compile Sherlock on Darwin with the default libraries.  Therefore I
have installed pcre, but it isn't automatically linked to everything yet.

ucw/Makefile
ucw/libucw.pc

index 41ca1c3f9bbcbfe0b7474faaac606128293f41d2..27a7ac8354abd4e40495e057fa6a653747b33f81 100644 (file)
@@ -58,6 +58,8 @@ LIBUCW_MAIN_INCLUDES= \
        kmp.h kmp-search.h binsearch.h \
        partmap.h
 
+export LIBUCW_LIBS=
+
 ifdef CONFIG_UCW_THREADS
 # Some modules require threading
 LIBUCW_MODS+=threads-conf workqueue asio fb-direct
@@ -68,6 +70,10 @@ ifdef CONFIG_OWN_GETOPT
 include $(s)/ucw/getopt/Makefile
 endif
 
+ifdef CONFIG_PCRE
+LIBUCW_LIBS+=-lpcre
+endif
+
 LIBUCW_INCLUDES=$(LIBUCW_MAIN_INCLUDES)
 
 include $(s)/ucw/sorter/Makefile
index d96850d756191266a7bb642aef6ef10277f375b2..e2e8e084ed9b14a3c355c361a67e08813fd658c2 100644 (file)
@@ -17,4 +17,4 @@ Name: libucw
 Description: A library of utility functions and data structures
 Version: @SHERLOCK_VERSION@
 Cflags: -I${incdir}
-Libs: -L${libdir} -lucw ${threads}
+Libs: -L${libdir} -lucw ${threads} @LIBUCW_LIBS@