re PR libobjc/4039 (installation location of libobjc is wrong)
2002-02-11 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> PR libobjc/4039 * aclocal.m4: Replace with version copied from libstdc++-v3. * configure.in: Update for changes to aclocal and Makefile. * configure: Regenerate. * Makefile.in: Correct install of multilibs and shared libs, use INSTALL_DATA for include files. From-SVN: r49680
This commit is contained in:
parent
515342a8f0
commit
b150efee39
5 changed files with 1254 additions and 652 deletions
|
@ -1,3 +1,12 @@
|
|||
2002-02-11 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
|
||||
|
||||
PR libobjc/4039
|
||||
* aclocal.m4: Replace with version copied from libstdc++-v3.
|
||||
* configure.in: Update for changes to aclocal and Makefile.
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Correct install of multilibs and shared libs, use
|
||||
INSTALL_DATA for include files.
|
||||
|
||||
Mon Dec 17 17:02:12 2001 Nicola Pero <nicola@brainstorm.co.uk>
|
||||
|
||||
* init.c (__objc_exec_class): Fixed bug in the loop on unclaimed
|
||||
|
|
|
@ -23,20 +23,27 @@
|
|||
#worthless.
|
||||
|
||||
SHELL = /bin/sh
|
||||
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 = .
|
||||
|
||||
libdir = $(exec_prefix)/lib
|
||||
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
|
||||
incinstalldir = $(libsubdir)/include
|
||||
|
||||
# Multilib support variables.
|
||||
MULTISRCTOP =
|
||||
|
@ -253,11 +260,13 @@ $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c
|
|||
doc: info dvi html
|
||||
|
||||
libobjc.la: $(OBJS)
|
||||
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) -rpath $(libsubdir) \
|
||||
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
|
||||
-rpath $(glibcpp_toolexeclibdir) \
|
||||
-version-info $(LIBOBJC_VERSION)
|
||||
|
||||
libobjc_gc.la: $(OBJS_GC)
|
||||
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) -rpath $(libsubdir) \
|
||||
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
|
||||
-rpath $(glibcpp_toolexeclibdir) \
|
||||
-version-info $(LIBOBJC_GC_VERSION)
|
||||
|
||||
#
|
||||
|
@ -305,24 +314,24 @@ ${srcdir}/configure: configure.in
|
|||
rm -f config.cache
|
||||
cd ${srcdir} && autoconf
|
||||
|
||||
install: install-libs copy-headers
|
||||
install: install-libs install-headers
|
||||
|
||||
install-libs: installdirs
|
||||
$(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc.la $(libsubdir)/libobjc.la;
|
||||
$(SHELL) $(toplevel_srcdir)/mkinstalldirs $(glibcpp_toolexeclibdir)
|
||||
$(LIBTOOL_INSTALL) $(INSTALL) libobjc.la $(glibcpp_toolexeclibdir);
|
||||
if [ "$(OBJC_BOEHM_GC)" ]; then \
|
||||
$(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc_gc.la \
|
||||
$(libsubdir)/libobjc_gc.la;\
|
||||
$(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc.la \
|
||||
$(glibcpp_toolexeclibdir);\
|
||||
fi
|
||||
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
|
||||
@-$(LIBTOOL) --mode=finish $(glibcpp_toolexeclibdir)
|
||||
|
||||
# Copy Objective C headers to installation include directory.
|
||||
copy-headers:
|
||||
-rm -rf $(incinstalldir)/objc
|
||||
-mkdir $(incinstalldir)/objc
|
||||
-chmod a+rx $(incinstalldir)/objc
|
||||
install-headers:
|
||||
$(SHELL) $(toplevel_srcdir)/mkinstalldirs $(libsubdir)/include/objc
|
||||
for file in $(OBJC_H); do \
|
||||
realfile=$(srcdir)/objc/$${file}; \
|
||||
cp $${realfile} $(incinstalldir)/objc; \
|
||||
chmod a+r $(incinstalldir)/objc/$${file}; \
|
||||
$(INSTALL_DATA) $${realfile} $(libsubdir)/include/objc; \
|
||||
done
|
||||
|
||||
check uninstall install-strip dist installcheck installdirs:
|
||||
|
|
224
libobjc/aclocal.m4
vendored
224
libobjc/aclocal.m4
vendored
|
@ -1,2 +1,224 @@
|
|||
# Just a clone of ../libtool.m4.
|
||||
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])
|
||||
])
|
||||
|
|
1571
libobjc/configure
vendored
1571
libobjc/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -23,18 +23,12 @@ AC_PREREQ(2.13)
|
|||
AC_INIT(objc/objc.h)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
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.
|
||||
|
@ -66,14 +60,15 @@ 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],[])
|
||||
# Disable shared libs by default
|
||||
AC_DISABLE_SHARED
|
||||
# Enable Win32 DLL on MS Windows - FIXME
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
# For ObjC we'll set CC to point at the built gcc, but this will get it into
|
||||
# the makefiles
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
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 :
|
||||
|
@ -82,23 +77,7 @@ else
|
|||
AC_PROG_RANLIB
|
||||
fi
|
||||
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 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
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl Checks for header files.
|
||||
# Sanity check for the cross-compilation case:
|
||||
|
@ -125,13 +104,6 @@ fi])
|
|||
GTHREAD_FLAGS=$objc_cv_gthread_flags
|
||||
AC_SUBST(GTHREAD_FLAGS)
|
||||
|
||||
# Disable shared libs by default
|
||||
AC_DISABLE_SHARED
|
||||
# Enable Win32 DLL on MS Windows - FIXME
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
# Use libtool
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_ARG_ENABLE(objc-gc,
|
||||
[ --enable-objc-gc enable the use of Boehm's garbage collector with
|
||||
the GNU Objective-C runtime.],
|
||||
|
@ -146,12 +118,12 @@ AC_SUBST(OBJC_BOEHM_GC)
|
|||
|
||||
# We need multilib support, but only if configuring for the target.
|
||||
AC_OUTPUT(Makefile,
|
||||
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
|
||||
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
|
||||
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
|
||||
fi
|
||||
fi],
|
||||
srcdir=${srcdir}
|
||||
|
@ -160,10 +132,11 @@ 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}
|
||||
)
|
||||
|
||||
|
||||
dnl Local Variables:
|
||||
dnl comment-start: "dnl "
|
||||
dnl comment-end: ""
|
||||
|
|
Loading…
Add table
Reference in a new issue