bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] [PATCH] Fix include path in pkg-config file


From: Andrea Bolognani
Subject: [Bug-readline] [PATCH] Fix include path in pkg-config file
Date: Mon, 8 Apr 2019 18:06:28 +0200

The value of ${includedir} is going to be something like

  /usr/include (GNU/Linux)
  /usr/local/include (FreeBSD ports)
  /usr/local/Cellar/readline/8.0.0/include (macOS homebrew)

and software using readline is supposed to

  #include <readline/readline.h>

However, since Cflags in readline.pc contains

  -I${includedir}/readline

the compiler will expect to find the header in

  /usr/include/readline/readline/readline.h

which will work on GNU/Linux, where /usr/include is part of the
default include path, but will not on other platforms.

Signed-off-by: Andrea Bolognani <address@hidden>
---
 readline.pc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readline.pc.in b/readline.pc.in
index a7f2cf3..ff79d71 100644
--- a/readline.pc.in
+++ b/readline.pc.in
@@ -9,4 +9,4 @@ URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
 Version: @LIBVERSION@
 Requires.private: @TERMCAP_PKG_CONFIG_LIB@
 Libs: -L${libdir} -lreadline
-Cflags: -I${includedir}/readline
+Cflags: -I${includedir}
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]