3 # This file is part of libatasmart.
5 # Copyright 2008-2011 Lennart Poettering
7 # libatasmart is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation, either version 2.1 of the
10 # License, or (at your option) any later version.
12 # libatasmart is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with libatasmart; If not, see
19 # <http://www.gnu.org/licenses/>.
28 V=$(echo "$2" | sed -e 's,\.,,g')
30 if [ -e "`which $1$V 2> /dev/null`" ] ; then
33 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
46 if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
47 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
48 chmod +x .git/hooks/pre-commit && \
49 echo "Activated pre-commit hook."
52 if type -p colorgcc > /dev/null ; then
57 echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
60 if [ "x$1" = "xam" ] ; then
61 run_versioned automake "$AM_VERSION" -a -c --foreign
68 run_versioned aclocal "$AM_VERSION" -I m4
69 run_versioned autoconf "$AC_VERSION" -Wall
70 run_versioned autoheader "$AC_VERSION"
71 run_versioned automake "$AM_VERSION" --copy --foreign --add-missing
73 if [ "x$1" != "xac" ]; then
74 CFLAGS="$CFLAGS -g -O0" ./configure \
76 --localstatedir=/var \
77 --libexecdir=/usr/lib \
78 --libdir=$(libdir /usr/local/lib) \