~online-accounts/online-accounts-shotwell/trunk

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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/usr/bin/env bash
#
# Copyright 2009-2011 Yorba Foundation
#
# This software is licensed under the GNU LGPL (version 2.1 or later).
# See the COPYING file in this distribution. 

CONFIG_IN=configure.mk

configure_help() {
    printf "\nUsage:\n"
    printf "\t./configure [OPTIONS]...\n"
    printf "\n"
    printf "Options:\n"
    printf "\t-h, --help\t\tPrint this help and exit.\n"
    printf "\t--enable-tests\t\tEnable Shotwell to run automated tests.\n"
    printf "\t--assume-pkgs\t\tTurn off package version checking.\n"
    printf "\t--build=DIR\t\tBuild secondary files in DIR.\n"
    printf "\t--debug | --release\tBuild executable for debugging or release.\n"
    printf "\t\t\t\t[--release]\n"
    printf "\t--prefix=PREFIX\t\tPrepend PREFIX to program installation paths.\n"
    printf "\t\t\t\t[/usr/local]\n"
    printf "\t--lib=LIBNAME\t\tSet system library directory name to LIBNAME\n\t\t\t\t(usually 'lib' or 'lib64').\n"
    printf "\t\t\t\t[lib]\n"
    printf "\t--define=SYMBOL\t\tDefine a symbol for the Vala compiler.\n"
    printf "\n\n"
    printf "\t--disable-schemas-compile\n"
    printf "\t\t\t\tDisable compiling the GSettings schema.\n"
    printf "\t--disable-gsettings-convert-install\n"
    printf "\t\t\t\tDisable installing the gsettings-data-convert file.\n"
    printf "\t--disable-desktop-update\n"
    printf "\t\t\t\tDisable desktop database update.\n"
    printf "\t--disable-icon-update\n"
    printf "\t\t\t\tDisable icon cache update.\n"
    printf "\t--enable-build-for-glade\n"
    printf "\t\t\t\tEnable build for Glade-related development.\n"
    printf "\t--disable-help-install\n"
    printf "\t\t\t\tDisable installation of online help.\n"
    printf "\t--disable-extra-plugins-install\n"
    printf "\t\t\t\tDisable installation of extra (non-core) plugins.\n"
    printf "\t--install-headers\n"
    printf "\t\t\t\tInstall headers and VAPI files (developers only).\n"
    printf "\t--unity-support\n"
    printf "\t\t\t\tEnable support for progress bars in the Unity launcher.\n"
    printf "\n"
}

abort() {
    printf "%s: Invalid argument %s\n" $0 $1
    configure_help
    exit 1
}

while [ $# != 0 ]
do
    option=`echo $1 | sed 's/=.*//'`
    if [ `echo $1 | grep '='` ]
    then
        value=`echo $1 | sed 's/.*=//'`
    fi

    case $option in
        -h | --help)        configure_help
                            exit 0
                            ;;
        
        --prefix)           if [ ! $value ]
                            then
                                abort $1
                            fi
                            
                            variables="${variables}PREFIX=$value\n"
                            ;;

        --lib)              if [ ! $value ]
                            then
                                abort $1
                            fi
                            
                            variables="${variables}LIB=$value\n"
                            ;;

        --assume-pkgs)      variables="${variables}ASSUME_PKGS=1\n"
                            ;;
        
        --build)            if [ ! $value ]
                            then
                                abort $1
                            fi
                            
                            variables="${variables}BUILD_DIR=$value\n"
                            ;;
        
        --debug)            variables="${variables}BUILD_RELEASE=\nBUILD_DEBUG=1\n"
                            ;;
        
        --release)          variables="${variables}BUILD_DEBUG=\nBUILD_RELEASE=1\n"
                            ;;
        
        --define)           variables="${variables}USER_VALAFLAGS+=--define=$value\n"
                            ;;
                            
        --disable-schemas-compile)        variables="${variables}DISABLE_SCHEMAS_COMPILE=1\n"
                                          ;;
        
        --disable-gsettings-convert-install)    variables="${variables}DISABLE_GSETTINGS_CONVERT_INSTALL=1\n"
                                                ;;
        
        --disable-desktop-update)         variables="${variables}DISABLE_DESKTOP_UPDATE=1\n"
                                          ;;

        --disable-icon-update)            variables="${variables}DISABLE_ICON_UPDATE=1\n"
                                          ;;

        --enable-build-for-glade)         variables="${variables}ENABLE_BUILD_FOR_GLADE=1\n"
                                          ;;
        --enable-tests)                   variables="${variables}ENABLE_TESTS=1\n"
                                          ;;
        --disable-help-install)           variables="${variables}DISABLE_HELP_INSTALL=1\n"
                                          ;;
        --disable-extra-plugins-install)  variables="${variables}DISABLE_EXTRA_PLUGINS_INSTALL=1\n"
                                          ;;
        
        --install-headers)                variables="${variables}INSTALL_HEADERS=1\n"
                                          ;;
        
        --unity-support)                  variables="${variables}UNITY_SUPPORT=1\n"
                                          ;;
        
        *)                  if [ ! $value ]
                            then
                                abort $1
                            fi
                            
                            variables="${variables}${option}=${value}\n"
                            ;;
    esac
    
    shift
done

rm -f $CONFIG_IN
if [ $variables ]
then
    echo -e -n $variables > $CONFIG_IN
fi
echo "CONFIG_IN=${CONFIG_IN}" >> $CONFIG_IN

printf "Configured.  Type 'make' to build, 'make install' to install.\n"