aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2007-12-31 10:45:01 -0500
committerTheodore Ts'o <tytso@mit.edu>2007-12-31 22:34:19 -0500
commit3249394d4309032de5ca517c6a452777f303fdb8 (patch)
treeb6f6ad132a3625a3c494f5a257380cc8e838bda0 /configure
parent3306861158a1ca27b7ec83bb33fb8fbbf043d24c (diff)
downloade2fsprogs-3249394d4309032de5ca517c6a452777f303fdb8.tar.gz
Add --disable-tls configure option
Add option to forcibly disable the use of thread local storage Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure173
1 files changed, 97 insertions, 76 deletions
diff --git a/configure b/configure
index 244a509b..50a23ff4 100755
--- a/configure
+++ b/configure
@@ -1376,13 +1376,14 @@ Optional Features:
--enable-fsck build fsck wrapper program
--enable-e2initrd-helper build e2initrd-helper program
--enable-blkid-devmapper build with device-mapper support
+ --disable-tls disable use of thread local support
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-diet-libc Use diet libc
+ --with-diet-libc use diet libc
--with-cc=COMPILER select compiler to use
--with-linker=LINKER select linker to use
--with-ccopts=CCOPTS select compiler command line options
@@ -4166,6 +4167,101 @@ fi
+# Check whether --enable-tls was given.
+if test "${enable_tls+set}" = set; then
+ enableval=$enable_tls; if test "$enableval" = "no"
+then
+ try_tls=""
+ echo "Disabling thread local support"
+else
+ try_tls="yes"
+ echo "Enabling thread local support"
+fi
+
+else
+ try_tls="yes"
+echo "Try using thread local support by default"
+
+fi
+
+if test "$try_tls" = "yes"
+then
+
+ { echo "$as_me:$LINENO: checking for thread local storage (TLS) class" >&5
+echo $ECHO_N "checking for thread local storage (TLS) class... $ECHO_C" >&6; }
+ if test "${ac_cv_tls+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ax_tls_keywords="__thread __declspec(thread) none"
+ for ax_tls_keyword in $ax_tls_keywords; do
+ case $ax_tls_keyword in
+ none) ac_cv_tls=none ; break ;;
+ *)
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+ static void
+ foo(void) {
+ static $ax_tls_keyword int bar;
+ exit(1);
+ }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_tls=$ax_tls_keyword ; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_tls=none
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ esac
+ done
+
+fi
+
+
+ if test "$ac_cv_tls" != "none"; then
+
+cat >>confdefs.h <<_ACEOF
+#define TLS $ac_cv_tls
+_ACEOF
+
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_tls" >&5
+echo "${ECHO_T}$ac_cv_tls" >&6; }
+
+fi
MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
GETTEXT_PACKAGE=e2fsprogs
@@ -11434,81 +11530,6 @@ done
fi
- { echo "$as_me:$LINENO: checking for thread local storage (TLS) class" >&5
-echo $ECHO_N "checking for thread local storage (TLS) class... $ECHO_C" >&6; }
- if test "${ac_cv_tls+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in
- none) ac_cv_tls=none ; break ;;
- *)
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
- static void
- foo(void) {
- static $ax_tls_keyword int bar;
- exit(1);
- }
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_tls=$ax_tls_keyword ; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_tls=none
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- esac
- done
-
-fi
-
-
- if test "$ac_cv_tls" != "none"; then
-
-cat >>confdefs.h <<_ACEOF
-#define TLS $ac_cv_tls
-_ACEOF
-
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_tls" >&5
-echo "${ECHO_T}$ac_cv_tls" >&6; }
-
-