1#!/bin/sh
2
3# This file is part of avahi.
4#
5# avahi is free software; you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as
7# published by the Free Software Foundation; either version 2 of the
8# License, or (at your option) any later version.
9#
10# avahi is distributed in the hope that it will be useful, but WITHOUT
11# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13# License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public
16# License along with avahi; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18# USA.
19
20FLAGS="--sysconfdir=/etc --localstatedir=/var --enable-tests --enable-compat-howl --enable-compat-libdns_sd"
21
22# Feel free to add your own custom flags in here -Lathiat
23
24case `uname -s` in
25    Darwin)
26    export LIBTOOLIZE=/opt/local/bin/glibtoolize
27    export CFLAGS="-I/opt/local/include"
28    export LDFLAGS="-L/opt/local/lib"
29    export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig"
30    FLAGS="$FLAGS --prefix=/opt/local --disable-pygtk"
31    ;;
32    FreeBSD)
33    cp /usr/local/share/aclocal/libtool15.m4 common
34    cp /usr/local/share/aclocal/pkg.m4 common
35    export LIBTOOLIZE=/usr/local/bin/libtoolize15
36    export CFLAGS="-I/usr/local/include"
37    export LDFLAGS="-L/usr/local/lib"
38    export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
39    FLAGS="$FLAGS --prefix=/opt/ --with-distro=none --disable-python --disable-dbus --disable-glib --disable-gtk"
40    ;;
41    NetBSD)
42    export LIBTOOLIZE=libtoolize
43    export CFLAGS="-I/usr/pkg/include"
44    export LDFLAGS="-L/usr/pkg/lib"
45    export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
46    FLAGS="$FLAGS --disable-monodoc --disable-mono --disable-qt3 --disable-qt4 --disable-xmltoman --prefix=/opt --with-distro=none --disable-python --disable-glib --disable-gtk --disable-manpages"
47    ;;
48    Linux)
49    ;;
50esac
51
52case "$USER" in
53    lathiat|trentl)
54    FLAGS="$FLAGS --disable-qt4"
55    ;;
56    sebest)
57    FLAGS="$FLAGS --disable-monodoc --enable-dbus=no --enable-mono=no --enable-qt3=no --enable-qt4=no  --sysconfdir=/etc --localstatedir=/var --prefix=/usr  --disable-manpages --disable-xmltoman"
58    ;;
59esac
60
61CFLAGS="$CFLAGS -g -O0" exec ./autogen.sh $FLAGS "$@" --enable-qt3=no
62