aclocal.m4: Replace with version copied from libstdc++-v3.

* aclocal.m4: Replace with version copied from libstdc++-v3.
	* configure.in: Update for changes to aclocal and Makefile.
	* configure: Regenerate.
	* Makefile.in: Correct install and uninstall for cross targets.
	* libU77/configure: Regenerate.

From-SVN: r49316
This commit is contained in:
Geoffrey Keating 2002-01-29 13:21:08 +00:00 committed by Geoffrey Keating
parent ffdeea47b9
commit ceb5e20fdb
6 changed files with 1078 additions and 463 deletions

View File

@ -1,3 +1,11 @@
2002-01-28 Geoffrey Keating <geoffk@redhat.com>
* aclocal.m4: Replace with version copied from libstdc++-v3.
* configure.in: Update for changes to aclocal and Makefile.
* configure: Regenerate.
* Makefile.in: Correct install and uninstall for cross targets.
* libU77/configure: Regenerate.
2002-01-20 Toon Moene <toon@moene.indiv.nluug.nl>
* Makefile.in: $(MULTISUBDIR) has an implied leading `/';

View File

@ -24,13 +24,18 @@ MAKEOVERRIDES=
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
srcdir = @glibcpp_srcdir@
VPATH = @glibcpp_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
gcc_version = @gcc_version@
gcc_version_trigger = @gcc_version_trigger@
top_srcdir = @top_srcdir@
toplevel_srcdir = @toplevel_srcdir@
toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
top_builddir = .
@ -204,28 +209,21 @@ check:
cd libU77; $(MAKE) G77DIR=../../../gcc/ check
install: all
$(LIBTOOL) --mode=install $(INSTALL) $(LIBG2C) $(libdir)$(MULTISUBDIR)
$(INSTALL_DATA) libfrtbegin.a $(libsubdir)$(MULTISUBDIR)
$(RANLIB) $(libsubdir)$(MULTISUBDIR)/libfrtbegin.a
$(SHELL) $(toplevel_srcdir)/mkinstalldirs $(glibcpp_toolexeclibdir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBG2C) $(glibcpp_toolexeclibdir)
$(INSTALL_DATA) libfrtbegin.a $(glibcpp_toolexeclibdir)
$(RANLIB) $(glibcpp_toolexeclibdir)/libfrtbegin.a
$(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h
@if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \
echo ''; \
echo 'Warning: g77 no longer installs libf2c.a or f2c.h.'; \
echo ' You must do so yourself. For more information,'; \
echo ' read "Distributing Binaries" in the g77 docs.'; \
echo ' (To turn off this warning, delete the file'; \
echo ' f2c-install-ok in the source or build directory.)'; \
echo ''; \
else true; fi
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
@-$(LIBTOOL) --mode=finish $(prefix)/lib
@-$(LIBTOOL) --mode=finish $(glibcpp_toolexeclibdir)
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
uninstall:
rm -f $(libsubdir)$(MULTISUBDIR)/include/g2c.h
$(LIBTOOL) --mode=uninstall rm -f $(libdir)$(MULTISUBDIR)/$(LIBG2C_BASE).la
rm -f $(libsubdir)/include/g2c.h
rm -f $(glibcpp_toolexeclibdir)/libfrtbegin.a
$(LIBTOOL) --mode=uninstall rm -f $(glibcpp_toolexeclibdir)$(LIBG2C_BASE).la
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
mostlyclean:

217
libf2c/aclocal.m4 vendored
View File

@ -1,7 +1,224 @@
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl
dnl Initialize configure bits.
dnl
dnl GLIBCPP_CONFIGURE
AC_DEFUN(GLIBCPP_CONFIGURE, [
dnl Default to --enable-multilib
AC_ARG_ENABLE(multilib,
[ --enable-multilib build hella library versions (default)],
[case "${enableval}" in
yes) multilib=yes ;;
no) multilib=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
esac], [multilib=yes])dnl
# When building with srcdir == objdir, links to the source files will
# be created in directories within the target_subdir. We have to
# adjust toplevel_srcdir accordingly, so that configure finds
# install-sh and other auxiliary files that live in the top-level
# source directory.
if test "${srcdir}" = "."; then
if test -z "${with_target_subdir}"; then
toprel=".."
else
if test "${with_target_subdir}" != "."; then
toprel="${with_multisrctop}../.."
else
toprel="${with_multisrctop}.."
fi
fi
else
toprel=".."
fi
AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
toplevel_srcdir=\${top_srcdir}/$toprel
AC_SUBST(toplevel_srcdir)
# Export build and source directories.
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
AC_SUBST(glibcpp_builddir)
AC_SUBST(glibcpp_srcdir)
dnl This is here just to satisfy automake.
ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also
# be 'cp -p' if linking isn't available.
#ac_cv_prog_LN_S='cp -p'
AC_PROG_LN_S
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR
configuring in a subdirectory])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler])
# Never versions of autoconf add an underscore to these functions.
# Prevent future problems ...
ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
# AC_PROG_CC
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
# are probably using a cross compiler, which will not be able to fully
# link an executable. This should really be fixed in autoconf
# itself.
AC_DEFUN(LIB_AC_PROG_CC,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
dnl Fool anybody using AC_PROG_CC.
AC_PROVIDE([AC_PROG_CC])
AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
fi
AC_PROG_CC_GNU
if test $ac_cv_prog_gcc = yes; then
GCC=yes
dnl Check whether -g works, even if CFLAGS is set, in case the package
dnl plays around with CFLAGS (such as to build both debugging and
dnl normal versions of a library), tasteless as that idea is.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
AC_PROG_CC_G
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-O2"
fi
else
GCC=
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
])
LIB_AC_PROG_CC
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
AC_PROG_INSTALL
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
# at least currently, we never actually build a program, so we never
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
# fails, because we are probably configuring with a cross compiler
# which can't create executables. So we include AC_EXEEXT to keep
# automake happy, but we don't execute it, since we don't care about
# the result.
if false; then
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
# to nothing, so nothing would remain between `then' and `fi' if it
# were not for the `:' below.
:
AC_EXEEXT
fi
])
dnl
dnl GLIBCPP_EXPORT_INSTALL_INFO
dnl calculates gxx_install_dir
dnl exports glibcpp_toolexecdir
dnl exports glibcpp_toolexeclibdir
dnl exports glibcpp_prefixdir
dnl
dnl Assumes cross_compiling bits already done, and with_cross_host in
dnl particular
dnl
dnl GLIBCPP_EXPORT_INSTALL_INFO
AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
# exported correctly in GLIBCPP_CONFIGURE.
glibcpp_toolexecdir=no
glibcpp_toolexeclibdir=no
glibcpp_prefixdir=${prefix}
AC_MSG_CHECKING([for interface version number])
libstdcxx_interface=$INTERFACE
AC_MSG_RESULT($libstdcxx_interface)
# Process the option "--enable-version-specific-runtime-libs"
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE(version-specific-runtime-libs,
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
[case "$enableval" in
yes) version_specific_libs=yes ;;
no) version_specific_libs=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
esac],
version_specific_libs=no)dnl
# Option set, now we can test it.
AC_MSG_RESULT($version_specific_libs)
gcc_version_trigger=${srcdir}/../gcc/version.c
gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_trigger)
if test $version_specific_libs = yes; then
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
changequote(,)dnl
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
changequote([,])dnl
fi
# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
# Install a library built with a cross compiler in tooldir, not libdir.
if test x"$glibcpp_toolexecdir" = x"no"; then
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
else
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
fi
fi
AC_SUBST(glibcpp_prefixdir)
AC_SUBST(glibcpp_toolexecdir)
AC_SUBST(glibcpp_toolexeclibdir)
])
sinclude(../libtool.m4)
dnl The lines below arrange for aclocal not to bring an installed
dnl libtool.m4 into aclocal.m4, while still arranging for automake to
dnl add a definition of LIBTOOL to Makefile.in.
ifelse(,,,[AC_SUBST(LIBTOOL)
AC_DEFUN([AM_PROG_LIBTOOL])
AC_DEFUN([AC_LIBTOOL_DLOPEN])
AC_DEFUN([AC_PROG_LD])
])

