diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-01-06 15:07:46 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-01-06 15:07:46 +0000 |
commit | 6d01bc27d142a3b7f94b0aba50702e016e031289 (patch) | |
tree | ba3070bd6f64e16adefa97b683165d52040778c1 /configure.in | |
parent | 0e4867f80d3364d5ae222f455c34b93ed749e9a1 (diff) | |
download | libapr-6d01bc27d142a3b7f94b0aba50702e016e031289.tar.gz |
Clean up configure logic for enabling "nonportable" atomics: don't
export the result via apr.h, and enable use of inline asm by default
on ppc64 and x86_64.
* configure.in: Define USE_GENERIC_ATOMICS on i[456]86 unless
--enable-nonportable-atomics was used.
* include/apr.h.in: Remove APR_FORCE_GENERIC_ATOMICS.
* atomic/unix/apr_atomic.c: Check for !defined(USE_GENERIC_ATOMICS)
rather than defined(APR_FORCE_GENERIC_ATOMICS).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/configure.in b/configure.in index 17385832c..2f888e998 100644 --- a/configure.in +++ b/configure.in @@ -339,22 +339,7 @@ esac dnl Check the depend program we can use APR_CHECK_DEPEND -# force_atomic_generic flag -# this will be set we find a cpu/OS combo -# which is historical and doesn't work with the method -# we are using for the more up to date cpu/OS -# (ie.. old sparcs) -apr_force_atomic_generic=0 proc_mutex_is_global=0 -nonportable_atomics_enabled=0 - -AC_ARG_ENABLE(nonportable-atomics, -[ --enable-nonportable-atomics Turn on optimized atomic code which may produce nonportable binaries], -[ - if test "$enableval" = "yes"; then - nonportable_atomics_enabled=1 - fi -]) config_subdirs="none" INSTALL_SUBDIRS="none" @@ -406,18 +391,6 @@ case $host in enable_threads="no" eolstr="\\n" ;; - *linux*) - apr_force_atomic_generic=1 - case $host_cpu in - i486|i586|i686|powerpc64) - if test "$nonportable_atomics_enabled" = 1; then - apr_force_atomic_generic=0 - fi - ;; - esac - OSDIR="unix" - eolstr="\\n" - ;; *hpux10* ) enable_threads="no" OSDIR="unix" @@ -429,7 +402,25 @@ case $host in ;; esac -AC_SUBST(apr_force_atomic_generic) +AC_ARG_ENABLE(nonportable-atomics, +[ --enable-nonportable-atomics Use optimized atomic code which may produce nonportable binaries], +[if test $enableval = yes; then + force_generic_atomics=no + else + force_generic_atomics=yes + fi +], +[case $host_cpu in + i[[456]]86) force_generic_atomics=yes ;; + *) force_generic_atomics=no ;; +esac +]) + +if test $force_generic_atomics = yes; then + AC_DEFINE([USE_GENERIC_ATOMICS], 1, + [Define if use of generic atomics is requested]) +fi + AC_SUBST(proc_mutex_is_global) AC_SUBST(eolstr) AC_SUBST(INSTALL_SUBDIRS) |