"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "m4/lib-prefix.m4" between
pulseaudio-14.0.tar.xz and pulseaudio-14.2.tar.xz

About: PulseAudio is a networked sound server (for POSIX OSes), a proxy for your sound applications.

lib-prefix.m4  (pulseaudio-14.0.tar.xz):lib-prefix.m4  (pulseaudio-14.2.tar.xz)
# lib-prefix.m4 serial 17 # lib-prefix.m4 serial 7 (gettext-0.18)
dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible. dnl From Bruno Haible.
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
dnl require excessive bracketing.
ifdef([AC_HELP_STRING],
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
dnl to access previously installed libraries. The basic assumption is that dnl to access previously installed libraries. The basic assumption is that
dnl a user will want packages to use other packages he previously installed dnl a user will want packages to use other packages he previously installed
dnl with the same --prefix option. dnl with the same --prefix option.
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
dnl libraries, but is otherwise very convenient. dnl libraries, but is otherwise very convenient.
AC_DEFUN([AC_LIB_PREFIX], AC_DEFUN([AC_LIB_PREFIX],
[ [
AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
dnl By default, look in $includedir and $libdir. dnl By default, look in $includedir and $libdir.
use_additional=yes use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([ AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\" eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\" eval additional_libdir=\"$libdir\"
]) ])
AC_ARG_WITH([lib-prefix], AC_LIB_ARG_WITH([lib-prefix],
[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
--without-lib-prefix don't search for libraries in includedir and libdir]], --without-lib-prefix don't search for libraries in includedir and libdir],
[ [
if test "X$withval" = "Xno"; then if test "X$withval" = "Xno"; then
use_additional=no use_additional=no
else else
if test "X$withval" = "X"; then if test "X$withval" = "X"; then
AC_LIB_WITH_FINAL_PREFIX([ AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\" eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\" eval additional_libdir=\"$libdir\"
]) ])
else else
skipping to change at line 150 skipping to change at line 157
acl_save_prefix="$prefix" acl_save_prefix="$prefix"
prefix="$acl_final_prefix" prefix="$acl_final_prefix"
acl_save_exec_prefix="$exec_prefix" acl_save_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix" exec_prefix="$acl_final_exec_prefix"
$1 $1
exec_prefix="$acl_save_exec_prefix" exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix" prefix="$acl_save_prefix"
]) ])
dnl AC_LIB_PREPARE_MULTILIB creates dnl AC_LIB_PREPARE_MULTILIB creates
dnl - a function acl_is_expected_elfclass, that tests whether standard input dnl - a variable acl_libdirstem, containing the basename of the libdir, either
dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, dnl "lib" or "lib64" or "lib/64",
dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing dnl - a variable acl_libdirstem2, as a secondary possible value for
dnl the basename of the libdir to try in turn, either "lib" or "lib64" or dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. dnl "lib/amd64".
AC_DEFUN([AC_LIB_PREPARE_MULTILIB], AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
[ [
dnl There is no formal standard regarding lib, lib32, and lib64. dnl There is no formal standard regarding lib and lib64.
dnl On most glibc systems, the current practice is that on a system supporting dnl On glibc systems, the current practice is that on a system supporting
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go dnl the compiler's default mode by looking at the compiler's library search
dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. dnl path. If at least one of its elements ends in /lib64 or points to a
dnl We determine the compiler's default mode by looking at the compiler's dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
dnl library search path. If at least one of its elements ends in /lib64 or dnl Otherwise we use the default, namely "lib".
dnl points to a directory whose absolute pathname ends in /lib64, we use that
dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
dnl namely "lib".
dnl On Solaris systems, the current practice is that on a system supporting dnl On Solaris systems, the current practice is that on a system supporting
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) acl_libdirstem=lib
acl_libdirstem2=
AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], case "$host_os" in
[AC_EGREP_CPP([Extensible Linking Format], solaris*)
[#ifdef __ELF__ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Develope
Extensible Linking Format r's Guide > The Development Environment
#endif dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
], dnl "Portable Makefiles should refer to any library directories using the
[gl_cv_elf=yes], 64 symbolic link."
[gl_cv_elf=no]) dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
]) dnl symlink is missing, so we set acl_libdirstem2 too.
if test $gl_cv_elf; then AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
# Extract the ELF class of a file (5th byte) in decimal. [AC_EGREP_CPP([sixtyfour bits], [
# Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_head #ifdef _LP64
er sixtyfour bits
if od -A x < /dev/null >/dev/null 2>/dev/null; then #endif
# Use POSIX od. ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
func_elfclass () ])
{ if test $gl_cv_solaris_64bit = yes; then
od -A n -t d1 -j 4 -N 1 acl_libdirstem=lib/64
} case "$host_cpu" in
else sparc*) acl_libdirstem2=lib/sparcv9 ;;
# Use BSD hexdump. i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
func_elfclass () esac
{ fi
dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' ;;
echo *)
} searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^
fi libraries: ,,p' | sed -e 's,^=,,'`
changequote(,)dnl if test -n "$searchpath"; then
case $HOST_CPU_C_ABI_32BIT in acl_save_IFS="${IFS= }"; IFS=":"
yes) for searchdir in $searchpath; do
# 32-bit ABI. if test -d "$searchdir"; then
acl_is_expected_elfclass () case "$searchdir" in
{ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 */../ | */.. )
} # Better ignore directories of this form. They are misleading.
;; ;;
no) *) searchdir=`cd "$searchdir" && pwd`
# 64-bit ABI. case "$searchdir" in
acl_is_expected_elfclass () */lib64 ) acl_libdirstem=lib64 ;;
{ esac ;;
test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 esac
} fi
;; done
*) IFS="$acl_save_IFS"
# Unknown. fi
acl_is_expected_elfclass () ;;
{ esac
: test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
}
;;
esac
changequote([,])dnl
else
acl_is_expected_elfclass ()
{
:
}
fi
dnl Allow the user to override the result by setting acl_cv_libdirstems.
AC_CACHE_CHECK([for the common suffixes of directories in the library search p
ath],
[acl_cv_libdirstems],
[dnl Try 'lib' first, because that's the default for libdir in GNU, see
dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>
.
acl_libdirstem=lib
acl_libdirstem2=
acl_libdirstem3=
case "$host_os" in
solaris*)
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Devel
oper's Guide > The Development Environment
dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
dnl "Portable Makefiles should refer to any library directories using t
he 64 symbolic link."
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if
the
dnl symlink is missing, so we set acl_libdirstem2 too.
if test $HOST_CPU_C_ABI_32BIT = no; then
acl_libdirstem2=lib/64
case "$host_cpu" in
sparc*) acl_libdirstem3=lib/sparcv9 ;;
i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
esac
fi
;;
*)
dnl If $CC generates code for a 32-bit ABI, the libraries are
dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
dnl Find the compiler's search path. However, non-system compilers
dnl sometimes have odd library search paths. But we can't simply invoke
dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/
null \
| sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
if test $HOST_CPU_C_ABI_32BIT != no; then
# 32-bit or unknown ABI.
if test -d /usr/lib32; then
acl_libdirstem2=lib32
fi
fi
if test $HOST_CPU_C_ABI_32BIT != yes; then
# 64-bit or unknown ABI.
if test -d /usr/lib64; then
acl_libdirstem3=lib64
fi
fi
if test -n "$searchpath"; then
acl_save_IFS="${IFS= }"; IFS=":"
for searchdir in $searchpath; do
if test -d "$searchdir"; then
case "$searchdir" in
*/lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
*/lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
*/../ | */.. )
# Better ignore directories of this form. They are misleading
.
;;
*) searchdir=`cd "$searchdir" && pwd`
case "$searchdir" in
*/lib32 ) acl_libdirstem2=lib32 ;;
*/lib64 ) acl_libdirstem3=lib64 ;;
esac ;;
esac
fi
done
IFS="$acl_save_IFS"
if test $HOST_CPU_C_ABI_32BIT = yes; then
# 32-bit ABI.
acl_libdirstem3=
fi
if test $HOST_CPU_C_ABI_32BIT = no; then
# 64-bit ABI.
acl_libdirstem2=
fi
fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
])
dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
dnl acl_libdirstem3.
changequote(,)dnl
acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//
'`
acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's
/,.*//'`
changequote([,])dnl
]) ])
 End of changes. 7 change blocks. 
177 lines changed or deleted 74 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)