1032
libf2c/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,18 +22,12 @@
AC_PREREQ(2.13)
AC_INIT(libF77/Version.c)
if test "${srcdir}" = "." ; then
if test "${with_target_subdir}" != "." ; then
topsrcdir=${with_multisrctop}../..
else
topsrcdir=${with_multisrctop}..
fi
else
topsrcdir=${srcdir}/..
fi
dnl This is needed for a multilibbed build in the source tree so
dnl that install-sh and config.sub get found.
AC_CONFIG_AUX_DIR($topsrcdir)
AC_CANONICAL_SYSTEM
target_alias=${target_alias-$target}
AC_SUBST(target_alias)
GLIBCPP_CONFIGURE(.)
GLIBCPP_EXPORT_INSTALL_INFO
# If the language specific compiler does not exist, but the "gcc" directory
# does, we do not build anything. Note, $r is set by the top-level Makefile.
@ -65,29 +59,6 @@ fi
dnl Checks for programs.
dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
dnl not be able to.
define([AC_PROG_CC_WORKS],[])
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
# at least currently, we never actually build a program, so we never
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
# fails, because we are probably configuring with a cross compiler
# which cant create executables. So we include AC_EXEEXT to keep
# automake happy, but we dont execute it, since we dont care about
# the result.
if false; then
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
# to nothing, so nothing would remain between `then' and `fi' if it
# were not for the `:' below.
:
AC_EXEEXT
fi
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
AM_PROG_LIBTOOL
dnl These should be inherited in the recursive make, but ensure they are
@ -135,19 +106,6 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
# Get the version trigger filename from the toplevel
if [[ "${with_gcc_version_trigger+set}" = set ]]; then
gcc_version_trigger=$with_gcc_version_trigger
gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
else
gcc_version_trigger=
gcc_version=UNKNOWN
fi
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_trigger)
AC_CANONICAL_SYSTEM
AC_SUBST(target_alias)
AC_CONFIG_SUBDIRS(libU77 libI77 libF77)
# Do Makefile first since g2c.h depends on it and shouldn't get an
# earlier timestamp. Of course, it does when the multilib gunk below
@ -158,7 +116,7 @@ if test -n "$CONFIG_FILES"; then
if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
. ${topsrcdir}/config-ml.in
. ${toplevel_srcdir}/config-ml.in
touch g2c.h # to keep it more recent than Makefile
fi
fi],
@ -168,8 +126,8 @@ target=${target}
with_target_subdir=${with_target_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
toplevel_srcdir=${toplevel_srcdir}
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
topsrcdir=${topsrcdir}
)

