[PATCH 2/6] Make the DPMS, ScreenSaver and Res extensions builtin

Peter Hutterer peter.hutterer at who-t.net
Tue Aug 3 18:39:38 PDT 2010


On Sun, Aug 01, 2010 at 09:28:19PM +0200, Tomas Carnecky wrote:
> The change is trivial: simply move the ExtensionModule definitions from
> hw/xfree/dixmods/extmod/modinit.c to mi/miinitext.c. Then also make sure
> the required sources for those extensions are built into libXextbuiltin.la
> instead of libXextmodule.la.

looks good in principle, but
make[4]: Entering directory `/home/whot/xorg/xserver/build-i686/hw/xfree86'
  CCLD   libxorg.la
copying selected object files to avoid basename conflicts...
  CCLD   Xorg
./.libs/libxorg.a(libdixmods_la-miinitext.o):(.data.rel+0x1ec): undefined reference to `DPMSExtensionInit'
./.libs/libxorg.a(libdixmods_la-miinitext.o):(.data.rel+0x200): undefined reference to `ScreenSaverExtensionInit'
./.libs/libxorg.a(libdixmods_la-miinitext.o):(.data.rel+0x214): undefined reference to `ResExtensionInit'
collect2: ld returned 1 exit status

Cheers,
  Peter

> 
> Signed-off-by: Tomas Carnecky <tom at dbservice.com>
> ---
>  Xext/Makefile.am                    |    6 +++---
>  hw/xfree86/dixmods/extmod/modinit.c |   27 ---------------------------
>  mi/miinitext.c                      |   13 +++++++++++--
>  3 files changed, 14 insertions(+), 32 deletions(-)
> 
> diff --git a/Xext/Makefile.am b/Xext/Makefile.am
> index e444fd0..32dc461 100644
> --- a/Xext/Makefile.am
> +++ b/Xext/Makefile.am
> @@ -51,13 +51,13 @@ endif
>  # XResource extension: lets clients get data about per-client resource usage
>  RES_SRCS = xres.c
>  if RES
> -MODULE_SRCS  += $(RES_SRCS)
> +BUILTIN_SRCS  += $(RES_SRCS)
>  endif
>  
>  # MIT ScreenSaver extension
>  SCREENSAVER_SRCS = saver.c
>  if SCREENSAVER
> -MODULE_SRCS  += $(SCREENSAVER_SRCS)
> +BUILTIN_SRCS  += $(SCREENSAVER_SRCS)
>  endif
>  
>  # Xinerama extension: making multiple video devices act as one virtual screen
> @@ -108,7 +108,7 @@ endif
>  # DPMS extension
>  DPMS_SRCS = dpms.c dpmsproc.h
>  if DPMSExtension
> -MODULE_SRCS += $(DPMS_SRCS)
> +BUILTIN_SRCS += $(DPMS_SRCS)
>  endif
>  
>  # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
> diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
> index f4e922c..34c34eb 100644
> --- a/hw/xfree86/dixmods/extmod/modinit.c
> +++ b/hw/xfree86/dixmods/extmod/modinit.c
> @@ -47,15 +47,6 @@ static ExtensionModule extensionModules[] = {
>  	NULL
>      },
>  #endif
> -#ifdef SCREENSAVER
> -    {
> -	ScreenSaverExtensionInit,
> -	ScreenSaverName,
> -	&noScreenSaverExtension,
> -	NULL,
> -	NULL
> -    },
> -#endif
>  #ifdef XF86VIDMODE
>      {
>  	XFree86VidModeExtensionInit,
> @@ -74,15 +65,6 @@ static ExtensionModule extensionModules[] = {
>  	NULL
>      },
>  #endif
> -#ifdef DPMSExtension
> -    {
> -	DPMSExtensionInit,
> -	DPMSExtensionName,
> -	&noDPMSExtension,
> -	NULL,
> -	NULL
> -    },
> -#endif
>  #ifdef XV
>      {
>  	XvExtensionInit,
> @@ -99,15 +81,6 @@ static ExtensionModule extensionModules[] = {
>          NULL
>      },
>  #endif
> -#ifdef RES
> -    {
> -        ResExtensionInit,
> -        XRES_NAME, 
> -        &noResExtension,
> -        NULL,
> -        NULL
> -    },
> -#endif
>      {				/* DON'T delete this entry ! */
>  	NULL,
>  	NULL,
> diff --git a/mi/miinitext.c b/mi/miinitext.c
> index 4499f37..65178cb 100644
> --- a/mi/miinitext.c
> +++ b/mi/miinitext.c
> @@ -506,10 +506,19 @@ static ExtensionModule staticExtensions[] = {
>      { RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL },
>  #endif
>  #ifdef COMPOSITE
> -    { CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
> +    { CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL, NULL },
>  #endif
>  #ifdef DAMAGE
> -    { DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL },
> +    { DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL, NULL },
> +#endif
> +#ifdef DPMSExtension
> +    { DPMSExtensionInit, "DPMS", &noDPMSExtension, NULL, NULL },
> +#endif
> +#ifdef SCREENSAVER
> +    { ScreenSaverExtensionInit, "MIT-SCREEN-SAVER", &noScreenSaverExtension, NULL, NULL },
> +#endif
> +#ifdef RES
> +    { ResExtensionInit, XRES_NAME, &noResExtension, NULL, NULL },
>  #endif
>      { NULL, NULL, NULL, NULL, NULL }
>  };
> -- 
> 1.7.2.1.g43c6fa


More information about the xorg-devel mailing list