Received: with ECARTIS (v1.0.0; list linux-xfs); Fri, 31 Mar 2006 22:06:12 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id k31660gC024270 for ; Fri, 31 Mar 2006 22:06:01 -0800 Received: from [134.14.54.149] (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA18331 for ; Sun, 2 Apr 2006 16:01:14 +1000 Message-ID: <442F68BC.3010706@sgi.com> Date: Sun, 02 Apr 2006 16:01:32 +1000 From: Timothy Shimmin User-Agent: Mozilla Thunderbird 0.7+ (X11/20040505) X-Accept-Language: en-us, en MIME-Version: 1.0 To: linux-xfs@oss.sgi.com Subject: Re: patch for building/installing xfs-cmds on 64 bit platforms References: <442B8E5C.1020306@sgi.com> In-Reply-To: <442B8E5C.1020306@sgi.com> Content-Type: multipart/mixed; boundary="------------050703010908000504020408" X-archive-position: 7572 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: linux-xfs Content-Length: 109862 Lines: 3126 This is a multi-part message in MIME format. --------------050703010908000504020408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Timothy Shimmin wrote: > Hi there, > > In November last year, Jan Derfinak, supplied a patch for > building/installing xfs-cmds on amd64 > but Christoph H. had problems with "uname --hardware -platform" on > some 64 bit machines. > (http://oss.sgi.com/archives/linux-xfs/2004-11/msg00115.html) > > Looking around I decided to adopt a solution from gettext which has a > config macro which > looks at $CC -print-search-dirs for lib64 to make the decision. > I've attached a patch just for xfs-cmds/attr to this email. > If this works for people on various 64 bit platforms, > then I'll do likewise for the other xfs related userspace libraries. > > Thanks muchly, > Tim. This is an update for my earlier patch for all the packages: acl, attr, dmapi, xfsprogs, xfsdump, xfstests If no comments/problems, then I'll probably check this in shortly. > diffstat multilib.patch acl/Makefile | 5 acl/aclocal.m4 | 250 +++++++++++++--------- acl/configure.in | 6 acl/include/builddefs.in | 11 - acl/m4/Makefile | 5 acl/m4/multilib.m4 | 43 +++ acl/m4/package_attrdev.m4 | 6 attr/Makefile | 5 attr/aclocal.m4 | 94 ++++++-- attr/configure.in | 6 attr/include/builddefs.in | 11 - attr/m4/Makefile | 5 attr/m4/multilib.m4 | 43 +++ dmapi/Makefile | 5 dmapi/aclocal.m4 | 109 +++++++--- dmapi/configure.in | 6 dmapi/include/builddefs.in | 6 dmapi/m4/Makefile | 5 dmapi/m4/multilib.m4 | 43 +++ dmapi/m4/package_xfslibs.m4 | 9 xfsdump/Makefile | 5 xfsdump/aclocal.m4 | 389 ++++++++++++++++++++--------------- xfsdump/configure.in | 6 xfsdump/include/builddefs.in | 13 - xfsdump/m4/Makefile | 5 xfsdump/m4/multilib.m4 | 43 +++ xfsdump/m4/package_attrdev.m4 | 6 xfsdump/m4/package_dmapidev.m4 | 3 xfsdump/m4/package_xfslibs.m4 | 9 xfsprogs/Makefile | 5 xfsprogs/aclocal.m4 | 435 ++++++++++++++++++++++------------------ xfsprogs/configure.in | 6 xfsprogs/include/builddefs.in | 15 - xfsprogs/m4/Makefile | 5 xfsprogs/m4/multilib.m4 | 43 +++ xfstests/Makefile | 4 xfstests/aclocal.m4 | 298 +++++++++++++-------------- xfstests/m4/Makefile | 5 xfstests/m4/multilib.m4 | 43 +++ xfstests/m4/package_acldev.m4 | 3 xfstests/m4/package_attrdev.m4 | 11 - xfstests/m4/package_dmapidev.m4 | 3 xfstests/m4/package_gdbmdev.m4 | 4 xfstests/m4/package_xfslibs.m4 | 9 44 files changed, 1306 insertions(+), 735 deletions(-) --Tim --------------050703010908000504020408 Content-Type: text/plain; name="multilib.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="multilib.patch" =========================================================================== Index: acl/Makefile =========================================================================== --- a/acl/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/Makefile 2006-03-31 10:29:54.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -41,6 +41,7 @@ $(CONFIGURE): --bindir=/usr/bin \ --libdir=/lib \ --libexecdir=/usr/lib \ + --enable-lib64=yes \ --includedir=/usr/include \ --mandir=/usr/share/man \ --datadir=/usr/share \ @@ -48,7 +49,7 @@ $(CONFIGURE): touch .census aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install: default $(SUBDIRS_MAKERULE) =========================================================================== Index: acl/aclocal.m4 =========================================================================== --- a/acl/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/aclocal.m4 2006-03-31 15:55:51.000000000 +1000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,6 +12,147 @@ # PARTICULAR PURPOSE. # +# Find format of installed man pages. +# Always gzipped on Debian, but not Redhat pre-7.0. +# We don't deal with bzip2'd man pages, which Mandrake uses, +# someone will send us a patch sometime hopefully. :-) +# +AC_DEFUN([AC_MANUAL_FORMAT], + [ have_zipped_manpages=false + for d in ${prefix}/share/man ${prefix}/man ; do + if test -f $d/man1/man.1.gz + then + have_zipped_manpages=true + break + fi + done + AC_SUBST(have_zipped_manpages) + ]) + +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], + [ AC_CHECK_HEADERS([attr/xattr.h]) + if test "$ac_cv_header_attr_xattr_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/xattr.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], + [ AC_CHECK_HEADERS([attr/error_context.h]) + if test "$ac_cv_header_attr_error_context_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/error_context.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], + [ have_attributes_h=false + AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) + if test "$have_attributes_h" = "false"; then + echo + echo 'FATAL ERROR: attributes.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], + [ AC_CHECK_LIB(attr, getxattr,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], + [ AC_CHECK_LIB(attr, attr_get,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f $(libexecdir)$(libdirsuffix)/libattr.la && \ + libattr="$(libexecdir)$(libdirsuffix)/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], + [ AC_MSG_CHECKING([macros in attr/attributes.h]) + AC_TRY_LINK([ +#include +#include ], + [ int x = ATTR_SECURE; ], [ echo ok ], [ + echo + echo 'FATAL ERROR: could not find a current attributes header.' + echo 'Upgrade the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 ]) + ]) + +# # Generic macro, sets up all of the global packaging variables. # The following environment variables may be set to override defaults: # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP @@ -40,12 +181,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` @@ -185,101 +326,6 @@ AC_DEFUN([AC_PACKAGE_UTILITIES], AC_SUBST(rpmbuild) ]) -AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], - [ AC_CHECK_HEADERS([attr/xattr.h]) - if test "$ac_cv_header_attr_xattr_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/xattr.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], - [ AC_CHECK_HEADERS([attr/error_context.h]) - if test "$ac_cv_header_attr_error_context_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/error_context.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], - [ have_attributes_h=false - AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) - if test "$have_attributes_h" = "false"; then - echo - echo 'FATAL ERROR: attributes.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], - [ AC_CHECK_LIB(attr, getxattr,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], - [ AC_CHECK_LIB(attr, attr_get,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], - [ AC_MSG_CHECKING([macros in attr/attributes.h]) - AC_TRY_LINK([ -#include -#include ], - [ int x = ATTR_SECURE; ], [ echo ok ], [ - echo - echo 'FATAL ERROR: could not find a current attributes header.' - echo 'Upgrade the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 ]) - ]) - -# -# Find format of installed man pages. -# Always gzipped on Debian, but not Redhat pre-7.0. -# We don't deal with bzip2'd man pages, which Mandrake uses, -# someone will send us a patch sometime hopefully. :-) -# -AC_DEFUN([AC_MANUAL_FORMAT], - [ have_zipped_manpages=false - for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then - have_zipped_manpages=true - break - fi - done - AC_SUBST(have_zipped_manpages) - ]) - AC_DEFUN([AC_FUNC_GCC_VISIBILITY], [AC_CACHE_CHECK(whether __attribute__((visibility())) is supported, libc_cv_visibility_attribute, =========================================================================== Index: acl/configure.in =========================================================================== --- a/acl/configure.in 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/configure.in 2006-03-31 15:44:59.000000000 +1000 @@ -12,10 +12,16 @@ AC_ARG_ENABLE(gettext, enable_gettext=yes) AC_SUBST(enable_gettext) +AC_ARG_ENABLE(lib64, +[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, + enable_lib64=no) +AC_SUBST(enable_lib64) + AC_PACKAGE_GLOBALS(acl) AC_PACKAGE_UTILITIES(acl) AC_PACKAGE_NEED_ATTR_XATTR_H AC_PACKAGE_NEED_ATTR_ERROR_H +AC_MULTILIB($enable_lib64) AC_PACKAGE_NEED_GETXATTR_LIBATTR AC_MANUAL_FORMAT =========================================================================== Index: acl/include/builddefs.in =========================================================================== --- a/acl/include/builddefs.in 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/include/builddefs.in 2006-03-31 10:34:25.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. # # @configure_input@ # @@ -27,8 +27,8 @@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ PKG_BIN_DIR = @bindir@ PKG_SBIN_DIR = @sbindir@ -PKG_LIB_DIR = @libdir@ -PKG_DEVLIB_DIR = @libexecdir@ +PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ PKG_INC_DIR = @includedir@ PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ @@ -53,8 +53,9 @@ RPM = @rpm@ RPMBUILD = @rpmbuild@ RPM_VERSION = @rpm_version@ -ENABLE_SHARED = @enable_shared@ -ENABLE_GETTEXT = @enable_gettext@ +ENABLE_SHARED = @enable_shared@ +ENABLE_GETTEXT = @enable_gettext@ + HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" "" =========================================================================== Index: acl/m4/Makefile =========================================================================== --- a/acl/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/m4/Makefile 2006-03-31 10:35:24.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -10,7 +10,8 @@ LSRCFILES = \ package_attrdev.m4 \ package_globals.m4 \ package_utilies.m4 \ - visibility_hidden.m4 + visibility_hidden.m4 \ + multilib.m4 default: =========================================================================== Index: acl/m4/multilib.m4 =========================================================================== --- a/acl/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/acl/m4/multilib.m4 2006-03-31 15:55:10.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: acl/m4/package_attrdev.m4 =========================================================================== --- a/acl/m4/package_attrdev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/acl/m4/package_attrdev.m4 2006-03-31 15:58:52.000000000 +1000 @@ -43,7 +43,8 @@ AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBAT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) @@ -58,7 +59,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) =========================================================================== Index: attr/Makefile =========================================================================== --- a/attr/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/attr/Makefile 2006-03-29 17:11:40.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -41,6 +41,7 @@ $(CONFIGURE): --bindir=/usr/bin \ --libdir=/lib \ --libexecdir=/usr/lib \ + --enable-lib64=yes \ --includedir=/usr/include \ --mandir=/usr/share/man \ --datadir=/usr/share \ @@ -48,7 +49,7 @@ $(CONFIGURE): touch .census aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install: default $(SUBDIRS_MAKERULE) =========================================================================== Index: attr/aclocal.m4 =========================================================================== --- a/attr/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/attr/aclocal.m4 2006-03-29 17:07:17.000000000 +1000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,6 +12,68 @@ # PARTICULAR PURPOSE. # +# Find format of installed man pages. +# Always gzipped on Debian, but not Redhat pre-7.0. +# We don't deal with bzip2'd man pages, which Mandrake uses, +# someone will send us a patch sometime hopefully. :-) +# +AC_DEFUN([AC_MANUAL_FORMAT], + [ have_zipped_manpages=false + for d in ${prefix}/share/man ${prefix}/man ; do + if test -f $d/man1/man.1.gz + then + have_zipped_manpages=true + break + fi + done + AC_SUBST(have_zipped_manpages) + ]) + +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if enable param is yes. +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) + +# # Generic macro, sets up all of the global packaging variables. # The following environment variables may be set to override defaults: # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP @@ -40,12 +102,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` @@ -185,21 +247,3 @@ AC_DEFUN([AC_PACKAGE_UTILITIES], AC_SUBST(rpmbuild) ]) -# -# Find format of installed man pages. -# Always gzipped on Debian, but not Redhat pre-7.0. -# We don't deal with bzip2'd man pages, which Mandrake uses, -# someone will send us a patch sometime hopefully. :-) -# -AC_DEFUN([AC_MANUAL_FORMAT], - [ have_zipped_manpages=false - for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then - have_zipped_manpages=true - break - fi - done - AC_SUBST(have_zipped_manpages) - ]) - =========================================================================== Index: attr/configure.in =========================================================================== --- a/attr/configure.in 2006-03-31 16:57:32.000000000 +1000 +++ b/attr/configure.in 2006-03-29 17:10:41.000000000 +1000 @@ -12,9 +12,15 @@ AC_ARG_ENABLE(gettext, enable_gettext=yes) AC_SUBST(enable_gettext) +AC_ARG_ENABLE(lib64, +[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, + enable_lib64=no) +AC_SUBST(enable_lib64) + AC_PACKAGE_GLOBALS(attr) AC_PACKAGE_UTILITIES(attr) AC_MANUAL_FORMAT +AC_MULTILIB($enable_lib64) AC_C_CONST AC_TYPE_MODE_T =========================================================================== Index: attr/include/builddefs.in =========================================================================== --- a/attr/include/builddefs.in 2006-03-31 16:57:32.000000000 +1000 +++ b/attr/include/builddefs.in 2006-03-29 13:51:34.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. # # @configure_input@ # @@ -26,8 +26,8 @@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ PKG_BIN_DIR = @bindir@ PKG_SBIN_DIR = @sbindir@ -PKG_LIB_DIR = @libdir@ -PKG_DEVLIB_DIR = @libexecdir@ +PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ PKG_INC_DIR = @includedir@/attr PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ @@ -52,8 +52,9 @@ RPM = @rpm@ RPMBUILD = @rpmbuild@ RPM_VERSION = @rpm_version@ -ENABLE_SHARED = @enable_shared@ -ENABLE_GETTEXT = @enable_gettext@ +ENABLE_SHARED = @enable_shared@ +ENABLE_GETTEXT = @enable_gettext@ + HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" "" =========================================================================== Index: attr/m4/Makefile =========================================================================== --- a/attr/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/attr/m4/Makefile 2006-03-29 13:52:20.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -8,7 +8,8 @@ include $(TOPDIR)/include/builddefs LSRCFILES = \ manual_format.m4 \ package_globals.m4 \ - package_utilies.m4 + package_utilies.m4 \ + multilib.m4 default: =========================================================================== Index: attr/m4/multilib.m4 =========================================================================== --- a/attr/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/attr/m4/multilib.m4 2006-03-29 17:14:23.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: dmapi/Makefile =========================================================================== --- a/dmapi/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/Makefile 2006-03-31 10:45:28.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -39,6 +39,7 @@ $(CONFIGURE): --bindir=/usr/bin \ --libdir=/lib \ --libexecdir=/usr/lib \ + --enable-lib64=yes \ --includedir=/usr/include \ --mandir=/usr/share/man \ --datadir=/usr/share \ @@ -46,7 +47,7 @@ $(CONFIGURE): touch .census aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install: default $(SUBDIRS_MAKERULE) =========================================================================== Index: dmapi/aclocal.m4 =========================================================================== --- a/dmapi/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/aclocal.m4 2006-03-31 10:49:07.000000000 +1000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,6 +12,68 @@ # PARTICULAR PURPOSE. # +# Find format of installed man pages. +# Always gzipped on Debian, but not Redhat pre-7.0. +# We don't deal with bzip2'd man pages, which Mandrake uses, +# someone will send us a patch sometime hopefully. :-) +# +AC_DEFUN([AC_MANUAL_FORMAT], + [ have_zipped_manpages=false + for d in ${prefix}/share/man ${prefix}/man ; do + if test -f $d/man1/man.1.gz + then + have_zipped_manpages=true + break + fi + done + AC_SUBST(have_zipped_manpages) + ]) + +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) + +# # Generic macro, sets up all of the global packaging variables. # The following environment variables may be set to override defaults: # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP @@ -32,7 +94,7 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], debug_build="$DEBUG" AC_SUBST(debug_build) - OPTIMIZER=${OPTIMIZER:-'-g'} dnl -O2 + OPTIMIZER=${OPTIMIZER:-'-g -O2'} opt_build="$OPTIMIZER" AC_SUBST(opt_build) @@ -40,12 +102,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` @@ -263,6 +325,19 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHA AC_SUBST(libhdl) ]) +AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE], + [ + AC_MSG_CHECKING([libhandle.a for IRIX]) + libhdl="`pwd`/../irix/libhandle/libhandle.a" + if ! test -f $libhdl; then + echo 'no' + echo 'FATAL ERROR: could not find IRIX XFS handle library.' + exit 1 + fi + echo 'yes' + AC_SUBST(libhdl) + ]) + AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h]) AC_TRY_LINK([#include ], [ int x = xfsctl(0, 0, 0, 0); ], @@ -275,21 +350,3 @@ AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], ]) ]) -# -# Find format of installed man pages. -# Always gzipped on Debian, but not Redhat pre-7.0. -# We don't deal with bzip2'd man pages, which Mandrake uses, -# someone will send us a patch sometime hopefully. :-) -# -AC_DEFUN([AC_MANUAL_FORMAT], - [ have_zipped_manpages=false - for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then - have_zipped_manpages=true - break - fi - done - AC_SUBST(have_zipped_manpages) - ]) - =========================================================================== Index: dmapi/configure.in =========================================================================== --- a/dmapi/configure.in 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/configure.in 2006-03-31 10:46:07.000000000 +1000 @@ -6,9 +6,15 @@ AC_ARG_ENABLE(shared, enable_shared=yes) AC_SUBST(enable_shared) +AC_ARG_ENABLE(lib64, +[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, + enable_lib64=no) +AC_SUBST(enable_lib64) + AC_PACKAGE_GLOBALS(dmapi) AC_PACKAGE_UTILITIES(dmapi) AC_PACKAGE_NEED_XFS_HANDLE_H AC_MANUAL_FORMAT +AC_MULTILIB($enable_lib64) AC_OUTPUT(include/builddefs) =========================================================================== Index: dmapi/include/builddefs.in =========================================================================== --- a/dmapi/include/builddefs.in 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/include/builddefs.in 2006-03-31 10:47:39.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. # # @configure_input@ # @@ -23,8 +23,8 @@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ PKG_BIN_DIR = @bindir@ PKG_SBIN_DIR = @sbindir@ -PKG_LIB_DIR = @libdir@ -PKG_DEVLIB_DIR = @libexecdir@ +PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ PKG_INC_DIR = @includedir@/xfs PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ =========================================================================== Index: dmapi/m4/Makefile =========================================================================== --- a/dmapi/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/m4/Makefile 2006-03-31 10:48:40.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -9,7 +9,8 @@ LSRCFILES = \ manual_format.m4 \ package_globals.m4 \ package_utilies.m4 \ - package_xfslibs.m4 + package_xfslibs.m4 \ + multilib.m4 default: =========================================================================== Index: dmapi/m4/multilib.m4 =========================================================================== --- a/dmapi/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/dmapi/m4/multilib.m4 2006-03-31 10:42:59.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: dmapi/m4/package_xfslibs.m4 =========================================================================== --- a/dmapi/m4/package_xfslibs.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/dmapi/m4/package_xfslibs.m4 2006-03-31 16:38:55.000000000 +1000 @@ -42,7 +42,8 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIB libxfs="-lxfs" test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \ libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la" - test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la" + test -f ${libexecdir}${libdirsuffix}/libxfs.la && \ + libxfs="${libexecdir}${libdirsuffix}/libxfs.la" AC_SUBST(libxfs) ]) @@ -57,7 +58,8 @@ AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHAND libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) @@ -72,7 +74,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHA libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) =========================================================================== Index: xfsdump/Makefile =========================================================================== --- a/xfsdump/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/Makefile 2006-03-31 12:33:34.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -41,6 +41,7 @@ $(CONFIGURE): --bindir=/usr/sbin \ --libdir=/lib \ --libexecdir=/usr/lib \ + --enable-lib64=yes \ --includedir=/usr/include \ --mandir=/usr/share/man \ --datadir=/usr/share \ @@ -48,7 +49,7 @@ $(CONFIGURE): touch .census aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install: default $(SUBDIRS_MAKERULE) =========================================================================== Index: xfsdump/aclocal.m4 =========================================================================== --- a/xfsdump/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/aclocal.m4 2006-03-31 16:40:22.000000000 +1000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,6 +12,174 @@ # PARTICULAR PURPOSE. # +# Find format of installed man pages. +# Always gzipped on Debian, but not Redhat pre-7.0. +# We don't deal with bzip2'd man pages, which Mandrake uses, +# someone will send us a patch sometime hopefully. :-) +# +AC_DEFUN([AC_MANUAL_FORMAT], + [ have_zipped_manpages=false + for d in ${prefix}/share/man ${prefix}/man ; do + if test -f $d/man1/man.1.gz + then + have_zipped_manpages=true + break + fi + done + AC_SUBST(have_zipped_manpages) + ]) + +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], + [ AC_CHECK_HEADERS([attr/xattr.h]) + if test "$ac_cv_header_attr_xattr_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/xattr.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], + [ AC_CHECK_HEADERS([attr/error_context.h]) + if test "$ac_cv_header_attr_error_context_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/error_context.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], + [ have_attributes_h=false + AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) + if test "$have_attributes_h" = "false"; then + echo + echo 'FATAL ERROR: attributes.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], + [ AC_CHECK_LIB(attr, getxattr,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], + [ AC_CHECK_LIB(attr, attr_get,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], + [ AC_MSG_CHECKING([macros in attr/attributes.h]) + AC_TRY_LINK([ +#include +#include ], + [ int x = ATTR_SECURE; ], [ echo ok ], [ + echo + echo 'FATAL ERROR: could not find a current attributes header.' + echo 'Upgrade the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 ]) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_XFS_DMAPI_H], + [ AC_CHECK_HEADERS([xfs/dmapi.h]) + if test "$ac_cv_header_xfs_dmapi_h" != yes; then + echo + echo 'FATAL ERROR: could not find a valid DMAPI library header.' + echo 'Install the data migration API (dmapi) development package.' + echo 'Alternatively, run "make install-dev" from the dmapi source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_MAKEHANDLE_LIBDM], + [ AC_CHECK_LIB(dm, dm_make_handle,, [ + echo + echo 'FATAL ERROR: could not find a valid DMAPI base library.' + echo 'Install the data migration API (dmapi) library package.' + echo 'Alternatively, run "make install" from the dmapi source.' + exit 1 + ]) + libdm="-ldm" + test -f `pwd`/../dmapi/libdm/libdm.la && \ + libdm="`pwd`/../dmapi/libdm/libdm.la" + test -f ${libexecdir}${libdirsuffix}/libdm.la && \ + libdm="${libexecdir}${libdirsuffix}/libdm.la" + AC_SUBST(libdm) + ]) + +# # Generic macro, sets up all of the global packaging variables. # The following environment variables may be set to override defaults: # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP @@ -40,12 +208,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` @@ -57,6 +225,37 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], AC_SUBST(pkg_platform) ]) +AC_DEFUN([AC_PACKAGE_NEED_NCURSES_H], + [ AC_CHECK_HEADERS([ncurses.h]) + if test "$ac_cv_header_ncurses_h" != yes; then + echo + echo 'FATAL ERROR: could not find a valid ncurses header.' + echo 'Install the ncurses development package.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_WANT_WORKING_LIBNCURSES], + [ AC_CHECK_LIB(ncurses, initscr,, [ + echo + echo 'FATAL ERROR: could not find a valid ncurses library.' + echo 'Install the ncurses library package.' + exit 1 + ]) + AC_MSG_CHECKING([for bad glibc/ncurses header interaction]) + libcurses="-lncurses" + LIBS="$LIBS $libcurses" + CFLAGS="$CFLAGS -D_GNU_SOURCE" + AC_TRY_LINK([ +#include +#include ], + [wgetch(stdscr);], + [enable_curses=yes; AC_MSG_RESULT([ok])], + [enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])]) + AC_SUBST(enable_curses) + AC_SUBST(libcurses) + ]) + # # Check for specified utility (env var) - if unset, fail. # @@ -212,37 +411,6 @@ AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE], AC_SUBST(libuuid) ]) -AC_DEFUN([AC_PACKAGE_NEED_NCURSES_H], - [ AC_CHECK_HEADERS([ncurses.h]) - if test "$ac_cv_header_ncurses_h" != yes; then - echo - echo 'FATAL ERROR: could not find a valid ncurses header.' - echo 'Install the ncurses development package.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_WANT_WORKING_LIBNCURSES], - [ AC_CHECK_LIB(ncurses, initscr,, [ - echo - echo 'FATAL ERROR: could not find a valid ncurses library.' - echo 'Install the ncurses library package.' - exit 1 - ]) - AC_MSG_CHECKING([for bad glibc/ncurses header interaction]) - libcurses="-lncurses" - LIBS="$LIBS $libcurses" - CFLAGS="$CFLAGS -D_GNU_SOURCE" - AC_TRY_LINK([ -#include -#include ], - [wgetch(stdscr);], - [enable_curses=yes; AC_MSG_RESULT([ok])], - [enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])]) - AC_SUBST(enable_curses) - AC_SUBST(libcurses) - ]) - AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H], [ AC_CHECK_HEADERS([xfs/libxfs.h]) if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then @@ -287,7 +455,8 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIB libxfs="-lxfs" test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \ libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la" - test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la" + test -f ${libexecdir}${libdirsuffix}/libxfs.la && \ + libxfs="${libexecdir}${libdirsuffix}/libxfs.la" AC_SUBST(libxfs) ]) @@ -302,7 +471,8 @@ AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHAND libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) @@ -311,13 +481,27 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHA echo echo 'FATAL ERROR: could not find a current XFS handle library.' echo 'Install or upgrade the XFS library package.' - echo 'Alternatively, run "make install-dev" from the xfsprogs source.' + echo 'Alternatively, run "make install-lib" from the xfsprogs source.' exit 1 ]) libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" + AC_SUBST(libhdl) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE], + [ + AC_MSG_CHECKING([libhandle.a for IRIX]) + libhdl="`pwd`/../irix/libhandle/libhandle.a" + if ! test -f $libhdl; then + echo 'no' + echo 'FATAL ERROR: could not find IRIX XFS handle library.' + exit 1 + fi + echo 'yes' AC_SUBST(libhdl) ]) @@ -333,124 +517,3 @@ AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], ]) ]) -AC_DEFUN([AC_PACKAGE_NEED_XFS_DMAPI_H], - [ AC_CHECK_HEADERS([xfs/dmapi.h]) - if test "$ac_cv_header_xfs_dmapi_h" != yes; then - echo - echo 'FATAL ERROR: could not find a valid DMAPI library header.' - echo 'Install the data migration API (dmapi) development package.' - echo 'Alternatively, run "make install-dev" from the dmapi source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_MAKEHANDLE_LIBDM], - [ AC_CHECK_LIB(dm, dm_make_handle,, [ - echo - echo 'FATAL ERROR: could not find a valid DMAPI base library.' - echo 'Install the data migration API (dmapi) library package.' - echo 'Alternatively, run "make install" from the dmapi source.' - exit 1 - ]) - libdm="-ldm" - test -f `pwd`/../dmapi/libdm/libdm.la && \ - libdm="`pwd`/../dmapi/libdm/libdm.la" - test -f /usr/lib/libdm.la && libdm="/usr/lib/libdm.la" - AC_SUBST(libdm) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], - [ AC_CHECK_HEADERS([attr/xattr.h]) - if test "$ac_cv_header_attr_xattr_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/xattr.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], - [ AC_CHECK_HEADERS([attr/error_context.h]) - if test "$ac_cv_header_attr_error_context_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/error_context.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], - [ have_attributes_h=false - AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) - if test "$have_attributes_h" = "false"; then - echo - echo 'FATAL ERROR: attributes.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], - [ AC_CHECK_LIB(attr, getxattr,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], - [ AC_CHECK_LIB(attr, attr_get,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], - [ AC_MSG_CHECKING([macros in attr/attributes.h]) - AC_TRY_LINK([ -#include -#include ], - [ int x = ATTR_SECURE; ], [ echo ok ], [ - echo - echo 'FATAL ERROR: could not find a current attributes header.' - echo 'Upgrade the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 ]) - ]) - -# -# Find format of installed man pages. -# Always gzipped on Debian, but not Redhat pre-7.0. -# We don't deal with bzip2'd man pages, which Mandrake uses, -# someone will send us a patch sometime hopefully. :-) -# -AC_DEFUN([AC_MANUAL_FORMAT], - [ have_zipped_manpages=false - for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then - have_zipped_manpages=true - break - fi - done - AC_SUBST(have_zipped_manpages) - ]) - =========================================================================== Index: xfsdump/configure.in =========================================================================== --- a/xfsdump/configure.in 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/configure.in 2006-03-31 16:19:31.000000000 +1000 @@ -12,8 +12,14 @@ AC_ARG_ENABLE(gettext, enable_gettext=yes) AC_SUBST(enable_gettext) +AC_ARG_ENABLE(lib64, +[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, + enable_lib64=no) +AC_SUBST(enable_lib64) + AC_PACKAGE_GLOBALS(xfsdump) AC_PACKAGE_UTILITIES(xfsdump) +AC_MULTILIB($enable_lib64) AC_PACKAGE_NEED_UUID_H AC_PACKAGE_NEED_UUIDCOMPARE =========================================================================== Index: xfsdump/include/builddefs.in =========================================================================== --- a/xfsdump/include/builddefs.in 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/include/builddefs.in 2006-03-31 12:37:07.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. # # @configure_input@ # @@ -31,8 +31,8 @@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ PKG_BIN_DIR = @bindir@ PKG_SBIN_DIR = @sbindir@ -PKG_LIB_DIR = @libdir@ -PKG_DEVLIB_DIR = @libexecdir@ +PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ PKG_INC_DIR = @includedir@ PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ @@ -57,9 +57,10 @@ RPM = @rpm@ RPMBUILD = @rpmbuild@ RPM_VERSION = @rpm_version@ -ENABLE_CURSES = @enable_curses@ -ENABLE_SHARED = @enable_shared@ -ENABLE_GETTEXT = @enable_gettext@ +ENABLE_CURSES = @enable_curses@ +ENABLE_SHARED = @enable_shared@ +ENABLE_GETTEXT = @enable_gettext@ + HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ LCFLAGS += -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1 =========================================================================== Index: xfsdump/m4/Makefile =========================================================================== --- a/xfsdump/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/m4/Makefile 2006-03-31 12:37:36.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -13,7 +13,8 @@ LSRCFILES = \ package_ncurses.m4 \ package_utilies.m4 \ package_uuiddev.m4 \ - package_xfslibs.m4 + package_xfslibs.m4 \ + multilib.m4 default: =========================================================================== Index: xfsdump/m4/multilib.m4 =========================================================================== --- a/xfsdump/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/xfsdump/m4/multilib.m4 2006-03-31 12:30:56.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: xfsdump/m4/package_attrdev.m4 =========================================================================== --- a/xfsdump/m4/package_attrdev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/m4/package_attrdev.m4 2006-03-31 16:21:05.000000000 +1000 @@ -43,7 +43,8 @@ AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBAT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) @@ -58,7 +59,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) =========================================================================== Index: xfsdump/m4/package_dmapidev.m4 =========================================================================== --- a/xfsdump/m4/package_dmapidev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/m4/package_dmapidev.m4 2006-03-31 16:34:51.000000000 +1000 @@ -20,6 +20,7 @@ AC_DEFUN([AC_PACKAGE_NEED_MAKEHANDLE_LIB libdm="-ldm" test -f `pwd`/../dmapi/libdm/libdm.la && \ libdm="`pwd`/../dmapi/libdm/libdm.la" - test -f /usr/lib/libdm.la && libdm="/usr/lib/libdm.la" + test -f ${libexecdir}${libdirsuffix}/libdm.la && \ + libdm="${libexecdir}${libdirsuffix}/libdm.la" AC_SUBST(libdm) ]) =========================================================================== Index: xfsdump/m4/package_xfslibs.m4 =========================================================================== --- a/xfsdump/m4/package_xfslibs.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsdump/m4/package_xfslibs.m4 2006-03-31 16:36:52.000000000 +1000 @@ -42,7 +42,8 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIB libxfs="-lxfs" test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \ libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la" - test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la" + test -f ${libexecdir}${libdirsuffix}/libxfs.la && \ + libxfs="${libexecdir}${libdirsuffix}/libxfs.la" AC_SUBST(libxfs) ]) @@ -57,7 +58,8 @@ AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHAND libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) @@ -72,7 +74,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHA libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) =========================================================================== Index: xfsprogs/Makefile =========================================================================== --- a/xfsprogs/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsprogs/Makefile 2006-03-31 12:07:00.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -41,6 +41,7 @@ $(CONFIGURE): --bindir=/usr/sbin \ --libdir=/lib \ --libexecdir=/usr/lib \ + --enable-lib64=yes \ --includedir=/usr/include \ --mandir=/usr/share/man \ --datadir=/usr/share \ @@ -48,7 +49,7 @@ $(CONFIGURE): touch .census aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install: default $(SUBDIRS_MAKERULE) =========================================================================== Index: xfsprogs/aclocal.m4 =========================================================================== --- a/xfsprogs/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsprogs/aclocal.m4 2006-03-31 12:29:52.000000000 +1000 @@ -1,14 +1,77 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p6 +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# Find format of installed man pages. +# Always gzipped on Debian, but not Redhat pre-7.0. +# We don't deal with bzip2'd man pages, which Mandrake uses, +# someone will send us a patch sometime hopefully. :-) +# +AC_DEFUN([AC_MANUAL_FORMAT], + [ have_zipped_manpages=false + for d in ${prefix}/share/man ${prefix}/man ; do + if test -f $d/man1/man.1.gz + then + have_zipped_manpages=true + break + fi + done + AC_SUBST(have_zipped_manpages) + ]) + +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. -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 AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) # # Generic macro, sets up all of the global packaging variables. @@ -56,181 +119,6 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], AC_SUBST(pkg_platform) ]) -# -# Check for specified utility (env var) - if unset, fail. -# -AC_DEFUN([AC_PACKAGE_NEED_UTILITY], - [ if test -z "$2"; then - echo - echo FATAL ERROR: $3 does not seem to be installed. - echo $1 cannot be built without a working $4 installation. - exit 1 - fi - ]) - -# -# Generic macro, sets up all of the global build variables. -# The following environment variables may be set to override defaults: -# CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT -# MSGFMT MSGMERGE RPM -# -AC_DEFUN([AC_PACKAGE_UTILITIES], - [ AC_PROG_CC - cc="$CC" - AC_SUBST(cc) - AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler]) - - if test -z "$MAKE"; then - AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/local/bin:/usr/freeware/bin) - fi - if test -z "$MAKE"; then - AC_PATH_PROG(MAKE, make,, /usr/bin) - fi - make=$MAKE - AC_SUBST(make) - AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make]) - - if test -z "$LIBTOOL"; then - AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin) - fi - if test -z "$LIBTOOL"; then - AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin) - fi - libtool=$LIBTOOL - AC_SUBST(libtool) - AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool]) - - if test -z "$TAR"; then - AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin) - fi - tar=$TAR - AC_SUBST(tar) - if test -z "$ZIP"; then - AC_PATH_PROG(ZIP, gzip,, /bin:/usr/bin:/usr/local/bin:/usr/freeware/bin) - fi - - zip=$ZIP - AC_SUBST(zip) - - if test -z "$MAKEDEPEND"; then - AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) - fi - makedepend=$MAKEDEPEND - AC_SUBST(makedepend) - - if test -z "$AWK"; then - AC_PATH_PROG(AWK, awk,, /bin:/usr/bin) - fi - awk=$AWK - AC_SUBST(awk) - - if test -z "$SED"; then - AC_PATH_PROG(SED, sed,, /bin:/usr/bin) - fi - sed=$SED - AC_SUBST(sed) - - if test -z "$ECHO"; then - AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin) - fi - echo=$ECHO - AC_SUBST(echo) - - if test -z "$SORT"; then - AC_PATH_PROG(SORT, sort,, /bin:/usr/bin) - fi - sort=$SORT - AC_SUBST(sort) - - dnl check if symbolic links are supported - AC_PROG_LN_S - - if test "$enable_gettext" = yes; then - if test -z "$MSGFMT"; then - AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/local/bin:/usr/freeware/bin) - fi - msgfmt=$MSGFMT - AC_SUBST(msgfmt) - AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext) - - if test -z "$MSGMERGE"; then - AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/local/bin:/usr/freeware/bin) - fi - msgmerge=$MSGMERGE - AC_SUBST(msgmerge) - AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext) - fi - - if test -z "$RPM"; then - AC_PATH_PROG(RPM, rpm,, /bin:/usr/bin:/usr/freeware/bin) - fi - rpm=$RPM - AC_SUBST(rpm) - - dnl .. and what version is rpm - rpm_version=0 - test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \ - | awk '{print $NF}' | awk -F. '{V=1; print $V}'` - AC_SUBST(rpm_version) - dnl At some point in rpm 4.0, rpm can no longer build rpms, and - dnl rpmbuild is needed (rpmbuild may go way back; not sure) - dnl So, if rpm version >= 4.0, look for rpmbuild. Otherwise build w/ rpm - if test $rpm_version -ge 4; then - AC_PATH_PROG(RPMBUILD, rpmbuild) - rpmbuild=$RPMBUILD - else - rpmbuild=$RPM - fi - AC_SUBST(rpmbuild) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_UUID_H], - [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h]) - if test $ac_cv_header_uuid_h = no -a \ - $ac_cv_header_sys_uuid_h = no -a \ - $ac_cv_header_uuid_uuid_h = no; then - echo - echo 'FATAL ERROR: could not find a valid UUID header.' - echo 'Install the Universally Unique Identifiers development package.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE], - [ AC_CHECK_FUNCS(uuid_compare) - if test $ac_cv_func_uuid_compare = yes; then - libuuid="" - else - AC_CHECK_LIB(uuid, uuid_compare,, [ - echo - echo 'FATAL ERROR: could not find a valid UUID library.' - echo 'Install the Universally Unique Identifiers library package.' - exit 1]) - libuuid="-luuid" - fi - AC_SUBST(libuuid) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_PTHREAD_H], - [ AC_CHECK_HEADERS(pthread.h) - if test $ac_cv_header_pthread_h = no; then - AC_CHECK_HEADERS(pthread.h,, [ - echo - echo 'FATAL ERROR: could not find a valid pthread header.' - exit 1]) - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_PTHREADMUTEXINIT], - [ AC_CHECK_LIB(pthread, pthread_mutex_init,, [ - echo - echo 'FATAL ERROR: could not find a valid pthread library.' - exit 1 - ]) - libpthread=-lpthread - AC_SUBST(libpthread) - ]) - # # Check if we have a working fadvise system call # @@ -332,6 +220,26 @@ AC_DEFUN([AC_HAVE_GETMNTINFO], AC_SUBST(have_getmntinfo) ]) +AC_DEFUN([AC_PACKAGE_NEED_PTHREAD_H], + [ AC_CHECK_HEADERS(pthread.h) + if test $ac_cv_header_pthread_h = no; then + AC_CHECK_HEADERS(pthread.h,, [ + echo + echo 'FATAL ERROR: could not find a valid pthread header.' + exit 1]) + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_PTHREADMUTEXINIT], + [ AC_CHECK_LIB(pthread, pthread_mutex_init,, [ + echo + echo 'FATAL ERROR: could not find a valid pthread library.' + exit 1 + ]) + libpthread=-lpthread + AC_SUBST(libpthread) + ]) + # # Check if we have a type for the pointer's size integer (__psint_t) # @@ -383,21 +291,158 @@ AC_DEFUN([AC_SIZEOF_POINTERS_AND_LONG], fi ]) +# +# Check for specified utility (env var) - if unset, fail. # -# Find format of installed man pages. -# Always gzipped on Debian, but not Redhat pre-7.0. -# We don't deal with bzip2'd man pages, which Mandrake uses, -# someone will send us a patch sometime hopefully. :-) -# -AC_DEFUN([AC_MANUAL_FORMAT], - [ have_zipped_manpages=false - for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then - have_zipped_manpages=true - break +AC_DEFUN([AC_PACKAGE_NEED_UTILITY], + [ if test -z "$2"; then + echo + echo FATAL ERROR: $3 does not seem to be installed. + echo $1 cannot be built without a working $4 installation. + exit 1 + fi + ]) + +# +# Generic macro, sets up all of the global build variables. +# The following environment variables may be set to override defaults: +# CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT +# MSGFMT MSGMERGE RPM +# +AC_DEFUN([AC_PACKAGE_UTILITIES], + [ AC_PROG_CC + cc="$CC" + AC_SUBST(cc) + AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler]) + + if test -z "$MAKE"; then + AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/local/bin:/usr/freeware/bin) + fi + if test -z "$MAKE"; then + AC_PATH_PROG(MAKE, make,, /usr/bin) + fi + make=$MAKE + AC_SUBST(make) + AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make]) + + if test -z "$LIBTOOL"; then + AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin) + fi + if test -z "$LIBTOOL"; then + AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin) + fi + libtool=$LIBTOOL + AC_SUBST(libtool) + AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool]) + + if test -z "$TAR"; then + AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin) + fi + tar=$TAR + AC_SUBST(tar) + if test -z "$ZIP"; then + AC_PATH_PROG(ZIP, gzip,, /bin:/usr/bin:/usr/local/bin:/usr/freeware/bin) + fi + + zip=$ZIP + AC_SUBST(zip) + + if test -z "$MAKEDEPEND"; then + AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) + fi + makedepend=$MAKEDEPEND + AC_SUBST(makedepend) + + if test -z "$AWK"; then + AC_PATH_PROG(AWK, awk,, /bin:/usr/bin) + fi + awk=$AWK + AC_SUBST(awk) + + if test -z "$SED"; then + AC_PATH_PROG(SED, sed,, /bin:/usr/bin) + fi + sed=$SED + AC_SUBST(sed) + + if test -z "$ECHO"; then + AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin) + fi + echo=$ECHO + AC_SUBST(echo) + + if test -z "$SORT"; then + AC_PATH_PROG(SORT, sort,, /bin:/usr/bin) + fi + sort=$SORT + AC_SUBST(sort) + + dnl check if symbolic links are supported + AC_PROG_LN_S + + if test "$enable_gettext" = yes; then + if test -z "$MSGFMT"; then + AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/local/bin:/usr/freeware/bin) fi - done - AC_SUBST(have_zipped_manpages) + msgfmt=$MSGFMT + AC_SUBST(msgfmt) + AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext) + + if test -z "$MSGMERGE"; then + AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/local/bin:/usr/freeware/bin) + fi + msgmerge=$MSGMERGE + AC_SUBST(msgmerge) + AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext) + fi + + if test -z "$RPM"; then + AC_PATH_PROG(RPM, rpm,, /bin:/usr/bin:/usr/freeware/bin) + fi + rpm=$RPM + AC_SUBST(rpm) + + dnl .. and what version is rpm + rpm_version=0 + test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \ + | awk '{print $NF}' | awk -F. '{V=1; print $V}'` + AC_SUBST(rpm_version) + dnl At some point in rpm 4.0, rpm can no longer build rpms, and + dnl rpmbuild is needed (rpmbuild may go way back; not sure) + dnl So, if rpm version >= 4.0, look for rpmbuild. Otherwise build w/ rpm + if test $rpm_version -ge 4; then + AC_PATH_PROG(RPMBUILD, rpmbuild) + rpmbuild=$RPMBUILD + else + rpmbuild=$RPM + fi + AC_SUBST(rpmbuild) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_UUID_H], + [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h]) + if test $ac_cv_header_uuid_h = no -a \ + $ac_cv_header_sys_uuid_h = no -a \ + $ac_cv_header_uuid_uuid_h = no; then + echo + echo 'FATAL ERROR: could not find a valid UUID header.' + echo 'Install the Universally Unique Identifiers development package.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE], + [ AC_CHECK_FUNCS(uuid_compare) + if test $ac_cv_func_uuid_compare = yes; then + libuuid="" + else + AC_CHECK_LIB(uuid, uuid_compare,, [ + echo + echo 'FATAL ERROR: could not find a valid UUID library.' + echo 'Install the Universally Unique Identifiers library package.' + exit 1]) + libuuid="-luuid" + fi + AC_SUBST(libuuid) ]) =========================================================================== Index: xfsprogs/configure.in =========================================================================== --- a/xfsprogs/configure.in 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsprogs/configure.in 2006-03-31 16:52:55.000000000 +1000 @@ -30,8 +30,14 @@ AC_ARG_ENABLE(termcap, test $enable_termcap = yes && libtermcap="-ltermcap",) AC_SUBST(libtermcap) +AC_ARG_ENABLE(lib64, +[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, + enable_lib64=no) +AC_SUBST(enable_lib64) + AC_PACKAGE_GLOBALS(xfsprogs) AC_PACKAGE_UTILITIES(xfsprogs) +AC_MULTILIB($enable_lib64) AC_PACKAGE_NEED_UUID_H AC_PACKAGE_NEED_UUIDCOMPARE =========================================================================== Index: xfsprogs/include/builddefs.in =========================================================================== --- a/xfsprogs/include/builddefs.in 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsprogs/include/builddefs.in 2006-03-31 12:28:16.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004-2005 Silicon Graphics, Inc. +# Copyright (c) 2004-2006 Silicon Graphics, Inc. # All Rights Reserved. # # This program is free software; you can redistribute it and/or @@ -49,8 +49,8 @@ PKG_PLATFORM = @pkg_platform@ PKG_DISTRIBUTION= @pkg_distribution@ PKG_BIN_DIR = @bindir@ PKG_SBIN_DIR = @sbindir@ -PKG_LIB_DIR = @libdir@ -PKG_DEVLIB_DIR = @libexecdir@ +PKG_LIB_DIR = @libdir@@libdirsuffix@ +PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ PKG_INC_DIR = @includedir@/xfs PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ @@ -75,10 +75,11 @@ RPM = @rpm@ RPMBUILD = @rpmbuild@ RPM_VERSION = @rpm_version@ -ENABLE_SHARED = @enable_shared@ -ENABLE_GETTEXT = @enable_gettext@ -ENABLE_EDITLINE = @enable_editline@ -ENABLE_READLINE = @enable_readline@ +ENABLE_SHARED = @enable_shared@ +ENABLE_GETTEXT = @enable_gettext@ +ENABLE_EDITLINE = @enable_editline@ +ENABLE_READLINE = @enable_readline@ + HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ HAVE_FADVISE = @have_fadvise@ =========================================================================== Index: xfsprogs/m4/Makefile =========================================================================== --- a/xfsprogs/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfsprogs/m4/Makefile 2006-03-31 12:29:41.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -12,7 +12,8 @@ LSRCFILES = \ package_pthread.m4 \ package_types.m4 \ package_utilies.m4 \ - package_uuiddev.m4 + package_uuiddev.m4 \ + multilib.m4 default: =========================================================================== Index: xfsprogs/m4/multilib.m4 =========================================================================== --- a/xfsprogs/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/xfsprogs/m4/multilib.m4 2006-03-31 10:51:08.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: xfstests/Makefile =========================================================================== --- a/xfstests/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/Makefile 2006-03-31 12:42:35.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = . @@ -36,7 +36,7 @@ $(CONFIGURE): ./configure aclocal.m4:: - aclocal --acdir=$(TOPDIR)/m4 --output=$@ + aclocal --acdir=`pwd`/m4 --output=$@ install install-dev install-lib: =========================================================================== Index: xfstests/aclocal.m4 =========================================================================== --- a/xfstests/aclocal.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/aclocal.m4 2006-03-31 12:44:55.000000000 +1000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.5 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,147 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +AC_DEFUN([AC_PACKAGE_NEED_SYS_ACL_H], + [ AC_CHECK_HEADERS([sys/acl.h]) + if test "$ac_cv_header_sys_acl_h" != "yes"; then + echo + echo 'FATAL ERROR: sys/acl.h does not exist.' + echo 'Install the access control lists (acl) development package.' + echo 'Alternatively, run "make install-dev" from the acl source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H], + [ AC_CHECK_HEADERS([acl/libacl.h]) + if test "$ac_cv_header_acl_libacl_h" != "yes"; then + echo + echo 'FATAL ERROR: acl/libacl.h does not exist.' + echo 'Install the access control lists (acl) development package.' + echo 'Alternatively, run "make install-dev" from the acl source.' + exit 1 + fi + ]) + + +AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL], + [ AC_CHECK_LIB(acl, acl_init,, [ + echo + echo 'FATAL ERROR: could not find a valid Access Control List library.' + echo 'Install either the libacl (rpm) or the libacl1 (deb) package.' + echo 'Alternatively, run "make install-lib" from the acl source.' + exit 1 + ]) + libacl="-lacl" + test -f `pwd`/../acl/libacl/libacl.la && \ + libacl="`pwd`/../acl/libacl/libacl.la" + test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la" + AC_SUBST(libacl) + ]) + +AC_DEFUN([AC_PACKAGE_WANT_AIO], + [ AC_CHECK_HEADERS(libaio.h, [ have_aio=true ], [ have_aio=false ]) + AC_SUBST(have_aio) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], + [ AC_CHECK_HEADERS([attr/xattr.h]) + if test "$ac_cv_header_attr_xattr_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/xattr.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], + [ AC_CHECK_HEADERS([attr/error_context.h]) + if test "$ac_cv_header_attr_error_context_h" != "yes"; then + echo + echo 'FATAL ERROR: attr/error_context.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], + [ have_attributes_h=false + AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) + if test "$have_attributes_h" = "false"; then + echo + echo 'FATAL ERROR: attributes.h does not exist.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 + fi + ]) + +AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR], + [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false]) + AC_SUBST(have_attr_list) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], + [ AC_CHECK_LIB(attr, getxattr,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], + [ AC_CHECK_LIB(attr, attr_get,, [ + echo + echo 'FATAL ERROR: could not find a valid Extended Attributes library.' + echo 'Install the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-lib" from the attr source.' + exit 1 + ]) + libattr="-lattr" + test -f `pwd`/../attr/libattr/libattr.la && \ + libattr="`pwd`/../attr/libattr/libattr.la" + test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + AC_SUBST(libattr) + ]) + +AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], + [ AC_MSG_CHECKING([macros in attr/attributes.h]) + AC_TRY_LINK([ +#include +#include ], + [ int x = ATTR_SECURE; ], [ echo ok ], [ + echo + echo 'FATAL ERROR: could not find a current attributes header.' + echo 'Upgrade the extended attributes (attr) development package.' + echo 'Alternatively, run "make install-dev" from the attr source.' + exit 1 ]) + ]) + +AC_DEFUN([AC_PACKAGE_WANT_NDBM], + [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ]) + libgdbm="" + AC_SUBST(libgdbm) + AC_SUBST(have_db) + ]) + +AC_DEFUN([AC_PACKAGE_WANT_GDBM], + [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ]) + if test $have_db = true -a -f /usr/lib/libgdbm.a; then + libgdbm="/usr/lib/libgdbm.a" + fi + AC_SUBST(libgdbm) + AC_SUBST(have_db) + ]) + # # Generic macro, sets up all of the global packaging variables. # The following environment variables may be set to override defaults: @@ -40,12 +181,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` @@ -170,7 +311,7 @@ AC_DEFUN([AC_PACKAGE_UTILITIES], dnl .. and what version is rpm rpm_version=0 - test -x "$RPM" && rpm_version=`$RPM --version \ + test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \ | awk '{print $NF}' | awk -F. '{V=1; print $V}'` AC_SUBST(rpm_version) dnl At some point in rpm 4.0, rpm can no longer build rpms, and @@ -212,142 +353,6 @@ AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE], AC_SUBST(libuuid) ]) -AC_DEFUN([AC_PACKAGE_NEED_SYS_ACL_H], - [ AC_CHECK_HEADERS([sys/acl.h]) - if test "$ac_cv_header_sys_acl_h" != "yes"; then - echo - echo 'FATAL ERROR: sys/acl.h does not exist.' - echo 'Install the access control lists (acl) development package.' - echo 'Alternatively, run "make install-dev" from the acl source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H], - [ AC_CHECK_HEADERS([acl/libacl.h]) - if test "$ac_cv_header_acl_libacl_h" != "yes"; then - echo - echo 'FATAL ERROR: acl/libacl.h does not exist.' - echo 'Install the access control lists (acl) development package.' - echo 'Alternatively, run "make install-dev" from the acl source.' - exit 1 - fi - ]) - - -AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL], - [ AC_CHECK_LIB(acl, acl_init,, [ - echo - echo 'FATAL ERROR: could not find a valid Access Control List library.' - echo 'Install either the libacl (rpm) or the libacl1 (deb) package.' - echo 'Alternatively, run "make install-lib" from the acl source.' - exit 1 - ]) - libacl="-lacl" - test -f `pwd`/../acl/libacl/libacl.la && \ - libacl="`pwd`/../acl/libacl/libacl.la" - test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la" - AC_SUBST(libacl) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H], - [ AC_CHECK_HEADERS([attr/xattr.h]) - if test "$ac_cv_header_attr_xattr_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/xattr.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H], - [ AC_CHECK_HEADERS([attr/error_context.h]) - if test "$ac_cv_header_attr_error_context_h" != "yes"; then - echo - echo 'FATAL ERROR: attr/error_context.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], - [ have_attributes_h=false - AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], ) - if test "$have_attributes_h" = "false"; then - echo - echo 'FATAL ERROR: attributes.h does not exist.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 - fi - ]) - -AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR], - [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false]) - AC_SUBST(have_attr_list) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], - [ AC_CHECK_LIB(attr, getxattr,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR], - [ AC_CHECK_LIB(attr, attr_get,, [ - echo - echo 'FATAL ERROR: could not find a valid Extended Attributes library.' - echo 'Install the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-lib" from the attr source.' - exit 1 - ]) - libattr="-lattr" - test -f `pwd`/../attr/libattr/libattr.la && \ - libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" - AC_SUBST(libattr) - ]) - -AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS], - [ AC_MSG_CHECKING([macros in attr/attributes.h]) - AC_TRY_LINK([ -#include -#include ], - [ int x = ATTR_SECURE; ], [ echo ok ], [ - echo - echo 'FATAL ERROR: could not find a current attributes header.' - echo 'Upgrade the extended attributes (attr) development package.' - echo 'Alternatively, run "make install-dev" from the attr source.' - exit 1 ]) - ]) - -AC_DEFUN([AC_PACKAGE_WANT_NDBM], - [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ]) - libgdbm="" - AC_SUBST(libgdbm) - AC_SUBST(have_db) - ]) - -AC_DEFUN([AC_PACKAGE_WANT_GDBM], - [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ]) - if test $have_db = true -a -f /usr/lib/libgdbm.a; then - libgdbm="/usr/lib/libgdbm.a" - fi - AC_SUBST(libgdbm) - AC_SUBST(have_db) - ]) - AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H], [ AC_CHECK_HEADERS([xfs/libxfs.h]) if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then @@ -451,8 +456,3 @@ AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], ]) ]) -AC_DEFUN([AC_PACKAGE_WANT_AIO], - [ AC_CHECK_HEADERS(libaio.h, [ have_aio=true ], [ have_aio=false ]) - AC_SUBST(have_aio) - ]) - =========================================================================== Index: xfstests/m4/Makefile =========================================================================== --- a/xfstests/m4/Makefile 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/Makefile 2006-03-31 12:44:13.000000000 +1000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. # TOPDIR = .. @@ -21,7 +21,8 @@ LSRCFILES = \ package_uuiddev.m4 \ package_xfslibs.m4 \ general_headers.m4 \ - visibility_hidden.m4 + visibility_hidden.m4 \ + multilib.m4 default: =========================================================================== Index: xfstests/m4/multilib.m4 =========================================================================== --- a/xfstests/m4/multilib.m4 2006-03-27 14:24:11.396212250 +1000 +++ b/xfstests/m4/multilib.m4 2006-03-31 12:40:35.000000000 +1000 @@ -0,0 +1,43 @@ +# The AC_MULTILIB macro was extracted and modified from +# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +# so that the correct paths can be used for 64-bit libraries. +# +dnl Copyright (C) 2001-2005 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 From Bruno Haible. + +dnl AC_MULTILIB creates a variable libdirsuffix, containing +dnl the suffix of the libdir, either "" or "64". +dnl Only do this if the given enable parameter is "yes". +AC_DEFUN([AC_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + enable_lib64="$1" + libdirsuffix="" + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test "$enable_lib64" = "yes" -a -n "$searchpath"; then + save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) libdirsuffix=64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) libdirsuffix=64 ;; + esac ;; + esac + fi + done + IFS="$save_IFS" + fi + AC_SUBST(libdirsuffix) +]) =========================================================================== Index: xfstests/m4/package_acldev.m4 =========================================================================== --- a/xfstests/m4/package_acldev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/package_acldev.m4 2006-03-31 16:50:47.000000000 +1000 @@ -32,6 +32,7 @@ AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL libacl="-lacl" test -f `pwd`/../acl/libacl/libacl.la && \ libacl="`pwd`/../acl/libacl/libacl.la" - test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la" + test -f ${libexecdir}${libdirsuffix}/libacl.la && \ + libacl="${libexecdir}${libdirsuffix}/libacl.la" AC_SUBST(libacl) ]) =========================================================================== Index: xfstests/m4/package_attrdev.m4 =========================================================================== --- a/xfstests/m4/package_attrdev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/package_attrdev.m4 2006-03-31 16:46:49.000000000 +1000 @@ -32,11 +32,6 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H], fi ]) -AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR], - [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false]) - AC_SUBST(have_attr_list) - ]) - AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR], [ AC_CHECK_LIB(attr, getxattr,, [ echo @@ -48,7 +43,8 @@ AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBAT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) @@ -63,7 +59,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATT libattr="-lattr" test -f `pwd`/../attr/libattr/libattr.la && \ libattr="`pwd`/../attr/libattr/libattr.la" - test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la" + test -f ${libexecdir}${libdirsuffix}/libattr.la && \ + libattr="${libexecdir}${libdirsuffix}/libattr.la" AC_SUBST(libattr) ]) =========================================================================== Index: xfstests/m4/package_dmapidev.m4 =========================================================================== --- a/xfstests/m4/package_dmapidev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/package_dmapidev.m4 2006-03-31 16:39:38.000000000 +1000 @@ -20,6 +20,7 @@ AC_DEFUN([AC_PACKAGE_NEED_MAKEHANDLE_LIB libdm="-ldm" test -f `pwd`/../dmapi/libdm/libdm.la && \ libdm="`pwd`/../dmapi/libdm/libdm.la" - test -f /usr/lib/libdm.la && libdm="/usr/lib/libdm.la" + test -f ${libexecdir}${libdirsuffix}/libdm.la && \ + libdm="${libexecdir}${libdirsuffix}/libdm.la" AC_SUBST(libdm) ]) =========================================================================== Index: xfstests/m4/package_gdbmdev.m4 =========================================================================== --- a/xfstests/m4/package_gdbmdev.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/package_gdbmdev.m4 2006-03-31 16:51:25.000000000 +1000 @@ -7,8 +7,8 @@ AC_DEFUN([AC_PACKAGE_WANT_NDBM], AC_DEFUN([AC_PACKAGE_WANT_GDBM], [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ]) - if test $have_db = true -a -f /usr/lib/libgdbm.a; then - libgdbm="/usr/lib/libgdbm.a" + if test $have_db = true -a -f ${libexecdir}${libdirsuffix}/libgdbm.a; then + libgdbm="${libexecdir}${libdirsuffix}/libgdbm.a" fi AC_SUBST(libgdbm) AC_SUBST(have_db) =========================================================================== Index: xfstests/m4/package_xfslibs.m4 =========================================================================== --- a/xfstests/m4/package_xfslibs.m4 2006-03-31 16:57:32.000000000 +1000 +++ b/xfstests/m4/package_xfslibs.m4 2006-03-31 16:38:41.000000000 +1000 @@ -42,7 +42,8 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIB libxfs="-lxfs" test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \ libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la" - test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la" + test -f ${libexecdir}${libdirsuffix}/libxfs.la && \ + libxfs="${libexecdir}${libdirsuffix}/libxfs.la" AC_SUBST(libxfs) ]) @@ -57,7 +58,8 @@ AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHAND libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) @@ -72,7 +74,8 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHA libhdl="-lhandle" test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la" - test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la" + test -f ${libexecdir}${libdirsuffix}/libhandle.la && \ + libhdl="${libexecdir}${libdirsuffix}/libhandle.la" AC_SUBST(libhdl) ]) --------------050703010908000504020408--