diff options
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/synaptics.c | 2 | ||||
-rw-r--r-- | src/synproto.h | 5 |
4 files changed, 26 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index ea66935..edfc4e4 100644 --- a/configure.ac +++ b/configure.ac @@ -98,21 +98,31 @@ AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) AC_MSG_CHECKING([which optional backends will be build]) case "${host}" in *linux*) - AC_MSG_RESULT([eventcomm]) + AC_MSG_RESULT([ps2comm alpscomm eventcomm]) + BUILD_PS2COMM="yes" BUILD_EVENTCOMM="yes" - AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) ;; -*freebsd* | *openbsd* | *netbsd* | *dragonfly*) - AC_MSG_RESULT([psmcomm]) +*freebsd* | *netbsd* | *dragonfly*) + AC_MSG_RESULT([ps2comm alpscomm psmcomm]) + BUILD_PS2COMM="yes" BUILD_PSMCOMM="yes" - AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) ;; *) AC_MSG_RESULT([none]) ;; esac +if test "x$BUILD_EVENTCOMM" = xyes; then + AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) +fi +if test "x$BUILD_PSMCOMM" = xyes; then + AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) +fi +if test "x$BUILD_PS2COMM" = xyes; then + AC_DEFINE(BUILD_PS2COMM, 1, [Optional backend ps2comm and alpscomm enabled]) +fi AM_CONDITIONAL([BUILD_EVENTCOMM], [test "x${BUILD_EVENTCOMM}" = "xyes"]) AM_CONDITIONAL([BUILD_PSMCOMM], [test "x${BUILD_PSMCOMM}" = "xyes"]) +AM_CONDITIONAL([BUILD_PS2COMM], [test "x${BUILD_PS2COMM}" = "xyes"]) # ----------------------------------------------------------------------------- # Dependencies for synclient and syndaemon diff --git a/src/Makefile.am b/src/Makefile.am index 0637445..ff513f1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,11 +32,15 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c synapticsstr.h \ - alpscomm.c \ - ps2comm.c ps2comm.h \ synproto.h \ properties.c +if BUILD_PS2COMM +@DRIVER_NAME@_drv_la_SOURCES += \ + alpscomm.c \ + ps2comm.c ps2comm.h +endif + if BUILD_EVENTCOMM @DRIVER_NAME@_drv_la_SOURCES += \ eventcomm.c eventcomm.h diff --git a/src/synaptics.c b/src/synaptics.c index cdb894b..1233917 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -146,8 +146,10 @@ const static struct { #ifdef BUILD_PSMCOMM {"psm", &psm_proto_operations}, #endif +#ifdef BUILD_PS2COMM {"psaux", &psaux_proto_operations}, {"alps", &alps_proto_operations}, +#endif {NULL, NULL} }; diff --git a/src/synproto.h b/src/synproto.h index 54a64eb..251dc84 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -79,14 +79,15 @@ struct SynapticsProtocolOperations { void (*ReadDevDimensions)(InputInfoPtr pInfo); }; +#ifdef BUILD_PS2COMM extern struct SynapticsProtocolOperations psaux_proto_operations; +extern struct SynapticsProtocolOperations alps_proto_operations; +#endif /* BUILD_PS2COMM */ #ifdef BUILD_EVENTCOMM extern struct SynapticsProtocolOperations event_proto_operations; #endif /* BUILD_EVENTCOMM */ #ifdef BUILD_PSMCOMM extern struct SynapticsProtocolOperations psm_proto_operations; #endif /* BUILD_PSMCOMM */ -extern struct SynapticsProtocolOperations alps_proto_operations; - #endif /* _SYNPROTO_H_ */ |