Build: Support common+sense+wilzor API libs; Move xcbXorg into commonLibs

xcbXorg is a connection manager lib that'll be used in common by all of
the xcb API frontends: xcbMouse, xcbWindow and xcbKeyboard. We moved
it into commonLibs to make it make more sense.

We also cleaned up the M4 scripting around AC_ARG_VAR-ing new common
libs as well as sense/wilzor libs.
This commit is contained in:
2025-01-28 04:57:07 -04:00
parent 29a1e1ecf2
commit e201b5e695
10 changed files with 146 additions and 27 deletions
+65
View File
@@ -0,0 +1,65 @@
dnl Wrapper macros for specific API types
AC_DEFUN([HK_SENSEAPI_ARG_ENABLE], [
_HK_LIB_ARG_ENABLE([senseapi], [$1], [$2], [$3],
[SENSEAPIS_ENABLED], [$4], [$5])
])
AC_DEFUN([HK_WILZORAPI_ARG_ENABLE], [
_HK_LIB_ARG_ENABLE([wilzorapi], [$1], [$2], [$3],
[WILZORLIBS_ENABLED], [$4], [$5])
])
HK_SENSEAPI_ARG_ENABLE([xcbWindow],
m4_normalize([XCB/Xorg Window Attaching SenseAPI backend: enables Harikoff
to see attached window contents. Useful for web learning]),
[CONFIG_XCBWINDOW_ENABLED],
[_HK_LIB_XCBXORG_ENABLE],
[unimplemented]
)
HK_SENSEAPI_ARG_ENABLE([v4l],
m4_normalize([Video4Linux camera SenseAPI backend: enables Harikoff to
see via a V4L camera]),
[CONFIG_V4L_ENABLED], [
PKG_CHECK_MODULES([V4L], [libv4l], [], [
AC_MSG_ERROR(m4_normalize([libv4l not found. Sense API V4L
requires the libv4l dev headers and shlib.]))
])
AC_SUBST([V4L_CFLAGS])
AC_SUBST([V4L_LIBS])
],
[unimplemented]
)
HK_SENSEAPI_ARG_ENABLE([alsaMic],
m4_normalize([ALSA Microphone SenseAPI backend: enables Harikoff to
hear via an ALSA microphone]),
[CONFIG_ALSAMIC_ENABLED],
[_HK_LIB_ALSA_ENABLE],
[unimplemented]
)
HK_WILZORAPI_ARG_ENABLE([xcbMouse],
m4_normalize([XCB/Xorg Mouse Wilzor API backend: enables Harikoff to
control a virtual mouse cursor via XCB/Xorg]),
[CONFIG_XCBMOUSE_ENABLED],
[_HK_LIB_XCBXORG_ENABLE],
[unimplemented]
)
HK_WILZORAPI_ARG_ENABLE([xcbKeyboard],
m4_normalize([XCB/Xorg Keyboard Wilzor API backend: enables Harikoff to
control a virtual keyboard via XCB/Xorg]),
[CONFIG_XCBKEYBOARD_ENABLED],
[_HK_LIB_XCBXORG_ENABLE],
[unimplemented]
)
HK_WILZORAPI_ARG_ENABLE([alsaVoice],
m4_normalize([ALSA Voice Wilzor API backend: enables Harikoff to
vocalize via an ALSA voice synthesizer]),
[CONFIG_ALSAVOICE_ENABLED],
[_HK_LIB_ALSA_ENABLE],
[unimplemented]
)