From: Ivan Maidanski Date: Mon, 12 Sep 2011 08:39:35 +0000 (+0400) Subject: Regenerate configure, update ChangeLog for commit c7c3144. X-Git-Tag: gc7_2~138^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83d1405f500cbb941148dee3f316aaaeb2bf5fab;p=gc Regenerate configure, update ChangeLog for commit c7c3144. --- diff --git a/ChangeLog b/ChangeLog index c83035c2..9d4a52e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-08-14 Ivan Maidanski (really Petter Urkedal) + + * configure.ac: Remove checks for ar and ranlib. + * configure.ac: Replace AC_CHECK_HEADER with PKG_CHECK_MODULES when + checking for libatomic_ops. The macro sets the appropriate flags, so + simplify accordingly. + * Makefile.am, configure.ac: Set ATOMIC_OPS_CFLAGS in configure.ac + instead of conditionally doing it in Makefile.am, to be more + consistent with the pkg-config case. + * configure.ac: Fix a typo and some phrases. + * Makefile.in: Regenerate. + * aclocal.m4: Ditto. + * configure: Ditto. + 2011-08-11 Ivan Maidanski (really Petter Urkedal) * configure.ac: Since we no longer bundle libatomic_ops, we must diff --git a/Makefile.in b/Makefile.in index 8241d21c..324b7fd2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -92,9 +92,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@USE_INTERNAL_LIBATOMIC_OPS_TRUE@am__append_1 = -I$(top_builddir)/libatomic_ops/src \ -@USE_INTERNAL_LIBATOMIC_OPS_TRUE@ -I$(top_srcdir)/libatomic_ops/src - check_PROGRAMS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \ smashtest$(EXEEXT) hugetest$(EXEEXT) realloc_test$(EXEEXT) \ staticrootstest$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ @@ -102,14 +99,14 @@ check_PROGRAMS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \ # C Library: Architecture Dependent # --------------------------------- -@PTHREADS_TRUE@am__append_2 = pthread_start.c pthread_support.c pthread_stop_world.c -@DARWIN_THREADS_TRUE@am__append_3 = darwin_stop_world.c -@WIN32_THREADS_TRUE@am__append_4 = win32_threads.c +@PTHREADS_TRUE@am__append_1 = pthread_start.c pthread_support.c pthread_stop_world.c +@DARWIN_THREADS_TRUE@am__append_2 = darwin_stop_world.c +@WIN32_THREADS_TRUE@am__append_3 = win32_threads.c # C++ Interface # ------------- -@CPLUSPLUS_TRUE@am__append_5 = libgccpp.la -@CPLUSPLUS_TRUE@am__append_6 = include/gc_cpp.h include/gc_allocator.h +@CPLUSPLUS_TRUE@am__append_4 = libgccpp.la +@CPLUSPLUS_TRUE@am__append_5 = include/gc_cpp.h include/gc_allocator.h DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \ $(dist_noinst_HEADERS) $(dist_noinst_SCRIPTS) \ $(dist_pkgdata_DATA) $(include_HEADERS) $(srcdir)/Makefile.am \ @@ -120,15 +117,15 @@ DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \ $(top_srcdir)/include/private/config.h.in ChangeLog compile \ config.guess config.sub depcomp install-sh ltmain.sh missing \ mkinstalldirs -@KEEP_BACK_PTRS_TRUE@am__append_7 = tracetest$(EXEEXT) -@KEEP_BACK_PTRS_TRUE@am__append_8 = tracetest -@THREADS_TRUE@am__append_9 = threadleaktest$(EXEEXT) \ +@KEEP_BACK_PTRS_TRUE@am__append_6 = tracetest$(EXEEXT) +@KEEP_BACK_PTRS_TRUE@am__append_7 = tracetest +@THREADS_TRUE@am__append_8 = threadleaktest$(EXEEXT) \ @THREADS_TRUE@ threadkey_test$(EXEEXT) \ @THREADS_TRUE@ initsecondarythread$(EXEEXT) -@THREADS_TRUE@am__append_10 = threadleaktest threadkey_test \ +@THREADS_TRUE@am__append_9 = threadleaktest threadkey_test \ @THREADS_TRUE@ initsecondarythread -@CPLUSPLUS_TRUE@am__append_11 = test_cpp$(EXEEXT) -@CPLUSPLUS_TRUE@am__append_12 = test_cpp +@CPLUSPLUS_TRUE@am__append_10 = test_cpp$(EXEEXT) +@CPLUSPLUS_TRUE@am__append_11 = test_cpp subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gc_set_version.m4 \ @@ -384,6 +381,7 @@ distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ATOMIC_OPS_CFLAGS = @ATOMIC_OPS_CFLAGS@ ATOMIC_OPS_LIBS = @ATOMIC_OPS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -450,6 +448,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -534,8 +533,10 @@ top_srcdir = @top_srcdir@ # endif SUBDIRS = ACLOCAL_AMFLAGS = -I m4 -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - $(am__append_1) +AM_CPPFLAGS = \ + -I$(top_builddir)/include -I$(top_srcdir)/include \ + $(ATOMIC_OPS_CFLAGS) + # Initialize variables so that we can declare files locally. @@ -574,14 +575,14 @@ EXTRA_DIST = gc_cpp.cpp README.QUICK BCC_MAKEFILE NT_MAKEFILE \ # C Library # --------- -lib_LTLIBRARIES = libgc.la $(am__append_5) libcord.la +lib_LTLIBRARIES = libgc.la $(am__append_4) libcord.la # unprefixed header include_HEADERS = include/extra/gc.h include/extra/gc_cpp.h # installed headers # -pkginclude_HEADERS = $(am__append_6) include/gc.h include/gc_typed.h \ +pkginclude_HEADERS = $(am__append_5) include/gc.h include/gc_typed.h \ include/gc_inline.h include/gc_mark.h include/gc_cpp.h \ include/weakpointer.h include/new_gc_alloc.h \ include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h \ @@ -604,8 +605,8 @@ dist_noinst_HEADERS = include/private/gc_hdrs.h \ check_LTLIBRARIES = libstaticrootslib.la TESTS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \ smashtest$(EXEEXT) hugetest$(EXEEXT) realloc_test$(EXEEXT) \ - staticrootstest$(EXEEXT) $(am__append_7) $(am__append_9) \ - $(am__append_11) + staticrootstest$(EXEEXT) $(am__append_6) $(am__append_8) \ + $(am__append_10) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = bdw-gc.pc libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ @@ -613,8 +614,8 @@ libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c \ os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ specific.c stubborn.c typd_mlc.c backgraph.c \ - thread_local_alloc.c $(am__append_2) $(am__append_3) \ - $(am__append_4) + thread_local_alloc.c $(am__append_1) $(am__append_2) \ + $(am__append_3) @NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S @USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c diff --git a/aclocal.m4 b/aclocal.m4 index dcfae356..9f183ad7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -19,6 +19,164 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/configure b/configure index bcf2805c..2ec85dc4 100755 --- a/configure +++ b/configure @@ -624,6 +624,8 @@ USE_INTERNAL_LIBATOMIC_OPS_FALSE USE_INTERNAL_LIBATOMIC_OPS_TRUE subdirs ATOMIC_OPS_LIBS +ATOMIC_OPS_CFLAGS +PKG_CONFIG USE_LIBDIR_FALSE USE_LIBDIR_TRUE UNWINDLIBS @@ -639,7 +641,9 @@ LIPO NMEDIT DSYMUTIL MANIFEST_TOOL +RANLIB ac_ct_AR +AR DLLTOOL OBJDUMP LN_S @@ -677,8 +681,6 @@ THREADS_FALSE THREADS_TRUE THREADDLLIBS GC_CFLAGS -RANLIB -AR am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE @@ -825,7 +827,10 @@ CCC CCAS CCASFLAGS CPP -CXXCPP' +CXXCPP +PKG_CONFIG +ATOMIC_OPS_CFLAGS +ATOMIC_OPS_LIBS' ac_subdirs_all='libatomic_ops' # Initialize some variables set by options. @@ -1484,7 +1489,7 @@ Optional Packages: configuring with a cross compiler --with-cross-host=HOST configuring with a cross compiler --with-libatomic-ops=yes|no|check - Use a pre-installed libatomic_ops? (default: check) + Use a external libatomic_ops? (default: check) Some influential environment variables: CC C compiler command @@ -1500,6 +1505,11 @@ Some influential environment variables: CCASFLAGS assembler compiler flags (defaults to CFLAGS) CPP C preprocessor CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + ATOMIC_OPS_CFLAGS + C compiler flags for ATOMIC_OPS, overriding pkg-config + ATOMIC_OPS_LIBS + linker flags for ATOMIC_OPS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -4722,191 +4732,6 @@ else fi -## FIXME: really needed? (AC_LIBTOOL already provides this) -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - # :) @@ -16597,39 +16422,222 @@ fi # Check for an external libatomic_ops if the answer was yes or check. If not # found, fail on yes, and convert check to no. + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi if test x"$with_libatomic_ops" != xno; then : - ac_fn_c_check_header_mongrel "$LINENO" "atomic_ops.h" "ac_cv_header_atomic_ops_h" "$ac_includes_default" -if test "x$ac_cv_header_atomic_ops_h" = xyes; then : +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATOMIC_OPS" >&5 +$as_echo_n "checking for ATOMIC_OPS... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$ATOMIC_OPS_CFLAGS"; then + pkg_cv_ATOMIC_OPS_CFLAGS="$ATOMIC_OPS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"atomic_ops\""; } >&5 + ($PKG_CONFIG --exists --print-errors "atomic_ops") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ATOMIC_OPS_CFLAGS=`$PKG_CONFIG --cflags "atomic_ops" 2>/dev/null` else - if test x"$with_libatomic_ops" != xcheck; then : - as_fn_error $? "A pre-installed libatomic_ops was not found." "$LINENO" 5 + pkg_failed=yes fi - with_libatomic_ops=no + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$ATOMIC_OPS_LIBS"; then + pkg_cv_ATOMIC_OPS_LIBS="$ATOMIC_OPS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"atomic_ops\""; } >&5 + ($PKG_CONFIG --exists --print-errors "atomic_ops") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ATOMIC_OPS_LIBS=`$PKG_CONFIG --libs "atomic_ops" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ATOMIC_OPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "atomic_ops"` + else + ATOMIC_OPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "atomic_ops"` + fi + # Put the nasty error message in config.log where it belongs + echo "$ATOMIC_OPS_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test x"$with_libatomic_ops" != xcheck; then : + as_fn_error $? "A external libatomic_ops was not found." "$LINENO" 5 +fi + with_libatomic_ops=no +elif test $pkg_failed = untried; then + if test x"$with_libatomic_ops" != xcheck; then : + as_fn_error $? "A external libatomic_ops was not found." "$LINENO" 5 +fi + with_libatomic_ops=no +else + ATOMIC_OPS_CFLAGS=$pkg_cv_ATOMIC_OPS_CFLAGS + ATOMIC_OPS_LIBS=$pkg_cv_ATOMIC_OPS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi # If we have neither an external or an internal version, offer a useful hint # and exit. if test x"$with_libatomic_ops" = xno -a ! -e "$srcdir/libatomic_ops"; then : - as_fn_error $? "libatomic_ops is required. You can either install it on your system, or fetch and unpack a resent version into the source directory and link or rename it to libatomic_ops." "$LINENO" 5 + as_fn_error $? "libatomic_ops is required. You can either install it on your system, or fetch and unpack a recent version into the source directory and link or rename it to libatomic_ops." "$LINENO" 5 fi -# Finally, emit the definitions for bundled or pre-installed AO. +# Finally, emit the definitions for bundled or external AO. { $as_echo "$as_me:${as_lineno-$LINENO}: checking which libatomic_ops to use" >&5 $as_echo_n "checking which libatomic_ops to use... " >&6; } if test x"$with_libatomic_ops" != xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5 -$as_echo "pre-installed" >&6; } - ATOMIC_OPS_LIBS="-latomic_ops" - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } + ATOMIC_OPS_CFLAGS='-I$(top_builddir)/libatomic_ops/src -I$(top_srcdir)/libatomic_ops/src' + ATOMIC_OPS_LIBS="" + subdirs="$subdirs libatomic_ops"