[PATCH synaptics 8/8] Now ps2comm and alpscomm backend optional

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 27 19:38:57 PST 2011


On Sun, Feb 27, 2011 at 01:11:51AM +0500, Alexandr Shadchin wrote:
> Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
> ---
> OpenBSD don't support this backends. Backend for OpenBSD I'll add later.

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter

>  configure.ac    |   20 +++++++++++++++-----
>  src/Makefile.am |    8 ++++++--
>  src/synaptics.c |    2 ++
>  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 at _drv_la_SOURCES = @DRIVER_NAME at .c synapticsstr.h \
> -	alpscomm.c \
> -	ps2comm.c ps2comm.h \
>  	synproto.h \
>  	properties.c
>  
> +if BUILD_PS2COMM
> + at DRIVER_NAME@_drv_la_SOURCES += \
> +	alpscomm.c \
> +	ps2comm.c ps2comm.h
> +endif
> +
>  if BUILD_EVENTCOMM
>  @DRIVER_NAME at _drv_la_SOURCES += \
>  	eventcomm.c eventcomm.h
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 8819798..3b6e63b 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -136,8 +136,10 @@ int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
>                  BOOL checkonly);
>  
>  const static SynapticsProtocolRec protocols[] = {
> +#ifdef BUILD_PS2COMM
>      {"psaux", &psaux_proto_operations},
>      {"alps", &alps_proto_operations},
> +#endif
>  #ifdef BUILD_PSMCOMM
>      {"psm", &psm_proto_operations},
>  #endif
> diff --git a/src/synproto.h b/src/synproto.h
> index 9c25428..700cf7a 100644
> --- a/src/synproto.h
> +++ b/src/synproto.h
> @@ -84,14 +84,15 @@ typedef struct {
>      struct SynapticsProtocolOperations *proto_ops;
>  } SynapticsProtocolRec;
>  
> +#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_ */
> -- 
> 1.7.3.5
> 


More information about the xorg-devel mailing list