pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add override for uncommon "config.rpath" GNU config...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eec98379c682
branches: trunk
changeset: 487414:eec98379c682
user: tv <tv%pkgsrc.org@localhost>
date: Fri Jan 14 00:10:01 2005 +0000
description:
Add override for uncommon "config.rpath" GNU config snippet. Use platform
file to indicate that override logic should be turned on. (AFAICT, only
Interix is afflicted at the moment.)
diffstat:
mk/bsd.pkg.mk | 31 +-
mk/gnu-config/config.rpath | 520 +++++++++++++++++++++++++++++++++++++++++++++
mk/platform/Interix.mk | 3 +-
3 files changed, 543 insertions(+), 11 deletions(-)
diffs (truncated from 610 to 300 lines):
diff -r fb8c706f2b72 -r eec98379c682 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Fri Jan 14 00:08:46 2005 +0000
+++ b/mk/bsd.pkg.mk Fri Jan 14 00:10:01 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1558 2005/01/13 20:19:57 tv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1559 2005/01/14 00:10:01 tv Exp $
#
# This file is in the public domain.
#
@@ -1115,6 +1115,7 @@
config.guess */config.guess */*/config.guess
CONFIG_SUB_OVERRIDE?= \
config.sub */config.sub */*/config.sub
+CONFIG_RPATH_OVERRIDE?= # set by platform file as needed
#
# By default, override config.status for GNU configure packages. We
# never want it to execute after the configure phase has ended as it
@@ -2265,12 +2266,11 @@
. endfor
.endif
-.if defined(CONFIG_GUESS_OVERRIDE) || defined(CONFIG_SUB_OVERRIDE)
_CONFIGURE_PREREQ+= do-config-star-override
.PHONY: do-config-star-override
do-config-star-override:
-. if defined(CONFIG_GUESS_OVERRIDE) && !empty(CONFIG_GUESS_OVERRIDE)
-. for _pattern_ in ${CONFIG_GUESS_OVERRIDE}
+.if !empty(CONFIG_GUESS_OVERRIDE)
+. for _pattern_ in ${CONFIG_GUESS_OVERRIDE}
${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
for file in ${_pattern_}; do \
if [ -f "$$file" ]; then \
@@ -2279,10 +2279,10 @@
$$file; \
fi; \
done
-. endfor
-. endif
-. if defined(CONFIG_SUB_OVERRIDE) && !empty(CONFIG_SUB_OVERRIDE)
-. for _pattern_ in ${CONFIG_SUB_OVERRIDE}
+. endfor
+.endif
+.if !empty(CONFIG_SUB_OVERRIDE)
+. for _pattern_ in ${CONFIG_SUB_OVERRIDE}
${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
for file in ${_pattern_}; do \
if [ -f "$$file" ]; then \
@@ -2291,8 +2291,19 @@
$$file; \
fi; \
done
-. endfor
-. endif
+. endfor
+.endif
+.if !empty(CONFIG_RPATH_OVERRIDE)
+. for _pattern_ in ${CONFIG_RPATH_OVERRIDE}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
+ for file in ${_pattern_}; do \
+ if [ -f "$$file" ]; then \
+ ${RM} -f $$file; \
+ ${LN} -s ${PKGSRCDIR}/mk/gnu-config/config.rpath \
+ $$file; \
+ fi; \
+ done
+. endfor
.endif
PKGCONFIG_OVERRIDE_SED= \
diff -r fb8c706f2b72 -r eec98379c682 mk/gnu-config/config.rpath
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/gnu-config/config.rpath Fri Jan 14 00:10:01 2005 +0000
@@ -0,0 +1,520 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2002 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord%gnu.ai.mit.edu@localhost>, 1996
+#
+# 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 of the License, 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shlibext=
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ wl='-Wl,'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6*)
+ wl='-Wl,'
+ ;;
+ linux*)
+ echo '__INTEL_COMPILER' > conftest.$ac_ext
+ if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
+ then
+ :
+ else
+ # Intel icc
+ wl='-Qoption,ld,'
+ fi
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ if test "x$host_vendor" = xsni; then
+ wl='-LD'
+ else
+ wl='-Wl,'
+ fi
+ ;;
+ esac
+fi
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX, the GNU linker is very broken
+ ld_shlibs=no
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja%dolphin.openprojects.net@localhost> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
Home |
Main Index |
Thread Index |
Old Index