aboutsummaryrefslogtreecommitdiffstats
path: root/polish/gnugadu/scripts/configure.gg
blob: 2d191c1c03c04c911d627192114e2f3cb8c2b50b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
# $FreeBSD$

if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then
    exit
fi

tempfile=`/usr/bin/mktemp -t checklist`

if [ "${BATCH}" ]; then
    if [ "${GNUGADU_OPTIONS}" ]; then
        set ${GNUGADU_OPTIONS}
    else
        set \"esd\"
    fi
else
    /usr/bin/dialog --title "gnugadu configuration options" --clear \
        --checklist "\n\
Please select desired options:" -1 -1 16 \
esd     "esd support" ON \
arts        "arts support" OFF \
gnome       "GNOME support" OFF \
panel       "GNOME applet support" OFF \
2> $tempfile

    retval=$?

    if [ -s $tempfile ]; then
        set `cat $tempfile`
    fi
    rm -f $tempfile

    case $retval in
        0)  if [ -z "$*" ]; then
                echo "Nothing selected"
            fi
            ;;
        1)  echo "Cancel pressed."
            exit 1
            ;;
    esac
fi

${MKDIR} ${WRKDIRPREFIX}${REALCURDIR}
exec > ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc

while [ "$1" ]; do
    case $1 in
        \"esd\")
            echo "USE_GNOME+=     esound"
            echo "CONFIGURE_ARGS+=  --enable-esd"
            esd="yes"
            ;;
        \"arts\")
            echo "CONFIGURE_ARGS+=  --enable-arts"
            echo "LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts"
            ;;
        \"gnome\")
            echo "USE_GNOME+=   gnomelibs"
            echo "CONFIGURE_ARGS+=  --enable-gnome"         
            ;;
        \"panel\")
            echo "USE_GNOME+=   gnomepanel"
            echo "CONFIGURE_ARGS+=  --enable-panel"
            ;;
        *)
            echo "Invalid option(s): $1" >&2
            rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
            exit 1
            ;;
    esac
    shift
done

if [ -z "${esd}" ]; then
    echo "CONFIGURE_ARGS+=  --disable-esd --without-esd"
fi