You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

  1. commit f96d9f9d2e3ba39352035e6ac26463243484d404
  2. Author: Sebastian Kemper <sebastian_ml@gmx.net>
  3. Date: Sun Jan 13 19:25:52 2019 +0100
  4. Setup .pc file to allow use for cross-compiling
  5. The Makefile is currently creating the pkg-config file using static lib
  6. and include dir statements. Change that so that projects that
  7. cross-compile hiredis can use pkg-config to setup other programs
  8. depending on it.
  9. Note: these projects (like OpenWrt) call pkg-config with arguments to
  10. overwrite some variables in the .pc file, namely:
  11. --define-variable=prefix=<...>
  12. --define-variable=exec_prefix=<...>
  13. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
  14. --- a/Makefile
  15. +++ b/Makefile
  16. @@ -234,8 +234,8 @@ $(PKGCONFNAME): hiredis.h
  17. @echo "Generating $@ for pkgconfig..."
  18. @echo prefix=$(PREFIX) > $@
  19. @echo exec_prefix=\$${prefix} >> $@
  20. - @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
  21. - @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
  22. + @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
  23. + @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
  24. @echo >> $@
  25. @echo Name: hiredis >> $@
  26. @echo Description: Minimalistic C client library for Redis. >> $@