albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.86k stars 414 forks source link

[PATCH] `./configure --disable-systemd` fails with missing systemd. #499

Closed dreirund closed 5 months ago

dreirund commented 1 year ago

When I run ./configure --disable-systemd, it is expected to not complain about missing systemd. But it does:

checking for DEPS... no
configure: error: Package requirements (libudev libsystemd > 219) were not met:

Package 'libsystemd', required by 'virtual:world', not found

The actual parameter which has to be passed to ./configure seems to be --enable-disable-systemd, but ./configure --help says it is --disable-systemd.

Fix attached: configure-fix-disable-systemd.patch.txt.

Regards!

albfan commented 1 year ago

Probably better:

diff --git i/configure.ac w/configure.ac
index 6cc2870..a30cd68 100644
--- i/configure.ac
+++ w/configure.ac
@@ -45,7 +45,7 @@ AC_ARG_VAR(IP_BINARY, [Path for ip binary])
 if test -z "$IP_BINARY"; then
        IP_BINARY=/bin/ip
 fi
-AC_ARG_ENABLE([disable-systemd],
+AC_ARG_ENABLE([systemd],
               AS_HELP_STRING([--disable-systemd], [Disable systemd]), [], [use_libsystemd=yes], [Disable systemd using elogind])
 AC_DEFINE_UNQUOTED([IP_BINARY], [$IP_BINARY], [Path for ip binary])

can you test again with:

./configure --disable-systemd
tiziodcaio commented 1 year ago

Or simply use meson...

dreirund commented 10 months ago

Probably better:

[…]

can you test again with:

./configure --disable-systemd

I applied your patch and tested, now ./configure --disable-systemd runs through.

This issue can now be closed. (But running make still fails with

rtsp.c:31:10: fatal error: systemd/sd-event.h: No such file or directory
   31 | #include <systemd/sd-event.h>
      |          ^~~~~~~~~~~~~~~~~~~~

so the other patch is still needed.)

albfan commented 10 months ago

Looks to me a different include dir is needed. I don't think modify the sources is correct

albfan commented 5 months ago

Looks AC_ARG_ENABLE is a little bit cryptic.

https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Package-Options.html

--disable-systemd is just equivalent to --enable-systemd=no

So this patch would work:

diff --git c/configure.ac i/configure.ac
index 6cc2870..a93c08c 100644
--- c/configure.ac
+++ i/configure.ac
@@ -45,8 +45,15 @@ AC_ARG_VAR(IP_BINARY, [Path for ip binary])
 if test -z "$IP_BINARY"; then
        IP_BINARY=/bin/ip
 fi
-AC_ARG_ENABLE([disable-systemd],
-              AS_HELP_STRING([--disable-systemd], [Disable systemd]), [], [use_libsystemd=yes], [Disable systemd using elogind])
+AC_ARG_ENABLE([systemd],
+              AS_HELP_STRING([--disable-systemd], [Disable systemd]),
+              [case "${enableval}" in
+                yes) use_libsystemd=yes ;;
+                no)  use_libsystemd=no ;;
+                *) AC_MSG_ERROR([bad value ${enableval} for --enable-systemd]) ;;
+              esac],
+              [use_libsystemd=yes])
+
 AC_DEFINE_UNQUOTED([IP_BINARY], [$IP_BINARY], [Path for ip binary])

 #

I look to credit you but I'm unsure of your author info

Let me know if you want to provide one or open a pull request

albfan commented 5 months ago

If you don't want to be credited I can just merge #511

dreirund commented 5 months ago

On Sat, 01 Jun 2024 17:21:00 -0700, Alberto Fanjul @.***> wrote:

If you don't want to be credited I can just merge #511

I do not want to be credited.

Just use a solution that works fine for you.

Regards!