From: Egbert Eich Date: Sun Dec 14 17:40:34 2025 +0100 Subject: Install headers as well Patch-mainline: Not yet Git-commit: 581a01e21d4eb7b2526ff400d64a7a1cb43197ec References: Since the library is built/installed separately to make it available to 3rd party, install the headers as well. After all, libraries without the headers are useless. Add setting of WEBLESS to config.h to make headers consistent with library. Signed-off-by: Egbert Eich Signed-off-by: Egbert Eich --- Makefile.am | 2 ++ configure.ac | 3 +++ src/Makefile.am | 4 +++- src/socket.h | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2743a76..182030b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,8 @@ ACLOCAL_AMFLAGS = -I m4 exampledir = $(docdir)/examples artworkdir = $(docdir)/artwork +include_HEADERS = config.h + dist_example_DATA= \ examples/60-sispmctl.rules \ examples/passwordsetup.sh \ diff --git a/configure.ac b/configure.ac index 7482b7b..7e63728 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,9 @@ AS_HELP_STRING([--enable-webless], [compile version of sispmctl without internal webserver]), [WEBLESS=true]) AC_SUBST(WEBLESS) +if test "x$WEBLESS" = "xtrue"; then + AC_DEFINE(WEBLESS, [1], [Define if webless]) +fi AM_CONDITIONAL(WEBLESSCOND, test x$WEBLESS = xtrue) AC_ARG_ENABLE(all-static, diff --git a/src/Makefile.am b/src/Makefile.am index 98cbdd6..bfba6bd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,9 @@ libsispmctl_la_LDFLAGS = \ -version-info 2:3:2 -bin_PROGRAMS = sispmctl +bin_PROGRAMS = sispmctl + +include_HEADERS = sispm_ctl.h socket.h lib_LTLIBRARIES = libsispmctl.la diff --git a/src/socket.h b/src/socket.h index 48093bd..2c47787 100644 --- a/src/socket.h +++ b/src/socket.h @@ -1,9 +1,11 @@ #ifndef LOCAL_H #define LOCAL_H +#ifndef WEBLESS #define LISTENPORT 2638 extern int listenport; int*socket_init(char*bindaddr); void l_listen(int*sock,struct usb_device*,int devnum); +#endif #endif /* ! LOCAL_H */