mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 20:03:58 +08:00
re PR libfortran/11800 ([gfortan] libgfortran should be multi-libed)
PR gfortran/11800 * Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES. (lib_LTLIBRARIES): Rename to ... (toolexeclib_LTLIBRARIES): this for multilib support. * configure.in: Rename to ... * configure.ac: this. Update to modern autoconf style, enable multilibs, support --enable-version-specific-runtime-libs. * Makefile.in: Regenerated. * configure: Regenerated. * aclocal.m4: Regenerated. From-SVN: r82466
This commit is contained in:
parent
78dd5e36d9
commit
96b8a6154e
@ -1,3 +1,16 @@
|
||||
2004-05-30 Andreas Jaeger <aj@suse.de>, Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
PR gfortran/11800
|
||||
* Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
|
||||
(lib_LTLIBRARIES): Rename to ...
|
||||
(toolexeclib_LTLIBRARIES): this for multilib support.
|
||||
* configure.in: Rename to ...
|
||||
* configure.ac: this. Update to modern autoconf style, enable
|
||||
multilibs, support --enable-version-specific-runtime-libs.
|
||||
* Makefile.in: Regenerated.
|
||||
* configure: Regenerated.
|
||||
* aclocal.m4: Regenerated.
|
||||
|
||||
2004-05-30 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
* libgfortran.h (random_seed): Update prototype.
|
||||
|
@ -4,13 +4,13 @@
|
||||
## __STDC_VERSION__ is set such that libc includes make them available.
|
||||
AM_CFLAGS = -std=gnu99
|
||||
|
||||
lib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
|
||||
toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
|
||||
|
||||
## This should really go in the compiler lib dir, not the system lib dir.
|
||||
libgfortranbegin_la_SOURCES = fmain.c
|
||||
libgfortranbegin_la_LDFLAGS = -static
|
||||
|
||||
INCLUDES = -I$(srcdir)/io
|
||||
AM_CPPFLAGS = -I$(srcdir)/io
|
||||
|
||||
libgfortranincludedir = $(includedir)/gforio
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
408
libgfortran/aclocal.m4
vendored
408
libgfortran/aclocal.m4
vendored
@ -149,282 +149,6 @@ AC_CONFIG_COMMANDS_PRE(
|
||||
Usually this means the macro was only invoked conditionally.])
|
||||
fi])])
|
||||
|
||||
# serial 7 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
#serial 2
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
|
||||
# Extract the definition of DEP_FILES from the Makefile without
|
||||
# running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
|
||||
# We invoke sed twice because it is the simplest approach to
|
||||
# changing $(DEPDIR) to its actual value in the expansion.
|
||||
for file in `sed -n '
|
||||
/^DEP_FILES = .*\\\\$/ {
|
||||
s/^DEP_FILES = //
|
||||
:loop
|
||||
s/\\\\$//
|
||||
p
|
||||
n
|
||||
/\\\\$/ b loop
|
||||
p
|
||||
}
|
||||
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# This macro actually does too much some checks are only needed if
|
||||
@ -648,69 +372,6 @@ AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
# serial 2
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# -*- Autoconf -*-
|
||||
|
||||
|
||||
@ -823,6 +484,75 @@ else
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
|
||||
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
|
||||
# ---------------------------------------------------
|
||||
# Add --enable-multilib to configure.
|
||||
AC_DEFUN([AM_ENABLE_MULTILIB],
|
||||
[# Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "$enableval" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
|
||||
esac],
|
||||
[multilib=yes])
|
||||
|
||||
# We may get other options which we leave undocumented:
|
||||
# --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
# See config-ml.in if you want the gory details.
|
||||
|
||||
if test "$srcdir" = "."; then
|
||||
if test "$with_target_subdir" != "."; then
|
||||
multi_basedir="$srcdir/$with_multisrctop../$2"
|
||||
else
|
||||
multi_basedir="$srcdir/$with_multisrctop$2"
|
||||
fi
|
||||
else
|
||||
multi_basedir="$srcdir/$2"
|
||||
fi
|
||||
AC_SUBST(multi_basedir)
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
# Only add multilib support code if we just rebuilt the top-level
|
||||
# Makefile.
|
||||
case " $CONFIG_FILES " in
|
||||
*" ]m4_default([$1],Makefile)[ "*)
|
||||
ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
|
||||
;;
|
||||
esac],
|
||||
[
|
||||
srcdir="$srcdir"
|
||||
host="$host"
|
||||
target="$target"
|
||||
with_multisubdir="$with_multisubdir"
|
||||
with_multisrctop="$with_multisrctop"
|
||||
with_target_subdir="$with_target_subdir"
|
||||
ac_configure_args="${multilib_arg} ${ac_configure_args}"
|
||||
multi_basedir="$multi_basedir"
|
||||
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
CC="$CC"])])dnl
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
5981
libgfortran/configure
vendored
5981
libgfortran/configure
vendored
File diff suppressed because it is too large
Load Diff
195
libgfortran/configure.ac
Normal file
195
libgfortran/configure.ac
Normal file
@ -0,0 +1,195 @@
|
||||
# Process this file with autoconf to produce a configure script, like so:
|
||||
# aclocal && autoconf && autoheader && automake
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([GNU Fortran Runtime Library], 0.2,,[libgfortran])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
# For libtool versioning info, format is CURRENT:REVISION:AGE
|
||||
libtool_VERSION=6:0:0
|
||||
AC_SUBST(libtool_VERSION)
|
||||
|
||||
# -------
|
||||
# Options
|
||||
# -------
|
||||
|
||||
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])
|
||||
AC_MSG_RESULT($version_specific_libs)
|
||||
|
||||
|
||||
# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
|
||||
#
|
||||
# You will slowly go insane if you do not grok the following fact: when
|
||||
# building this library, the top-level /target/ becomes the library's /host/.
|
||||
#
|
||||
# configure then causes --target to default to --host, exactly like any
|
||||
# other package using autoconf. Therefore, 'target' and 'host' will
|
||||
# always be the same. This makes sense both for native and cross compilers
|
||||
# just think about it for a little while. :-)
|
||||
#
|
||||
# Also, if this library is being configured as part of a cross compiler, the
|
||||
# top-level configure script will pass the "real" host as $with_cross_host.
|
||||
#
|
||||
# Do not delete or change the following two lines. For why, see
|
||||
# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
|
||||
AC_CANONICAL_SYSTEM
|
||||
target_alias=${target_alias-$host_alias}
|
||||
|
||||
# Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the
|
||||
# following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
|
||||
# 1.8.2: minimum required version
|
||||
# no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch
|
||||
# of other PACKAGE_* variables will, however, and there's nothing
|
||||
# we can do about that; they come from AC_INIT).
|
||||
# foreign: we don't follow the normal rules for GNU packages (no COPYING
|
||||
# file in the top srcdir, etc, etc), so stop complaining.
|
||||
# no-dependencies: turns off auto dependency generation (just for now)
|
||||
# -Wall: turns on all automake warnings...
|
||||
# -Wno-portability: ...except this one, since GNU make is required.
|
||||
AM_INIT_AUTOMAKE([1.8.2 no-define foreign no-dependencies -Wall -Wno-portability])
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AM_ENABLE_MULTILIB(, ..)
|
||||
|
||||
# Handy for debugging:
|
||||
#AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
|
||||
|
||||
# Are we being configured with some form of cross compiler?
|
||||
# NB: We don't actually need to know this just now, but when, say, a test
|
||||
# suite is included, we'll have to know.
|
||||
if test "$build" != "$host"; then
|
||||
LIBGFOR_IS_NATIVE=false
|
||||
GCC_NO_EXECUTABLES
|
||||
else
|
||||
LIBGFOR_IS_NATIVE=true
|
||||
fi
|
||||
|
||||
# Process the option "--enable-version-specific-runtime-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)
|
||||
|
||||
# Calculate toolexeclibdir
|
||||
# Also toolexecdir, though it's only used in toolexeclibdir
|
||||
case ${version_specific_libs} in
|
||||
yes)
|
||||
# Need the gcc compiler version to know where to install libraries
|
||||
# and header files if --enable-version-specific-runtime-libs option
|
||||
# is selected.
|
||||
toolexecdir='$(libdir)/gcc/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
|
||||
;;
|
||||
no)
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
# Install a library built with a cross compiler in tooldir, not libdir.
|
||||
toolexecdir='$(exec_prefix)/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/lib'
|
||||
else
|
||||
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
|
||||
toolexeclibdir='$(libdir)'
|
||||
fi
|
||||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) ;; # Avoid trailing /.
|
||||
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(toolexecdir)
|
||||
AC_SUBST(toolexeclibdir)
|
||||
|
||||
# Check the compiler.
|
||||
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
|
||||
# We must force CC to /not/ be precious variables; otherwise
|
||||
# the wrong, non-multilib-adjusted value will be used in multilibs.
|
||||
# As a side effect, we have to subst CFLAGS ourselves.
|
||||
|
||||
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
AC_PROG_CC
|
||||
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
# Add -Wall if we are using GCC.
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
||||
# Find other programs we need.
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Configure libtool
|
||||
#AC_MSG_NOTICE([====== Starting libtool configuration])
|
||||
AC_LIBTOOL_DLOPEN
|
||||
AM_PROG_LIBTOOL
|
||||
AC_SUBST(enable_shared)
|
||||
AC_SUBST(enable_static)
|
||||
#AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
|
||||
|
||||
# We need gfortran to compile parts of the library
|
||||
# We can't use AC_PROG_F77 because it expects a fully working gfortran.
|
||||
#AC_PROG_F77(gfortran)
|
||||
F77="$GFORTRAN"
|
||||
AC_PROG_F77(gfortran)
|
||||
FFLAGS="$FFLAGS -Wall -fno-repack-arrays -fno-underscoring"
|
||||
|
||||
AC_FUNC_MMAP
|
||||
AC_TYPE_OFF_T
|
||||
|
||||
# check header files
|
||||
AC_STDC_HEADERS
|
||||
AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h)
|
||||
AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h)
|
||||
AC_CHECK_HEADER([complex.h],[AC_DEFINE([HAVE_COMPLEX_H], [1], [complex.h exists])])
|
||||
|
||||
# Check for complex math functions
|
||||
AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])
|
||||
|
||||
# Check for complex math functions in -lmx also
|
||||
AC_CHECK_LIB([mx],[csin],[need_math="no"],[need_math="yes"])
|
||||
|
||||
# Check for library functions.
|
||||
AC_CHECK_FUNCS(getrusage times)
|
||||
|
||||
# Let the user override this
|
||||
AC_ARG_ENABLE(cmath,
|
||||
AC_HELP_STRING([--enable-cmath],[Include complex math functions]),
|
||||
[need_math=$enableval])
|
||||
if test "$need_math" = "yes"; then
|
||||
AC_MSG_NOTICE([Including complex math functions in libgfor]);
|
||||
extra_math_obj='$(gfor_cmath_obj)'
|
||||
fi
|
||||
|
||||
AC_SUBST([MATH_OBJ],["$extra_math_obj"])
|
||||
|
||||
# The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check
|
||||
# for struct timezone, as you might think. We also need to check how
|
||||
# to call gettimeofday if we have it.
|
||||
LIBGFOR_GETTIMEOFDAY
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
if test ${multilib} = yes; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
# Write our Makefile.
|
||||
AC_CONFIG_FILES(Makefile)
|
||||
AC_OUTPUT
|
@ -1,88 +0,0 @@
|
||||
dnl configure.in for libgfor
|
||||
dnl Copyright Free Software Foundation
|
||||
dnl Released under the LGPL
|
||||
|
||||
dnl The rest of gcc uses autoconf 2.13, but we really need more, hence:
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
AC_INIT([GNU Fortran Runtime Library], 0.2,,[libgfortran])
|
||||
AM_INIT_AUTOMAKE()
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_SUBST(enable_shared)
|
||||
AC_SUBST(enable_static)
|
||||
|
||||
# check for compiler
|
||||
AC_PROG_CC
|
||||
dnl Add -Wall if using gcc
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
||||
# We need gfortran to compile parts of the library
|
||||
# We can't use AC_PROG_F77 because it expects a fully working gfortran.
|
||||
#AC_PROG_F77(gfortran)
|
||||
F77="$GFORTRAN"
|
||||
AC_PROG_F77(gfortran)
|
||||
FFLAGS="$FFLAGS -Wall -fno-repack-arrays -fno-underscoring"
|
||||
|
||||
AC_FUNC_MMAP
|
||||
AC_TYPE_OFF_T
|
||||
|
||||
# Check for install
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# check header files
|
||||
AC_STDC_HEADERS
|
||||
AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h)
|
||||
AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h)
|
||||
AC_CHECK_HEADER([complex.h],[AC_DEFINE([HAVE_COMPLEX_H], [1], [complex.h exists])])
|
||||
# Check for complex math functions
|
||||
AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])
|
||||
|
||||
# Check for complex math functions in -lmx also
|
||||
AC_CHECK_LIB([mx],[csin],[need_math="no"],[need_math="yes"])
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(getrusage times)
|
||||
|
||||
# Let the user override this
|
||||
AC_ARG_ENABLE(cmath,
|
||||
AC_HELP_STRING([--enable-cmath],[Include complex math functions]),
|
||||
[need_math=$enableval])
|
||||
if test "$need_math" = "yes"; then
|
||||
AC_MSG_NOTICE([Including complex math functions in libgfor]);
|
||||
extra_math_obj='$(gfor_cmath_obj)'
|
||||
fi
|
||||
|
||||
AC_SUBST([MATH_OBJ],["$extra_math_obj"])
|
||||
|
||||
dnl The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check
|
||||
dnl for struct timezone, as you might think. We also need to check how
|
||||
dnl to call gettimeofday if we have it.
|
||||
LIBGFOR_GETTIMEOFDAY
|
||||
|
||||
dnl These should be inherited in the recursive make, but ensure they are
|
||||
dnl defined:
|
||||
test "$AR" || AR=ar
|
||||
AC_SUBST(AR)
|
||||
if test "$RANLIB"; then :
|
||||
AC_SUBST(RANLIB)
|
||||
else
|
||||
AC_PROG_RANLIB
|
||||
fi
|
||||
|
||||
dnl Don't pull is system libtool.m4, it conflicts with the gcc version.
|
||||
dnl if test "$LIBTOOL"; then :
|
||||
dnl AC_SUBST(LIBTOOL)
|
||||
dnl else
|
||||
dnl AC_PROG_LIBTOOL
|
||||
dnl fi
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
Loading…
Reference in New Issue
Block a user