From 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Wed, 22 Dec 2010 14:39:48 -0700 Subject: [PATCH] Autodetect TLS support instead of defaulting to disabled. Uses the AX_TLS macro to figure out if the current platform supports TLS. If it does, enable TLS automagically. Still respects --enable option, regardless. Signed-off-by: Tom Fogal Reviewed-by: Dan Nicholson --- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1ceffe7cb..e6ada8d2b 100644 --- a/configure.ac +++ b/configure.ac @@ -597,9 +597,14 @@ dnl GLX build options AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]), [AIGLX=$enableval], [AIGLX=yes]) -AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: disabled)]), +AX_TLS +AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]), [GLX_USE_TLS=$enableval], - [GLX_USE_TLS=no]) + [GLX_USE_TLS=no + if test "${ac_cv_tls}" != "none" ; then + GLX_USE_TLS=yes + fi]) +AC_SUBST(GLX_TLS, ${GLX_USE_TLS}) dnl Extensions. AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])