summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Bolognani <abologna@redhat.com>2017-10-25 17:16:14 +0200
committerNiels de Vos <ndevos@redhat.com>2017-11-08 11:10:44 +0000
commit684d62276af37c260671024ce17cb281f493b289 (patch)
tree9cf1eada1063b43ec60f88bef1d7b2963f3439b0
parentb79f29694165a65666d4177619d57b54641e4255 (diff)
*.pc: Fix include path in Cflags
The include path in glusterfs-api.pc looks like -I${includedir}/glusterfs However, client code will include the glusterfs headers using #include <glusterfs/api/glfs.h> rather than #include <api/glfs.h> which makes the "/glusterfs" part entirely unnecessary. More importantly, on some platforms such as FreeBSD, the header files for glusterfs will be installed in /usr/local/include, which is *not* part of the compiler's default include path, so compilation will fail with something like fatal error: 'glusterfs/api/glfs.h' file not found #include <glusterfs/api/glfs.h> ^~~~~~~~~~~~~~~~~~~~~~ The fix is to simply drop the extra "/glusterfs". The same change is applied to other *.pc files as well, althought I haven't actually tested those. A test program (gfapi-load-volfile) and the glfsxmp example application were using the wrong include paths, so they had to be fixed as well. Change-Id: I9a16de47fee7ab9c12d1cb823bbe061a69352670 BUG: 1508947 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
-rw-r--r--api/examples/glfsxmp.c4
-rw-r--r--glusterfs-api.pc.in2
-rw-r--r--libgfchangelog.pc.in2
-rw-r--r--libgfdb.pc.in2
-rw-r--r--tests/basic/gfapi/gfapi-load-volfile.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/api/examples/glfsxmp.c b/api/examples/glfsxmp.c
index 7ff3f0eb7ee..a8e2cc93381 100644
--- a/api/examples/glfsxmp.c
+++ b/api/examples/glfsxmp.c
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include "api/glfs.h"
-#include "api/glfs-handles.h"
+#include <glusterfs/api/glfs.h>
+#include <glusterfs/api/glfs-handles.h>
#include <string.h>
#include <time.h>
diff --git a/glusterfs-api.pc.in b/glusterfs-api.pc.in
index 5d234543414..6af4e108f7f 100644
--- a/glusterfs-api.pc.in
+++ b/glusterfs-api.pc.in
@@ -9,4 +9,4 @@ Description: GlusterFS API
Version: @GFAPI_VERSION@
Requires: @PKGCONFIG_UUID@
Libs: -L${libdir} @GFAPI_LIBS@ -lgfapi -lglusterfs -lgfrpc -lgfxdr
-Cflags: -I${includedir}/glusterfs -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DUSE_POSIX_ACLS=@USE_POSIX_ACLS@
+Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DUSE_POSIX_ACLS=@USE_POSIX_ACLS@
diff --git a/libgfchangelog.pc.in b/libgfchangelog.pc.in
index 91c85e6f1f8..e2ff1fb6214 100644
--- a/libgfchangelog.pc.in
+++ b/libgfchangelog.pc.in
@@ -9,4 +9,4 @@ Description: GlusterFS Changelog Consumer Library
Version: @LIBGFCHANGELOG_VERSION@
Requires: @PKGCONFIG_UUID@
Libs: -L${libdir} -lgfchangelog -lglusterfs
-Cflags: -I${includedir}/glusterfs/gfchangelog -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64
+Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64
diff --git a/libgfdb.pc.in b/libgfdb.pc.in
index 945685cde98..463e8becd3a 100644
--- a/libgfdb.pc.in
+++ b/libgfdb.pc.in
@@ -8,5 +8,5 @@ Name: libgfdb
Description: GlusterFS Database Library
Version: @LIBGFDB_VERSION@
Libs: -L${libdir} -lgfchangedb -lglusterfs
-Cflags: -I${includedir}/glusterfs/gfdb
+Cflags: -I${includedir}
Requires: sqlite3 @PKGCONFIG_UUID@
diff --git a/tests/basic/gfapi/gfapi-load-volfile.c b/tests/basic/gfapi/gfapi-load-volfile.c
index 91d5677bd44..79502f7a44f 100644
--- a/tests/basic/gfapi/gfapi-load-volfile.c
+++ b/tests/basic/gfapi/gfapi-load-volfile.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <string.h>
-#include <api/glfs.h>
+#include <glusterfs/api/glfs.h>
#define PROGNAME "gfapi-load-volfile"