"Fossies" - the Fresh Open Source Software Archive

Member "alsa-lib-1.1.9/gitcompile" (10 May 2019, 2056 Bytes) of package /linux/misc/alsa-lib-1.1.9.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "gitcompile": 1.1.8_vs_1.1.9.

    1 #!/bin/bash
    2 
    3 set -e
    4 
    5 bit32=
    6 modules=
    7 alisp=
    8 lto=
    9 if [ $# -ne 0 ]; then
   10   endloop=
   11   while [ -z "$endloop" ]; do
   12     case "$1" in
   13     32)
   14       bits32=yes
   15       echo "Forced 32-bit library build..."
   16       shift ;;
   17     modules)
   18       modules=yes
   19       echo "Forced mixer modules build..."
   20       shift ;;
   21     alisp)
   22       alisp=yes
   23       echo "Forced alisp code build..."
   24       shift ;;
   25     python2)
   26       python2=yes
   27       echo "Forced python2 interpreter build..."
   28       shift ;;
   29     lto)
   30       lto="-flto -flto-partition=none"
   31       echo "Forced lto build..."
   32       shift ;;
   33     *)
   34       endloop=yes
   35       ;;
   36     esac
   37   done
   38 fi
   39 if [ $# -ne 0 -a -z "$bit32" ]; then
   40   args="$@"
   41 elif [ -r /etc/asound/library_args ]; then
   42   args="`cat /etc/asound/library_args`"
   43   if [ -z "$bit32" ]; then
   44     test -r /etc/asound/library64_args && \
   45       args="`cat /etc/asound/library64_args`"
   46   fi
   47 else
   48   prefix="/usr"
   49   libdir="/usr/lib"
   50   libdir2="/usr/lib"
   51   if [ -z "$bit32" ]; then
   52     test -d /usr/lib64 && libdir="/usr/lib64"
   53     test -f /lib64/libasound.so.2 && libdir="/lib64"
   54     test -d /usr/lib64 && libdir2="/usr/lib64"
   55   else
   56     test -f /lib/libasound.so.2 && libdir="/lib"
   57   fi
   58   args="--disable-aload --prefix=$prefix --libdir=$libdir"
   59   args="$args --with-plugindir=$libdir2/alsa-lib"
   60   args="$args --with-pkgconfdir=$libdir2/pkgconfig"
   61 fi
   62 
   63 if [ "$modules" = "yes" ]; then
   64   args="$args --enable-mixer-modules"
   65   args="$args --enable-mixer-pymods"
   66 fi
   67 
   68 if [ "$alisp" = "yes" ]; then
   69   args="$args --enable-alisp"
   70 fi
   71 
   72 if [ "$python2" = "yes" ]; then
   73   args="$args --enable-python2"
   74 fi
   75 
   76 touch ltconfig
   77 libtoolize --force --copy --automake
   78 aclocal $ACLOCAL_FLAGS
   79 autoheader
   80 automake --foreign --copy --add-missing
   81 touch depcomp       # seems to be missing for old automake
   82 autoconf
   83 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g $lto"
   84 if [ -n "$lto" ]; then
   85   export AR="gcc-ar"
   86   export RANLIB="gcc-ranlib"
   87 fi
   88 echo "CFLAGS=$CFLAGS"
   89 echo "./configure $args"
   90 ./configure $args || exit 1
   91 unset CFLAGS
   92 if [ -z "$GITCOMPILE_NO_MAKE" ]; then
   93   make
   94 fi