[vlc-devel] contribs issues in Linux 64 bits architecture /2

Gilles Sabourin gilles.sabourin at free.fr
Wed May 28 11:24:15 CEST 2014


Le mercredi 28 mai 2014, 16:51:30 Rémi Denis-Courmont a écrit :
> Le 2014-05-28 16:09, Gilles Sabourin a écrit :
> > Suse team may have modified the toolchain to be consistent with the
> > filesystem's organization, but that's true that any filesystem's
> > evolution is slow and heavy inside the distro.
> 
> I'd still like to know where the value comes from. If SuSE patched the
> toolchain, I'd it's entirely their fault and screw them. If it comes
> from the site configuration, it is more debatable.
> 
> Perhaps VLC contribs should force include, dataroot and lib directories
> (back) to the expected (default) values in the $(HOSTCONF) macro.

In openSUSE, there is a site-config package. Here is the README of this 
package:

site-config: Site Paths Configuration for autoconf Based configure Scripts
==========================================================================

Site configuration for autoconf based configure scripts provides smart
defaults for paths that are not specified.

All autoconf based configure scripts will automatically resource site
script using CONFIG_SITE environment variable. It works without any
explicit user interaction.

Currently implemented features:


Automatic libdir setup to $exec_prefix/lib or $exec_prefix/lib64
----------------------------------------------------------------

Depending on architecture, site script should correctly and
automatically switch between lib and lib64 libdir.


libexecdir setup to $exec_prefix/lib
------------------------------------

Upstream libexecdir defaults to $exec_prefix/libexec. This directory is
not part of FHS 2.2, so we change it to $exec_prefix/lib (yes, it is
correct to set it to $exec_prefix/lib even for bi-arch platforms). Most
projects add package name to this path, so you most probably get what
FHS 2.2 expects.


=============================================



And a Site script: /usr/share/site/x86_64-unknown-linux-gnu


#!/bin/sh
# Site script for configure. It is resourced via $CONFIG_SITE environment 
varaible.

# If user did not specify libdir, guess the correct target:
# Use lib64 for 64 bit bi-arch targets, keep the default for the rest.
if test "$libdir" = '${exec_prefix}/lib' ; then

        ac_config_site_64bit_host=NONE

        case "$host" in
        "" )
                # User did not specify host target.
                # The native platform x86_64 is a bi-arch platform.
                # Try to detect cross-compilation to inferior architecture.

                # We are trying to guess 32-bit target compilation. It's not 
as easy as
                # it sounds, as there is possible several intermediate 
combinations.
                ac_config_site_cross_to_32bit_host=NONE

                # User defined -m32 in CFLAGS or CXXFLAGS:
                # (It's sufficient for 32-bit, but alone may cause mis-behavior 
of some checks.)
                case "$CFLAGS" in
                *-m32*)
                        ac_config_site_cross_to_32bit_host=YES
                        ;;
                esac
                case "$CXXFLAGS" in
                *-m32*)
                        ac_config_site_cross_to_32bit_host=YES
                        ;;
                esac

                # Running with linux32:
                # (Changes detected platform, but not the toolchain target.)
                case "`/bin/uname -i`" in
                x86_64 | ppc64 | s390x )
                        ;;
                * )
                        ac_config_site_cross_to_32bit_host=YES
                        ;;
                esac

                if test "x$ac_config_site_cross_to_32bit_host" = xNONE; then
                        ac_config_site_64bit_host=YES
                fi

                ;;
        *x86_64* | *ppc64* | *s390x* )
                ac_config_site_64bit_host=YES
                ;;
        esac

        if test "x$ac_config_site_64bit_host" = xYES; then
                libdir='${exec_prefix}/lib64'
        fi
fi

# If user did not specify libexecdir, set the correct target:
# Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.

if test "$libexecdir" = '${exec_prefix}/libexec' ; then
        libexecdir='${exec_prefix}/lib'
fi

# Continue with the standard behavior of configure defined in AC_SITE_LOAD:
if test "x$prefix" != xNONE; then
        ac_site_file1=$prefix/share/config.site
        ac_site_file2=$prefix/etc/config.site
else
        ac_site_file1=$ac_default_prefix/share/config.site
        ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
        test "x$ac_site_file" = xNONE && continue
        if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
                { $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:
${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "/usr/share/site/x86_64-unknown-linux-gnu: loading site script 
$ac_site_file" >&6;}
                sed 's/^/| /' "$ac_site_file" >&5
                . "$ac_site_file" \
                        || { { $as_echo "/usr/share/site/x86_64-unknown-linux-
gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "/usr/share/site/x86_64-unknown-linux-gnu: error: in \`$ac_pwd':" 
>&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
        fi
done




More information about the vlc-devel mailing list