View File

@ -1085,7 +1085,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x = {0,0};
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@ -1486,7 +1486,187 @@ fi
done
LIBU77_GETTIMEOFDAY
for ac_func in gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1494: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1499 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_func_gettimeofday" = yes; then
echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
echo "configure:1548: checking for struct timezone" >&5
if eval "test \"`echo '$''{'g77_cv_struct_timezone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1553 "configure"
#include "confdefs.h"
#include <sys/time.h>
int main() {
struct timezone tz;
; return 0; }
EOF
if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
g77_cv_struct_timezone=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
g77_cv_struct_timezone=no
fi
rm -f conftest*
fi
echo "$ac_t""$g77_cv_struct_timezone" 1>&6
if test $g77_cv_struct_timezone = yes; then
if test "$cross_compiling" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
EOF
else
cat > conftest.$ac_ext <<EOF
#line 1581 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
main ()
{
struct timeval time;
struct timezone dummy;
if (gettimeofday (&time, &dummy))
exit (1);
else
exit (0);
}
EOF
if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
EOF
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -fr conftest*
fi
fi
echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
echo "configure:1620: checking whether gettimeofday can accept two arguments" >&5
if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1625 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
int main() {
struct timeval time;
#ifdef HAVE_TIMEZONE
struct timezone dummy;
#define DUMMY &dummy
#else
#define DUMMY NULL
#endif
gettimeofday (&time, DUMMY);
; return 0; }
EOF
if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
emacs_cv_gettimeofday_two_arguments=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
emacs_cv_gettimeofday_two_arguments=no
fi
rm -f conftest*
fi
echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
if test $emacs_cv_gettimeofday_two_arguments = no; then
cat >> confdefs.h <<\EOF
#define GETTIMEOFDAY_ONE_ARGUMENT 1
EOF
fi
fi
test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o"
test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o"