[PATCH:xdm] Show compile time options in Debug output

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 3 22:47:58 PDT 2013


On Tue, Sep 03, 2013 at 10:35:43AM -0700, Alan Coopersmith wrote:
> When debugging, helps figure out which options the distro or builder
> chose to enable or disable.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---

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

Cheers,
   Peter

>  xdm/dm.c |   43 ++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 42 insertions(+), 1 deletion(-)
> 
> diff --git a/xdm/dm.c b/xdm/dm.c
> index 815950c..90543c1 100644
> --- a/xdm/dm.c
> +++ b/xdm/dm.c
> @@ -168,7 +168,48 @@ main (int argc, char **argv)
>  	exit (1);
>      }
>  
> -    LogInfo ("Starting\n");
> +    LogInfo ("Starting %s\n", PACKAGE_STRING);
> +    if (debugLevel > 0)
> +    {
> +	Debug("%s was built with these options:\n", PACKAGE_STRING);
> +#ifdef USE_PAM
> +	Debug(" - USE_PAM = yes\n");
> +#else
> +	Debug(" - USE_PAM = no\n");
> +#endif
> +#ifdef USE_SELINUX
> +	Debug(" - USE_SELINUX = yes\n");
> +#else
> +	Debug(" - USE_SELINUX = no\n");
> +#endif
> +#ifdef USE_SYSTEMD_DAEMON
> +	Debug(" - USE_SYSTEMD_DAEMON = yes\n");
> +#else
> +	Debug(" - USE_SYSTEMD_DAEMON = no\n");
> +#endif
> +#ifdef USE_XFT
> +	Debug(" - USE_XFT = yes\n");
> +#else
> +	Debug(" - USE_XFT = no\n");
> +#endif
> +#ifdef USE_XINERAMA
> +	Debug(" - USE_XINERAMA = yes\n");
> +#else
> +	Debug(" - USE_XINERAMA = no\n");
> +#endif
> +#ifdef XPM
> +	Debug(" - XPM = yes\n");
> +#else
> +	Debug(" - XPM = no\n");
> +#endif
> +#ifdef HAVE_ARC4RANDOM
> +	Debug(" - Random number source: arc4random()\n\n");
> +#elif defined(DEV_RANDOM)
> +	Debug(" - Random number source: %s\n", DEV_RANDOM);
> +#else
> +	Debug(" - Random number source: built-in PRNG\n\n");
> +#endif
> +    }
>  
>      if (atexit (RemovePid))
>  	LogError ("could not register RemovePid() with atexit()\n");
> -- 
> 1.7.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list