summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2012-01-20 16:14:44 +0100
committerJaroslav Kysela <perex@perex.cz>2012-01-20 16:14:44 +0100
commit98d4ed8810da5c203b5b5f211ee290ae38621eeb (patch)
treecf072ed34e3d1c8c2cdffc96f7b597c4eed0e9ee
parent226a34ac09e5d9c08ab8845e4c2e3fbd7b64010b (diff)
downloadalsa-lib-98d4ed8810da5c203b5b5f211ee290ae38621eeb.tar.gz
Introduce --with-pkgconfdir, add 64-bit defaults to gitcompile
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--configure.in16
-rwxr-xr-xgitcompile33
-rw-r--r--utils/Makefile.am3
3 files changed, 49 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 13e38b87..84f850c3 100644
--- a/configure.in
+++ b/configure.in
@@ -117,6 +117,22 @@ AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add
ALSA_PLUGIN_DIR="$plugindir"
AC_SUBST(ALSA_PLUGIN_DIR)
+AC_ARG_WITH(pkgconfdir,
+ AS_HELP_STRING([--with-pkgconfdir=dir],
+ [path where pkgconfig files are stored]),
+ pkgconfdir="$withval", pkgconfdir="")
+if test -z "$pkgconfdir"; then
+ eval dir="$libdir"
+ case "$dir" in
+ /*) ;;
+ *) dir="$dir"
+ esac
+ pkgconfdir="$dir/pkgconfig"
+fi
+AC_DEFINE_UNQUOTED(ALSA_PKGCONF_DIR, "$pkgconfdir", [directory containing pkgconfig files])
+ALSA_PKGCONF_DIR="$pkgconfdir"
+AC_SUBST(ALSA_PKGCONF_DIR)
+
dnl Check for versioned symbols
AC_MSG_CHECKING(for versioned symbols)
AC_ARG_WITH(versioned,
diff --git a/gitcompile b/gitcompile
index 6954cf26..0b60aed0 100755
--- a/gitcompile
+++ b/gitcompile
@@ -2,6 +2,35 @@
set -e
+bit32=
+if [ $# -ne 0 -a "$1" == "32" ]; then
+ bit32=yes
+ echo "Forced 32-bit library build..."
+fi
+if [ $# -ne 0 -a -z "$bit32" ]; then
+ args="$@"
+elif [ -r /etc/asound/library_args ]; then
+ args="`cat /etc/asound/library_args`"
+ if [ -z "$bit32" ]; then
+ test -r /etc/asound/library64_args && \
+ args="`cat /etc/asound/library64_args`"
+ fi
+else
+ prefix="/usr"
+ libdir="/usr/lib"
+ libdir2="/usr/lib"
+ if [ -z "$bit32" ]; then
+ test -d /usr/lib64 && libdir="/usr/lib64"
+ test -f /lib64/libasound.so.2 && libdir="/lib64"
+ test -d /usr/lib64 && libdir2="/usr/lib64"
+ else
+ test -f /lib/libasound.so.2 && libdir="/lib"
+ fi
+ args="--disable-aload --prefix=$prefix --libdir=$libdir"
+ args="$args --with-plugindir=$libdir2/alsa-lib"
+ args="$args --with-pkgconfdir=$libdir2/pkgconfig"
+fi
+
touch ltconfig
libtoolize --force --copy --automake
aclocal $ACLOCAL_FLAGS
@@ -11,8 +40,8 @@ touch depcomp # seems to be missing for old automake
autoconf
export CFLAGS='-O2 -Wall -W -pipe -g'
echo "CFLAGS=$CFLAGS"
-echo "./configure $@"
-./configure $@ || exit 1
+echo "./configure $args"
+./configure $args || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
make
diff --git a/utils/Makefile.am b/utils/Makefile.am
index ee60f6c4..447d5251 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -4,7 +4,8 @@ aclocal_DATA=alsa.m4
endif
EXTRA_DIST=alsa.m4 buildrpm alsa.pc.in
-pkgconfigdir = $(libdir)/pkgconfig
+alsapkgconfdir = @ALSA_PKGCONF_DIR@
+pkgconfigdir = $(alsapkgconfdir)
pkgconfig_DATA = alsa.pc
rpm: buildrpm alsa-lib.spec