From ff1384962449f4a2a1a6b2eada5582bdc2c61bd5 Mon Sep 17 00:00:00 2001
From: Björn Esser <besser82@fedoraproject.org>
Date: Wed, 27 Dec 2017 14:37:55 +0100
Subject: config: Avoid clash with other config-headers

---
 backend/session/direct-ipc.c | 2 +-
 backend/session/logind.c     | 2 +-
 backend/session/session.c    | 2 +-
 examples/support/config.c    | 3 ++-
 include/meson.build          | 1 +
 include/rootston/desktop.h   | 2 +-
 include/rootston/server.h    | 2 +-
 include/rootston/view.h      | 2 +-
 include/wlr/meson.build      | 1 +
 include/wlr/xwayland.h       | 2 +-
 meson.build                  | 2 +-
 rootston/config.c            | 2 +-
 rootston/desktop.c           | 2 +-
 rootston/main.c              | 2 +-
 rootston/seat.c              | 2 +-
 rootston/xwayland.c          | 2 +-
 types/wlr_xdg_shell_v6.c     | 2 +-
 xwayland/xwm.c               | 2 +-
 18 files changed, 19 insertions(+), 16 deletions(-)
 create mode 100644 include/meson.build
 create mode 100644 include/wlr/meson.build

diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index 52cdbbb9..e7a169fa 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -18,7 +18,7 @@
 #include <linux/major.h>
 #endif
 #include <xf86drm.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/util/log.h>
 #include "backend/session/direct-ipc.h"
 
diff --git a/backend/session/logind.c b/backend/session/logind.c
index 539490de..fb2af492 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -10,7 +10,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/backend/session/interface.h>
 #include <wlr/util/log.h>
 
diff --git a/backend/session/session.c b/backend/session/session.c
index 725aa1b9..13d47579 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -9,7 +9,7 @@
 #include <wayland-server.h>
 #include <xf86drm.h>
 #include <xf86drmMode.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/backend/session.h>
 #include <wlr/backend/session/interface.h>
 #include <wlr/util/log.h>
diff --git a/examples/support/config.c b/examples/support/config.c
index ff63b078..f0efa594 100644
--- a/examples/support/config.c
+++ b/examples/support/config.c
@@ -7,9 +7,10 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/param.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/util/log.h>
 #include <wlr/types/wlr_box.h>
+#include "support/config.h"
 #include "shared.h"
 #include "ini.h"
 
diff --git a/include/meson.build b/include/meson.build
new file mode 100644
index 00000000..d16d6ef4
--- /dev/null
+++ b/include/meson.build
@@ -0,0 +1 @@
+subdir('wlr')
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index 7039cfcf..a016bb94 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -2,7 +2,7 @@
 #define _ROOTSTON_DESKTOP_H
 #include <time.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_output.h>
 #include <wlr/types/wlr_output_layout.h>
 #include <wlr/types/wlr_compositor.h>
diff --git a/include/rootston/server.h b/include/rootston/server.h
index a014c749..0c26ea92 100644
--- a/include/rootston/server.h
+++ b/include/rootston/server.h
@@ -1,7 +1,7 @@
 #ifndef _ROOTSTON_SERVER_H
 #define _ROOTSTON_SERVER_H
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/backend.h>
 #include <wlr/backend/session.h>
 #include <wlr/types/wlr_data_device.h>
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 53e96764..579b148a 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -2,7 +2,7 @@
 #define _ROOTSTON_VIEW_H
 
 #include <stdbool.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_box.h>
 #include <wlr/types/wlr_surface.h>
 #include <wlr/types/wlr_xdg_shell_v6.h>
diff --git a/include/wlr/meson.build b/include/wlr/meson.build
new file mode 100644
index 00000000..508abfe7
--- /dev/null
+++ b/include/wlr/meson.build
@@ -0,0 +1 @@
+configure_file(output: 'config.h', install_dir: 'include/wlr', configuration: conf_data)
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h
index 37b09204..8d71a7ab 100644
--- a/include/wlr/xwayland.h
+++ b/include/wlr/xwayland.h
@@ -3,7 +3,7 @@
 
 #include <time.h>
 #include <stdbool.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_compositor.h>
 #include <wlr/types/wlr_seat.h>
 #include <xcb/xcb.h>
diff --git a/meson.build b/meson.build
index 51de7a4c..21e6e381 100644
--- a/meson.build
+++ b/meson.build
@@ -89,10 +89,10 @@ if get_option('enable_xwayland')
 else
 	exclude_files += ['xwayland.h', 'xwm.h']
 endif
-configure_file(output: 'config.h', install_dir: 'include/wlr', configuration: conf_data)
 install_subdir('include/wlr', install_dir: 'include', exclude_files: exclude_files)
 
 
+subdir('include')
 subdir('protocol')
 subdir('render')
 subdir('backend')
diff --git a/rootston/config.c b/rootston/config.c
index f369c4f5..f9fde369 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -9,7 +9,7 @@
 #include <strings.h>
 #include <unistd.h>
 #include <sys/param.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/util/log.h>
 #include <wlr/types/wlr_box.h>
 #include "rootston/config.h"
diff --git a/rootston/desktop.c b/rootston/desktop.c
index a4692439..69dcf4a9 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -3,7 +3,7 @@
 #include <time.h>
 #include <stdlib.h>
 #include <math.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_box.h>
 #include <wlr/types/wlr_compositor.h>
 #include <wlr/types/wlr_cursor.h>
diff --git a/rootston/main.c b/rootston/main.c
index 87f1c0b4..33ca6504 100644
--- a/rootston/main.c
+++ b/rootston/main.c
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/backend.h>
 #include <wlr/backend/headless.h>
 #include <wlr/backend/multi.h>
diff --git a/rootston/seat.c b/rootston/seat.c
index 635bc8b1..c2c7e3ea 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_xcursor_manager.h>
 #include <wlr/util/log.h>
 #include "rootston/xcursor.h"
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index b00b61bc..3d84dc19 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_box.h>
 #include <wlr/types/wlr_surface.h>
 #include <wlr/xwayland.h>
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index 3d9dc404..ead5a73e 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -5,7 +5,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wayland-server.h>
-#include "config.h"
+#include <wlr/config.h>
 #include <wlr/types/wlr_xdg_shell_v6.h>
 #include <wlr/types/wlr_surface.h>
 #include <wlr/types/wlr_seat.h>
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index d9bfaf2e..849acff8 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -7,7 +7,7 @@
 #include <xcb/xfixes.h>
 #include <xcb/xcb_image.h>
 #include <xcb/render.h>
-#include "config.h"
+#include <wlr/config.h>
 #include "wlr/util/log.h"
 #include "wlr/util/edges.h"
 #include "wlr/types/wlr_surface.h"
-- 
cgit v1.2.3