Tue Nov 12 00:06:14 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
+ * acgeneral.m4 (AC_OUTPUT_FILES): Split the list of sed commands in
+ conftest.subs into multiple files named conftest.s[1-9][0-9]*.
+ Create a pipeline of sed commands that use these files, then delete
+ the temporary files. From John W. Eaton <jwe@bevo.che.wisc.edu>.
+
+ * acspecific.m4 (AC_AIX, AC_MINIX): Remove warnings about AC_TRY_LINK.
+ These macros don't change the linkage options.
+
* Test release 2.10.2.
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX) [GCC]: Use -O2 instead
Issues to resolve before release:
-1. sed command limitation.
-2. autoreconf problem with finding subdirectory acconfig.h.
-3. test the new features.
+1. autoreconf problem with finding subdirectory acconfig.h.
+2. test the new features: AC_PROG_CC_WORKS on Solaris, AC_FUNC_MMAP
+on HP-UX, AC_CACHE_SAVE on HP-UX, AC_FUNC_SETPGRP, AC_PATH_XTRA on
+Solaris and BSDI 2.1, sed command splitting on HP-UX, AC_FUNC_FNMATCH.
Major changes in release 2.11:
* AC_PROG_CC and AC_PROG_CXX check whether the compiler works.
They default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O".
-* AC_REPLACE_FUNCS defines HAVE_@var{function} if the system has the function.
+* AC_REPLACE_FUNCS defines HAVE_foo if the system has the function `foo'.
* The argument to AC_CONFIG_HEADER can contain shell variables.
* New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP.
* The "checking..." messages and the source code for test programs that
fail are saved in config.log.
+* Another workaround has been added for seds with small command length limits.
* config.sub and config.guess recognize more system types.
* autoheader.sh adds multiple-inclusion protection for config.h.
* Bug fixes.
I'm not sure whether the limit is on lines or bytes; if bytes, it
will be less of a problem than it was with the long lines used for
creating a header file.
- There has also been a report that HPUX and OSF/1 seds only allow 100
- commands.
------------------------------------------------------------------------------
])
dnl The big finish.
-dnl Produce config.status, config.h, and links, and configure subdirs.
+dnl Produce config.status, config.h, and links; and configure subdirs.
dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
define(AC_OUTPUT,
[trap '' 1 2 15
undivert(AC_DIVERSION_SED)
CEOF
EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_file=1 # Number of current file.
+ac_inc=90 # Lines per file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_inc # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if ! test -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_inc`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"$1"}
*) ac_file_in="${ac_file}.in" ;;
esac
- # Adjust relative srcdir, etc. for subdirectories.
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
changequote(, )dnl
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
])dnl
+
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
s%@top_srcdir@%$top_srcdir%g
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
])dnl
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" $ac_given_srcdir/$ac_file_in | eval "$ac_sed_cmds" > $ac_file
dnl This would break Makefile dependencies.
dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
dnl echo "$ac_file is unchanged"
dnl mv conftest.out $ac_file
dnl fi
fi; done
-rm -f conftest.subs
+rm -f conftest.s*
])
dnl Create the config.h files from the config.h.in files.
AC_DEFUN(AC_AIX,
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_MSG_CHECKING(for AIX)
AC_EGREP_CPP(yes,
AC_DEFUN(AC_MINIX,
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
if test "$MINIX" = yes; then
CEOF
EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_file=1 # Number of current file.
+ac_inc=90 # Lines per file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_inc # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if ! test -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_inc`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
*) ac_file_in="${ac_file}.in" ;;
esac
- # Adjust relative srcdir, etc. for subdirectories.
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
+
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" $ac_given_srcdir/$ac_file_in | eval "$ac_sed_cmds" > $ac_file
fi; done
-rm -f conftest.subs
+rm -f conftest.s*
])
dnl The big finish.
-dnl Produce config.status, config.h, and links, and configure subdirs.
+dnl Produce config.status, config.h, and links; and configure subdirs.
dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
define(AC_OUTPUT,
[trap '' 1 2 15
undivert(AC_DIVERSION_SED)
CEOF
EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_file=1 # Number of current file.
+ac_inc=90 # Lines per file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_inc # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if ! test -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_inc`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"$1"}
*) ac_file_in="${ac_file}.in" ;;
esac
- # Adjust relative srcdir, etc. for subdirectories.
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
changequote(, )dnl
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
])dnl
+
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
s%@top_srcdir@%$top_srcdir%g
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
])dnl
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" $ac_given_srcdir/$ac_file_in | eval "$ac_sed_cmds" > $ac_file
dnl This would break Makefile dependencies.
dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
dnl echo "$ac_file is unchanged"
dnl mv conftest.out $ac_file
dnl fi
fi; done
-rm -f conftest.subs
+rm -f conftest.s*
])
dnl Create the config.h files from the config.h.in files.
AC_DEFUN(AC_AIX,
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_MSG_CHECKING(for AIX)
AC_EGREP_CPP(yes,
AC_DEFUN(AC_MINIX,
[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
if test "$MINIX" = yes; then