summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure358
1 files changed, 288 insertions, 70 deletions
diff --git a/configure b/configure
index c886aeb..e1ff0cb 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.183-96821 for GNU sed 4.3.
+# Generated by GNU Autoconf 2.69.183-96821 for GNU sed 4.4.
#
# Report bugs to <bug-sed@gnu.org>.
#
@@ -565,8 +565,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU sed'
PACKAGE_TARNAME='sed'
-PACKAGE_VERSION='4.3'
-PACKAGE_STRING='GNU sed 4.3'
+PACKAGE_VERSION='4.4'
+PACKAGE_STRING='GNU sed 4.4'
PACKAGE_BUGREPORT='bug-sed@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/sed/'
@@ -612,6 +612,13 @@ am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+BUILD_DUMMY_MAN_PAGE_FALSE
+BUILD_DUMMY_MAN_PAGE_TRUE
+BUILD_MAN_PAGE_FALSE
+BUILD_MAN_PAGE_TRUE
+PERL
+CROSS_COMPILING_FALSE
+CROSS_COMPILING_TRUE
GNULIB_TEST_WARN_CFLAGS
WARN_CFLAGS
WERROR_CFLAGS
@@ -2074,7 +2081,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU sed 4.3 to adapt to many kinds of systems.
+\`configure' configures GNU sed 4.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2145,7 +2152,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU sed 4.3:";;
+ short | recursive ) echo "Configuration of GNU sed 4.4:";;
esac
cat <<\_ACEOF
@@ -2270,7 +2277,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU sed configure 4.3
+GNU sed configure 4.4
generated by GNU Autoconf 2.69.183-96821
Copyright (C) 2016 Free Software Foundation, Inc.
@@ -2907,7 +2914,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU sed $as_me 4.3, which was
+It was created by GNU sed $as_me 4.4, which was
generated by GNU Autoconf 2.69.183-96821. Invocation command line was
$ $0 $@
@@ -3864,7 +3871,7 @@ fi
# Define the identity of the package.
PACKAGE='sed'
- VERSION='4.3'
+ VERSION='4.4'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -5421,66 +5428,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-printf %s "checking whether $CC understands -c and -o together... " >&6; }
-if test ${am_cv_prog_cc_c_o+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
- # Make sure it works both with $CC and with simple cc.
- # Following AC_PROG_CC_C_O, we do the test twice because some
- # compilers refuse to overwrite an existing .o file with -o,
- # though they will create one.
- am_cv_prog_cc_c_o=yes
- for am_i in 1 2; do
- if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
- ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } \
- && test -f conftest2.$ac_objext; then
- : OK
- else
- am_cv_prog_cc_c_o=no
- break
- fi
- done
- rm -f core conftest*
- unset am_i
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
depcc="$CC" am_compiler_list=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -6924,6 +6871,7 @@ fi
# Code from module c-strcase:
# Code from module c-strcase-tests:
# Code from module c-strcaseeq:
+ # Code from module c99:
# Code from module canonicalize-lgpl:
# Code from module canonicalize-lgpl-tests:
# Code from module chdir:
@@ -7114,6 +7062,7 @@ fi
# Code from module stat:
# Code from module stat-macros:
# Code from module stat-tests:
+ # Code from module std-gnu11:
# Code from module stdalign:
# Code from module stdalign-tests:
# Code from module stdarg:
@@ -19313,15 +19262,171 @@ printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
if test "$gl_threads_api" = posix; then
# OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
+ has_rwlock=false
ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
"
if test "x$ac_cv_type_pthread_rwlock_t" = xyes
then :
+ has_rwlock=true
printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
fi
+ if $has_rwlock; then
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
+printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
+if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
+then :
+ printf %s "(cached) " >&6
+else
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBMULTITHREAD"
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define SUCCEED() exit (0)
+#define FAILURE() exit (1)
+#define UNEXPECTED(n) (exit (10 + (n)))
+
+/* The main thread creates the waiting writer and the requesting reader threads
+ in the default way; this guarantees that they have the same priority.
+ We can reuse the main thread as first reader thread. */
+
+static pthread_rwlock_t lock;
+static pthread_t reader1;
+static pthread_t writer;
+static pthread_t reader2;
+static pthread_t timer;
+/* Used to pass control from writer to reader2 and from reader2 to timer,
+ as in a relay race.
+ Passing control from one running thread to another running thread
+ is most likely faster than to create the second thread. */
+static pthread_mutex_t baton;
+
+static void *
+timer_func (void *ignored)
+{
+ /* Step 13 (can be before or after step 12):
+ The timer thread takes the baton, then waits a moment to make sure
+ it can tell whether the second reader thread is blocked at step 12. */
+ if (pthread_mutex_lock (&baton))
+ UNEXPECTED (13);
+ usleep (100000);
+ /* By the time we get here, it's clear that the second reader thread is
+ blocked at step 12. This is the desired behaviour. */
+ SUCCEED ();
+}
+
+static void *
+reader2_func (void *ignored)
+{
+ int err;
+
+ /* Step 8 (can be before or after step 7):
+ The second reader thread takes the baton, then waits a moment to make sure
+ the writer thread has reached step 7. */
+ if (pthread_mutex_lock (&baton))
+ UNEXPECTED (8);
+ usleep (100000);
+ /* Step 9: The second reader thread requests the lock. */
+ err = pthread_rwlock_tryrdlock (&lock);
+ if (err == 0)
+ FAILURE ();
+ else if (err != EBUSY)
+ UNEXPECTED (9);
+ /* Step 10: Launch a timer, to test whether the next call blocks. */
+ if (pthread_create (&timer, NULL, timer_func, NULL))
+ UNEXPECTED (10);
+ /* Step 11: Release the baton. */
+ if (pthread_mutex_unlock (&baton))
+ UNEXPECTED (11);
+ /* Step 12: The second reader thread requests the lock. */
+ err = pthread_rwlock_rdlock (&lock);
+ if (err == 0)
+ FAILURE ();
+ else
+ UNEXPECTED (12);
+}
+
+static void *
+writer_func (void *ignored)
+{
+ /* Step 4: Take the baton, so that the second reader thread does not go ahead
+ too early. */
+ if (pthread_mutex_lock (&baton))
+ UNEXPECTED (4);
+ /* Step 5: Create the second reader thread. */
+ if (pthread_create (&reader2, NULL, reader2_func, NULL))
+ UNEXPECTED (5);
+ /* Step 6: Release the baton. */
+ if (pthread_mutex_unlock (&baton))
+ UNEXPECTED (6);
+ /* Step 7: The writer thread requests the lock. */
+ if (pthread_rwlock_wrlock (&lock))
+ UNEXPECTED (7);
+ return NULL;
+}
+
+int
+main ()
+{
+ reader1 = pthread_self ();
+
+ /* Step 1: The main thread initializes the lock and the baton. */
+ if (pthread_rwlock_init (&lock, NULL))
+ UNEXPECTED (1);
+ if (pthread_mutex_init (&baton, NULL))
+ UNEXPECTED (1);
+ /* Step 2: The main thread acquires the lock as a reader. */
+ if (pthread_rwlock_rdlock (&lock))
+ UNEXPECTED (2);
+ /* Step 3: Create the writer thread. */
+ if (pthread_create (&writer, NULL, writer_func, NULL))
+ UNEXPECTED (3);
+ /* Job done. Go to sleep. */
+ for (;;)
+ {
+ sleep (1);
+ }
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
+else
+ gl_cv_pthread_rwlock_rdlock_prefer_writer=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
+printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
+ case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
+ *yes)
+
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
+
+ ;;
+ esac
+
+ fi
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -33344,6 +33449,107 @@ printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
fi
+ if test "$cross_compiling" = yes; then
+ CROSS_COMPILING_TRUE=
+ CROSS_COMPILING_FALSE='#'
+else
+ CROSS_COMPILING_TRUE='#'
+ CROSS_COMPILING_FALSE=
+fi
+
+
+# Perl is needed for help2man
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PERL+y}
+then :
+ printf %s "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # 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
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$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
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+printf "%s\n" "$PERL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+# building from tarball?
+built_from_tarball=no
+test -f "$srcdir"/.tarball-version && \
+ ! test -d "$srcdir/.git" && \
+ built_from_tarball=yes
+
+# Can the man page be built?
+# Perl needed for help2man, executing sed needed for 'sed --help'
+can_rebuild_man_page=no
+test -n "$PERL" && \
+ test "$cross_compiling" != yes && \
+ can_rebuild_man_page=yes
+
+# Build the man page when
+# building from git and rebuilding is possible.
+ if test "$built_from_tarball" = no && \
+ test "$can_rebuild_man_page" = yes; then
+ BUILD_MAN_PAGE_TRUE=
+ BUILD_MAN_PAGE_FALSE='#'
+else
+ BUILD_MAN_PAGE_TRUE='#'
+ BUILD_MAN_PAGE_FALSE=
+fi
+
+
+# Create a stub man page instead of failing when
+# building from git and rebuilding is not possible.
+ if test "$built_from_tarball" = no && \
+ test "$can_rebuild_man_page" = no; then
+ BUILD_DUMMY_MAN_PAGE_TRUE=
+ BUILD_DUMMY_MAN_PAGE_FALSE='#'
+else
+ BUILD_DUMMY_MAN_PAGE_TRUE='#'
+ BUILD_DUMMY_MAN_PAGE_FALSE=
+fi
+
+
+
+# This is needed when building outside the source dir
+# with --disable-dependency-tracking, see https://bugs.gnu.org/25371
+as_dir=lib; as_fn_mkdir_p
+as_dir=sed; as_fn_mkdir_p
+as_dir=doc; as_fn_mkdir_p
+as_dir=testsuite; as_fn_mkdir_p
+
ac_config_files="$ac_config_files Makefile po/Makefile.in gnulib-tests/Makefile"
cat >confcache <<\_ACEOF
@@ -33593,6 +33799,18 @@ if test -z "${TEST_REGEX_TRUE}" && test -z "${TEST_REGEX_FALSE}"; then
as_fn_error $? "conditional \"TEST_REGEX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
+ as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_MAN_PAGE_TRUE}" && test -z "${BUILD_MAN_PAGE_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_MAN_PAGE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_DUMMY_MAN_PAGE_TRUE}" && test -z "${BUILD_DUMMY_MAN_PAGE_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_DUMMY_MAN_PAGE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -33962,7 +34180,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU sed $as_me 4.3, which was
+This file was extended by GNU sed $as_me 4.4, which was
generated by GNU Autoconf 2.69.183-96821. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -34034,7 +34252,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU sed config.status 4.3
+GNU sed config.status 4.4
configured by $0, generated by GNU Autoconf 2.69.183-96821,
with options \\"\$ac_cs_config\\"