ObjFW  Diff

Differences From Artifact [b35cbc2251]:

To Artifact [5855714367]:


494
495
496
497
498
499
500



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533

534
535
536
537
538
539
540
		;;
	esac

	AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads])
	AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}')
	AC_SUBST(USE_INCLUDES_THREADS, '${INCLUDES_THREADS}')




	AC_MSG_CHECKING(whether __thread works)
	AC_TRY_LINK([
		/* It seems __thread is buggy with GCC 4.1 */
		#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
		# error buggy
		#endif

		__thread int x = 0;
	], [
		x++;
	], [
		AS_IF([test x"$enable_shared" != x"no"], [
			old_OBJCFLAGS="$OBJCFLAGS"
			OBJCFLAGS="$OBJCFLAGS -fPIC"
			AC_TRY_COMPILE([
				__thread int x = 0;
			], [
				x++;
			], [
				AC_MSG_RESULT(yes)
				AC_DEFINE(OF_HAVE_COMPILER_TLS, 1,
					[Whether __thread works])
			], [
				AC_MSG_RESULT(no)
			])
			OBJCFLAGS="$old_OBJCFLAGS"
		], [
			AC_MSG_RESULT(yes)
			AC_DEFINE(OF_HAVE_COMPILER_TLS, 1,
				[Whether __thread works])
		])
	], [
		AC_MSG_RESULT(no)

	])

	atomic_ops="none"

	AC_MSG_CHECKING(whether we have an atomic ops assembly implementation)
	AC_EGREP_CPP(yes, [
		#if defined(__GNUC__) && (defined(__i386__) || \







>
>
>
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
		;;
	esac

	AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads])
	AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}')
	AC_SUBST(USE_INCLUDES_THREADS, '${INCLUDES_THREADS}')

	AC_ARG_ENABLE(tls,
		AS_HELP_STRING([--disable-tls], [disable thread local storage]))
	AS_IF([test x"$enable_tls" != x"no"], [
		AC_MSG_CHECKING(whether __thread works)
		AC_TRY_LINK([
			/* It seems __thread is buggy with GCC 4.1 */
			#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
			# error buggy
			#endif

			__thread int x = 0;
		], [
			x++;
		], [
			AS_IF([test x"$enable_shared" != x"no"], [
				old_OBJCFLAGS="$OBJCFLAGS"
				OBJCFLAGS="$OBJCFLAGS -fPIC"
				AC_TRY_COMPILE([
					__thread int x = 0;
				], [
					x++;
				], [
					AC_MSG_RESULT(yes)
					AC_DEFINE(OF_HAVE_COMPILER_TLS, 1,
						[Whether __thread works])
				], [
					AC_MSG_RESULT(no)
				])
				OBJCFLAGS="$old_OBJCFLAGS"
			], [
				AC_MSG_RESULT(yes)
				AC_DEFINE(OF_HAVE_COMPILER_TLS, 1,
					[Whether __thread works])
			])
		], [
			AC_MSG_RESULT(no)
		])
	])

	atomic_ops="none"

	AC_MSG_CHECKING(whether we have an atomic ops assembly implementation)
	AC_EGREP_CPP(yes, [
		#if defined(__GNUC__) && (defined(__i386__) || \