This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Patch(?): glibc-cvs/{configure.in,aclocal.m4} autoconf-2.52 partial support
- To: aj at suse dot de
- Subject: Patch(?): glibc-cvs/{configure.in,aclocal.m4} autoconf-2.52 partial support
- From: "Adam J. Richter" <adam at yggdrasil dot com>
- Date: Tue, 31 Jul 2001 05:30:41 -0700
- Cc: libc-alpha at sourceware dot cygnus dot com
>> First, the stuff that might be correct are the patches to
>> the top level configure.in and aclocal.m4 files. There are a few
>> places where autoconf-2.52 seems to need a few more things to be
>> quoted, and that is what these changes do.
>
>Can you send just those patches separatly? We can look over them and
>integrate them already since those patches should work fine with older
>and newer autoconf versions.
OK. Here are the patches just to configure.in and
aclocal.m4 against libc-cvs, as checked out a few minutes ago.
I now am able to build glibc under autoconf-2.52 with
these changes and the changes to the configure.in files in the
sysdeps/ subdirectories that I posted earlier. However, I still
as to clean up the changes to the configure.in files in the sysdeps/
subdirectories, possibly in coordination with a change to autoconf.
Notes:
o The change that I am least sure of here is replacing
AC_PROG_CC_GNU with AC_PROG_CC. Autoconf-2.52 does
not have autoconf-2.52, and calling AC_PROG_CC should
be harmless, but I do not know if it is necessary
at that point in the autoconf-2.52 case, and if it is
a sufficient replacement for the case of earlier autoconf
releases.
o There is one new change in aclocal.m4 that was not
in the previous patch. That is the change that involves
the possiblity that ac_cv_prog_cc_cross could be the
empty string. This was the only additional change
that I had to make in addition to my previous chnages
in order to finally get glibc-2.2.3 to build under
autoconf-2.52.
o I generated the diff for configure.in by using
diff and patch to apply the changes from glibc-2.2.3
to glibc-cvs to my configure.in, diffing that against
glibc-cvs/configure.in and then hand editing to delete
some chunks that refer to other local changes. So,
expect patch to report some offsets in its matching.
o I was able to generate the aclocal.m4 patch by just
diffing our local source with glibc-cvs/aclocal.m4,
since the two lines that changed between 2.2.3 and
the cvs version exactly matched my changes.
I hope this is helpful. Please let me know if you have
any questions.
--
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
--- libc/aclocal.m4 Mon Jun 11 05:32:44 2001
+++ /usr/src/lib/glibc/aclocal.m4 Tue Jul 31 03:14:57 2001
@@ -16,7 +16,7 @@
dnl
dnl Check for a symbol
dnl
-AC_DEFUN(AC_CHECK_SYMBOL, [dnl
+AC_DEFUN([AC_CHECK_SYMBOL], [dnl
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
AC_TRY_LINK(,
@@ -36,7 +36,7 @@
dnl Locate a program and check that its version is acceptable.
dnl AC_PROG_CHECK_VER(var, namelist, version-switch,
dnl [version-extract-regexp], version-glob [, do-if-fail])
-AC_DEFUN(AC_CHECK_PROG_VER,
+AC_DEFUN([AC_CHECK_PROG_VER],
[AC_CHECK_PROGS([$1], [$2])
if test -z "[$]$1"; then
ac_verc_fail=yes
@@ -66,22 +66,26 @@
dnl In the situation that cross-linking is impossible, the variable
dnl `cross_linkable' will be substituted with "yes".
dnl The vercheck macros are expected to have been called already.
-AC_DEFUN(AC_PROG_CC_LOCAL,
+AC_DEFUN([AC_PROG_CC_LOCAL],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_PROG_CC_WORKS_LOCAL
-AC_PROG_CC_GNU
+AC_PROG_CC
if test $ac_cv_prog_gcc != yes; then
AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
fi
])
-AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
+AC_DEFUN([AC_PROG_CC_WORKS_LOCAL],
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_CACHE_VAL(ac_cv_prog_cc_works,
[AC_LANG_SAVE
AC_LANG_C
-AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
+AC_TRY_RUN([main(){return(0);}],
+ [ac_cv_prog_cc_works=yes],
+ [ac_cv_prog_cc_works=no],
+ [ac_cv_prog_cc_works=no;
+ ac_cv_prog_cc_cross=yes])
AC_LANG_RESTORE])
AC_MSG_RESULT($ac_cv_prog_cc_works)
if test $ac_cv_prog_cc_works = no; then
@@ -94,11 +98,15 @@
AC_CACHE_CHECK(
[whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler],
ac_cv_prog_cc_cross, [:])
-AC_SUBST(cross_linkable)
-cross_compiling=$ac_cv_prog_cc_cross
+if test -z "$ac_cv_prog_cc_cross"; then
+ cross_compiling=no
+else
+ cross_compiling=$ac_cv_prog_cc_cross
+fi
])
+AC_SUBST(cross_linkable)
-AC_DEFUN(LIBC_PROG_FOO_GNU,
+AC_DEFUN([LIBC_PROG_FOO_GNU],
[# Most GNU programs take a -v and spit out some text including
# the word 'GNU'. Some try to read stdin, so give them /dev/null.
if $1 -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
@@ -108,7 +116,7 @@
fi
rm -fr contest*])
-AC_DEFUN(LIBC_PROG_BINUTILS,
+AC_DEFUN([LIBC_PROG_BINUTILS],
[# Was a --with-binutils option given?
if test -n "$path_binutils"; then
# Make absolute; ensure a single trailing slash.
--- libc/configure.in Mon Jul 9 04:51:53 2001
+++ /usr/src/lib/glibc/configure.in Tue Jul 31 05:09:37 2001
@@ -571,8 +571,13 @@
AC_MSG_ERROR(*** A pwd binary could not be found.)
fi
+AC_DEFUN(REQUIRE_AC_CHECK_TOOL_PREFIX, [
+ AC_REQUIRE([AC_CHECK_TOOL_PREFIX])])
+AC_DEFUN(REQUIRE_LIBC_KERNEL_ID, [
+ AC_REQUIRE([LIBC_KERNEL_ID])])
+
# These programs are version sensitive.
-AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
+REQUIRE_AC_CHECK_TOOL_PREFIX
AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
[version \([egcygnustpi-]*[0-9.]*\)],
[*gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*],
@@ -603,7 +608,11 @@
SED=: aux_missing="$aux_missing sed")
AC_PROG_CC_LOCAL
-AC_CANONICAL_BUILD
+
+AC_DEFUN(REQUIRE_AC_CANONICAL_BUILD, [
+ AC_REQUIRE([AC_CANONICAL_BUILD])])
+REQUIRE_AC_CANONICAL_BUILD
+
if test $host != $build; then
AC_CHECK_PROGS(BUILD_CC, gcc cc)
fi
@@ -628,6 +637,13 @@
CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'`
AC_SUBST(CCVERSION)
+AC_CHECK_LIB(loginstall, log_event_with_source,
+ AC_DEFINE(HAVE_LIBLOGINSTALL)
+ LIBLOGINSTALL="-lloginstall",
+ LIBLOGINSTALL=""
+ )
+AC_SUBST(LIBLOGINSTALL)
+
# if using special system headers, find out the compiler's sekrit
# header directory and add that to the list. NOTE: Only does the right
# thing on a system that doesn't need fixincludes. (Not presently a problem.)
@@ -1453,7 +1517,7 @@
])dnl
AC_CACHE_CHECK(OS release for uname, libc_cv_uname_release, [dnl
-AC_REQUIRE([LIBC_KERNEL_ID])dnl
+REQUIRE_LIBC_KERNEL_ID()dnl
changequote(,)dnl
kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
changequote([,])dnl
@@ -1471,7 +1535,7 @@
uname_release="$libc_cv_uname_release"
AC_CACHE_CHECK(OS version for uname, libc_cv_uname_version, [dnl
-AC_REQUIRE([LIBC_KERNEL_ID])dnl
+REQUIRE_LIBC_KERNEL_ID
changequote(,)dnl
kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
changequote([,])dnl