diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-30 18:41:49 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-30 18:41:49 +0200 |
| commit | cdd1566cf942ffa1e04dd72b288551cacfaf48f1 (patch) | |
| tree | d2e375890c6c9e66da24e473daadce5066f4accc | |
| parent | 7a8343e7e482c6303242468f917f1d50d4e9ff38 (diff) | |
Allow building Wayland platform without dbus (#726)
This commit supports configure-based builds without the dbus-dev package;
CMake-based builds are expected to be changed in further commit.
| -rw-r--r-- | README.Wayland.txt | 4 | ||||
| -rw-r--r-- | configure.ac | 10 | ||||
| -rw-r--r-- | libdecor/build/Makefile | 2 | ||||
| -rw-r--r-- | makeinclude.in | 1 |
4 files changed, 11 insertions, 6 deletions
diff --git a/README.Wayland.txt b/README.Wayland.txt index 2fa3251e9..5b714c707 100644 --- a/README.Wayland.txt +++ b/README.Wayland.txt @@ -130,9 +130,9 @@ in section 2.1 of file README.Unix.txt : - libpango1.0-dev - libwayland-dev - wayland-protocols -- libdbus-1-dev - libxkbcommon-dev - libxinerama-dev +- libdbus-1-dev <== recommended to query current cursor theme - libglew-dev <== necessary to use OpenGL version 3 or above - cmake <== if you plan to build with CMake - cmake-qt-gui <== if you plan to use the GUI of CMake @@ -161,8 +161,8 @@ package groups listed in section 2.2 of file README.Unix.txt : - cairo-devel - libxkbcommon-devel - pango-devel -- dbus-devel - mesa-libGLU-devel +- dbus-devel <== recommended to query current cursor theme - gtk3-devel <== highly recommended, gives windows a GTK-style titlebar - glew-devel <== necessary to use OpenGL version 3 or above - cmake <== if you plan to build with CMake diff --git a/configure.ac b/configure.ac index 893d0aa16..1b2696b01 100644 --- a/configure.ac +++ b/configure.ac @@ -899,6 +899,7 @@ HLINKS= OSX_ONLY=: THREADS= LIBDECORDIR="" +LIBDECORDBUS="" AC_ARG_WITH([links], AS_HELP_STRING([--with-links], [make header links for common misspellings (default=no)])) @@ -1011,10 +1012,9 @@ AS_CASE([$host_os_gui], [cygwin* | mingw*], [ AS_IF([$PKGCONFIG --exists 'wayland-protocols >= 1.15'],[],[missing="yes"]) AS_IF([$PKGCONFIG --exists wayland-cursor],[],[missing="yes"]) AS_IF([$PKGCONFIG --exists xkbcommon],[],[missing="yes"]) - AS_IF([$PKGCONFIG --exists dbus-1],[],[missing="yes"]) AS_IF([$PKGCONFIG --exists pangocairo],[],[missing="yes"]) AS_IF([test x$missing = xyes], [ - AC_MSG_WARN([These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon dbus-1 pangocairo' are required to build FLTK for wayland.]) + AC_MSG_WARN([These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon pangocairo' are required to build FLTK for wayland.]) AC_MSG_WARN([At least one of them is missing.]) AS_IF([test x$enable_wayland = xyes], [ AC_MSG_ERROR([Building for Wayland is not possible. Aborting.]) @@ -1044,11 +1044,14 @@ AS_CASE([$host_os_gui], [cygwin* | mingw*], [ # CXXFLAGS="$CXXFLAGS -DUSE_SYSTEM_LIBDECOR=0" LIBS="$LIBS $($PKGCONFIG --libs wayland-cursor) $($PKGCONFIG --libs wayland-client) $($PKGCONFIG --libs xkbcommon) $($PKGCONFIG --libs pangocairo) " AS_IF([test x$enable_x11 != xno], [LIBS="$LIBS $($PKGCONFIG --libs x11)"] ) - LIBS="$LIBS $($PKGCONFIG --libs dbus-1) -ldl" + LIBS="$LIBS -ldl" # CXXFLAGS="$CXXFLAGS -I../libdecor/src" DSOFLAGS="$LIBS $DSOFLAGS" enable_pango=yes LIBDECORDIR="libdecor/build" + AS_IF([$PKGCONFIG --exists dbus-1], + [LIBDECORDBUS="-DHAS_DBUS $($PKGCONFIG --cflags dbus-1)" LIBS="$LIBS $($PKGCONFIG --libs dbus-1)"] + ) LDFLAGS="$LDFLAGS -rdynamic" AC_SUBST([UNAME]) UNAME="$(uname -s)" @@ -1407,6 +1410,7 @@ AC_SUBST([OSX_ONLY]) AC_SUBST([THREADS]) AC_SUBST([LIBDECORDIR]) +AC_SUBST([LIBDECORDBUS]) AC_SUBST([INSTALL_DESKTOP]) AC_SUBST([UNINSTALL_DESKTOP]) diff --git a/libdecor/build/Makefile b/libdecor/build/Makefile index 98d8b0bef..25116f4c0 100644 --- a/libdecor/build/Makefile +++ b/libdecor/build/Makefile @@ -51,7 +51,7 @@ os-compatibility.o : ../src/os-compatibility.c $(CC) $(CFLAGS_DECOR) -c ../src/os-compatibility.c cursor-settings.o : ../src/cursor-settings.c - $(CC) $(CFLAGS_DECOR) -c ../src/cursor-settings.c -DHAS_DBUS `pkg-config --cflags dbus-1` + $(CC) $(CFLAGS_DECOR) -c ../src/cursor-settings.c $(LIBDECORDBUS) ../../src/xdg-shell-protocol.c : wayland-scanner private-code $(PROTOCOLS)/stable/xdg-shell/xdg-shell.xml \ diff --git a/makeinclude.in b/makeinclude.in index 4426d992f..74f3b7669 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -108,6 +108,7 @@ IMAGELIBS = -L../lib @IMAGELIBS@ # optional extra build step for libdecor: LIBDECORDIR = @LIBDECORDIR@ +LIBDECORDBUS = @LIBDECORDBUS@ # image libraries to build... IMAGEDIRS = @JPEG@ @ZLIB@ @PNG@ |
