Skip to content

Commit

Permalink
* configure.in: Use AC_CHECK_TOOL for CC, AR, RANLIB. Accept args
Browse files Browse the repository at this point in the history
 	--enable-shared, --enable-profile, --enable-omitfp; pass settings
 	through to config.make.
	* config.make.in (build-shared, build-profile, build-omitfp): New
 	config vars.
  • Loading branch information
Roland McGrath committed Mar 10, 1995
1 parent d8cc5f0 commit ff3d7ed
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Thu Mar 9 22:29:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>

* configure.in: Use AC_CHECK_TOOL for CC, AR, RANLIB. Accept args
--enable-shared, --enable-profile, --enable-omitfp; pass settings
through to config.make.
* config.make.in (build-shared, build-profile, build-omitfp): New
config vars.

* elf/elf.h (STN_UNDEF): Renamed to SHN_UNDEF (typo).
(DT_NUM): New macro.

Expand Down
12 changes: 10 additions & 2 deletions config.make.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@
# From $Id$.
# Don't edit this file. Put configuration parameters in configparms instead.

# Installation prefixes.
prefix = @prefix@
exec_prefix = @exec_prefix@

# System configuration.
config-machine = @host_cpu@
config-vendor = @host_vendor@
config-os = @host_os@
config-sysdirs = @sysnames@

prefix = @prefix@
exec_prefix = @exec_prefix@
config-defines = @DEFS@

# Configureation options.
gnu-as = @gnu_as@
gnu-ld = @gnu_ld@
elf = @elf@
weak-symbols = @weak@
build-shared = @shared@
build-profile = @profile@
build-omitfp = @omitfp@

CC = @CC@
AR = @AR@
Expand Down
32 changes: 27 additions & 5 deletions configure.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION([$Id$])
AC_PREREQ(2.1)dnl dnl Minimum Autoconf version required.
AC_REVISION([$CVSid$])
AC_PREREQ(2.2)dnl dnl Minimum Autoconf version required.
AC_INIT(features.h)
AC_CONFIG_HEADER(config.h)

Expand All @@ -19,6 +19,7 @@ gmp-srcdir = $withval" ;;
esac
])

dnl Arguments to specify presence of other packages/features.
AC_ARG_WITH(gnu-binutils, dnl
--with-gnu-binutils if using GNU binutils (as and ld),
gnu_binutils=yes, gnu_binutils=no)
Expand All @@ -36,6 +37,18 @@ AC_ARG_WITH(weak-symbols, dnl
--with-weak-symbols if weak symbols are available in as and ld,
weak=yes, weak=no)

dnl Arguments to enable or disable building the shared, profiled, and
dnl -fomit-frame-pointer libraries.
AC_ARG_ENABLE(shared, dnl
[ --enable-shared build shared library [default=yes if GNU ld & ELF]],
shared=yes, shared=no, shared=default)
AC_ARG_ENABLE(profile, dnl
[ --enable-profile build profiled library [default=yes]],
profile=yes, profile=no, profile=yes)
AC_ARG_ENABLE(omitfp, dnl
[ --enable-omitfp build undebuggable optimized library [default=no]],
omitfp=yes, omitfp=no, omitfp=no)

AC_CANONICAL_HOST
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
Expand Down Expand Up @@ -243,10 +256,10 @@ if test "$INSTALL" = "${srcdir}/install-sh"; then
INSTALL='$(..)./install-sh'
fi

AC_PROG_CC
AC_CHECK_TOOL(CC, gcc)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_PROG_CPP
AC_CHECK_PROG(AR, ar, ar, ar)
AC_PROG_RANLIB

AC_MSG_CHECKING(signed size_t type)
AC_CACHE_VAL(libc_cv_signed_size_t, [dnl
Expand Down Expand Up @@ -402,6 +415,15 @@ if test $weak = yes; then
AC_DEFINE(HAVE_WEAK_SYMBOLS)
fi

AC_SUBST(shared)
if test $shared = default; then
if test $gnu_ld = yes; then
shared=$elf
fi
fi
AC_SUBST(profile)
AC_SUBST(omitfp)


if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
Expand Down

0 comments on commit ff3d7ed

Please sign in to comment.