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

890 by Jim Nelson
#2267: Fixed configure script to work on FreeBSD (and other Unices) where bash in not installed in /bin.
1
#!/usr/bin/env bash
112 by Adam Dingle
Various pre-release fixes.
2
#
1335 by Eric Gregory
#3065 crank it up to 2011
3
# Copyright 2009-2011 Yorba Foundation
112 by Adam Dingle
Various pre-release fixes.
4
#
5
# This software is licensed under the GNU LGPL (version 2.1 or later).
6
# See the COPYING file in this distribution. 
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
7
137 by Jim Nelson
#441: Ubuntu packaging. #460: Cross-compilation under Launchpad. #461: Man page. #462: Debian menu file.
8
CONFIG_IN=configure.mk
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
9
10
configure_help() {
11
    printf "\nUsage:\n"
12
    printf "\t./configure [OPTIONS]...\n"
13
    printf "\n"
14
    printf "Options:\n"
15
    printf "\t-h, --help\t\tPrint this help and exit.\n"
1633 by Clint Rogers
Altered configure and Makefile to support automatic testing.
16
    printf "\t--enable-tests\t\tEnable Shotwell to run automated tests.\n"
125 by Jim Nelson
#426: Parallel builds now supported.
17
    printf "\t--assume-pkgs\t\tTurn off package version checking.\n"
18
    printf "\t--build=DIR\t\tBuild secondary files in DIR.\n"
138 by Jim Nelson
#464: Makefile no longer broken for incremental builds (hard-tab empty command fix). #451: --debug | --release
19
    printf "\t--debug | --release\tBuild executable for debugging or release.\n"
20
    printf "\t\t\t\t[--release]\n"
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
21
    printf "\t--prefix=PREFIX\t\tPrepend PREFIX to program installation paths.\n"
105 by Jim Nelson
#289: Check dependency versions, using Intrepid as base build system. Vala 0.7.3 required, however.
22
    printf "\t\t\t\t[/usr/local]\n"
1557 by Lucas Beeler
Fixes a quibble one of the Fedora guys mentioned with the way we were naming the system library directory name option in our configure script. Re-closes #3421.
23
    printf "\t--lib=LIBNAME\t\tSet system library directory name to LIBNAME\n\t\t\t\t(usually 'lib' or 'lib64').\n"
1551 by Lucas Beeler
Allows configuring the name of the system library directory at build time. Closes #3421.
24
    printf "\t\t\t\t[lib]\n"
149 by Jim Nelson
Added instrumentation to Photo pixbuf pipeline to measure absolute time of each stage. Also added feature to
25
    printf "\t--define=SYMBOL\t\tDefine a symbol for the Vala compiler.\n"
1835 by Jim Nelson
Exclude installation of gsettings-data-convert file: #4102
26
    printf "\n\n"
27
    printf "\t--disable-schemas-compile\n"
28
    printf "\t\t\t\tDisable compiling the GSettings schema.\n"
29
    printf "\t--disable-gsettings-convert-install\n"
30
    printf "\t\t\t\tDisable installing the gsettings-data-convert file.\n"
289 by Jim Nelson
Updated configure script (with appropriate changes in Makefile) to assist packagers. From Joeny Ang.
31
    printf "\t--disable-desktop-update\n"
32
    printf "\t\t\t\tDisable desktop database update.\n"
33
    printf "\t--disable-icon-update\n"
34
    printf "\t\t\t\tDisable icon cache update.\n"
598 by Allison Barlow
#1530 allows Shotwell to build using Glade dialogs. TextEntryDialog is the working example.
35
    printf "\t--enable-build-for-glade\n"
36
    printf "\t\t\t\tEnable build for Glade-related development.\n"
1004 by Jim Nelson
#1143: First cut of Mallard documentation, courtesy Robert Ancell and Peter DO Smith.
37
    printf "\t--disable-help-install\n"
38
    printf "\t\t\t\tDisable installation of online help.\n"
1458 by Jim Nelson
#3284: Created shotwell-publishing-extras, which holds the Yandex.Fotki connector.
39
    printf "\t--disable-extra-plugins-install\n"
1709 by Lucas Beeler
Closes #1958.
40
    printf "\t\t\t\tDisable installation of extra (non-core) plugins.\n"
1371 by Jim Nelson
#3160: Plugin headers and VAPI files are now installable. Must be enabled with the configure script. A .pc file is also installed. #2535: Now that all valac warnings have been eliminated and we require Vala 0.10.0 or above, added --fatal-warnings option to Makefile. #3167: Fixed "unreachable catch clause" build warning. Also added sample plugin to source tree.
41
    printf "\t--install-headers\n"
42
    printf "\t\t\t\tInstall headers and VAPI files (developers only).\n"
1798 by Jonas Bushart
Adds the ability for Shotwell to interoperate with the Ubuntu Unity launcher progress bar. Closes #3992.
43
    printf "\t--unity-support\n"
44
    printf "\t\t\t\tEnable support for progress bars in the Unity launcher.\n"
105 by Jim Nelson
#289: Check dependency versions, using Intrepid as base build system. Vala 0.7.3 required, however.
45
    printf "\n"
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
46
}
47
48
abort() {
49
    printf "%s: Invalid argument %s\n" $0 $1
50
    configure_help
51
    exit 1
52
}
53
54
while [ $# != 0 ]
55
do
56
    option=`echo $1 | sed 's/=.*//'`
57
    if [ `echo $1 | grep '='` ]
58
    then
59
        value=`echo $1 | sed 's/.*=//'`
60
    fi
61
62
    case $option in
63
        -h | --help)        configure_help
64
                            exit 0
65
                            ;;
66
        
67
        --prefix)           if [ ! $value ]
68
                            then
69
                                abort $1
70
                            fi
71
                            
72
                            variables="${variables}PREFIX=$value\n"
73
                            ;;
1551 by Lucas Beeler
Allows configuring the name of the system library directory at build time. Closes #3421.
74
1557 by Lucas Beeler
Fixes a quibble one of the Fedora guys mentioned with the way we were naming the system library directory name option in our configure script. Re-closes #3421.
75
        --lib)              if [ ! $value ]
1551 by Lucas Beeler
Allows configuring the name of the system library directory at build time. Closes #3421.
76
                            then
77
                                abort $1
78
                            fi
79
                            
80
                            variables="${variables}LIB=$value\n"
81
                            ;;
82
105 by Jim Nelson
#289: Check dependency versions, using Intrepid as base build system. Vala 0.7.3 required, however.
83
        --assume-pkgs)      variables="${variables}ASSUME_PKGS=1\n"
84
                            ;;
125 by Jim Nelson
#426: Parallel builds now supported.
85
        
86
        --build)            if [ ! $value ]
87
                            then
88
                                abort $1
89
                            fi
90
                            
91
                            variables="${variables}BUILD_DIR=$value\n"
92
                            ;;
138 by Jim Nelson
#464: Makefile no longer broken for incremental builds (hard-tab empty command fix). #451: --debug | --release
93
        
94
        --debug)            variables="${variables}BUILD_RELEASE=\nBUILD_DEBUG=1\n"
95
                            ;;
96
        
97
        --release)          variables="${variables}BUILD_DEBUG=\nBUILD_RELEASE=1\n"
98
                            ;;
149 by Jim Nelson
Added instrumentation to Photo pixbuf pipeline to measure absolute time of each stage. Also added feature to
99
        
251.1.29 by Jim Nelson
Some changes to help package managers -- mkdir -p on every directory during install (think DESTDIR) and
100
        --define)           variables="${variables}USER_VALAFLAGS+=--define=$value\n"
149 by Jim Nelson
Added instrumentation to Photo pixbuf pipeline to measure absolute time of each stage. Also added feature to
101
                            ;;
289 by Jim Nelson
Updated configure script (with appropriate changes in Makefile) to assist packagers. From Joeny Ang.
102
                            
1833 by Vincent Untz
No longer need to install or compile GConf schemas. Courtesy Vincent Untz.
103
        --disable-schemas-compile)        variables="${variables}DISABLE_SCHEMAS_COMPILE=1\n"
289 by Jim Nelson
Updated configure script (with appropriate changes in Makefile) to assist packagers. From Joeny Ang.
104
                                          ;;
1835 by Jim Nelson
Exclude installation of gsettings-data-convert file: #4102
105
        
106
        --disable-gsettings-convert-install)    variables="${variables}DISABLE_GSETTINGS_CONVERT_INSTALL=1\n"
107
                                                ;;
108
        
289 by Jim Nelson
Updated configure script (with appropriate changes in Makefile) to assist packagers. From Joeny Ang.
109
        --disable-desktop-update)         variables="${variables}DISABLE_DESKTOP_UPDATE=1\n"
110
                                          ;;
111
112
        --disable-icon-update)            variables="${variables}DISABLE_ICON_UPDATE=1\n"
113
                                          ;;
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
114
1004 by Jim Nelson
#1143: First cut of Mallard documentation, courtesy Robert Ancell and Peter DO Smith.
115
        --enable-build-for-glade)         variables="${variables}ENABLE_BUILD_FOR_GLADE=1\n"
116
                                          ;;
1633 by Clint Rogers
Altered configure and Makefile to support automatic testing.
117
        --enable-tests)                   variables="${variables}ENABLE_TESTS=1\n"
118
                                          ;;
1004 by Jim Nelson
#1143: First cut of Mallard documentation, courtesy Robert Ancell and Peter DO Smith.
119
        --disable-help-install)           variables="${variables}DISABLE_HELP_INSTALL=1\n"
598 by Allison Barlow
#1530 allows Shotwell to build using Glade dialogs. TextEntryDialog is the working example.
120
                                          ;;
1458 by Jim Nelson
#3284: Created shotwell-publishing-extras, which holds the Yandex.Fotki connector.
121
        --disable-extra-plugins-install)  variables="${variables}DISABLE_EXTRA_PLUGINS_INSTALL=1\n"
122
                                          ;;
123
        
1371 by Jim Nelson
#3160: Plugin headers and VAPI files are now installable. Must be enabled with the configure script. A .pc file is also installed. #2535: Now that all valac warnings have been eliminated and we require Vala 0.10.0 or above, added --fatal-warnings option to Makefile. #3167: Fixed "unreachable catch clause" build warning. Also added sample plugin to source tree.
124
        --install-headers)                variables="${variables}INSTALL_HEADERS=1\n"
125
                                          ;;
126
        
1798 by Jonas Bushart
Adds the ability for Shotwell to interoperate with the Ubuntu Unity launcher progress bar. Closes #3992.
127
        --unity-support)                  variables="${variables}UNITY_SUPPORT=1\n"
128
                                          ;;
129
        
138 by Jim Nelson
#464: Makefile no longer broken for incremental builds (hard-tab empty command fix). #451: --debug | --release
130
        *)                  if [ ! $value ]
131
                            then
132
                                abort $1
133
                            fi
134
                            
135
                            variables="${variables}${option}=${value}\n"
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
136
                            ;;
137
    esac
138
    
139
    shift
140
done
141
142
rm -f $CONFIG_IN
143
if [ $variables ]
144
then
251.1.29 by Jim Nelson
Some changes to help package managers -- mkdir -p on every directory during install (think DESTDIR) and
145
    echo -e -n $variables > $CONFIG_IN
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
146
fi
137 by Jim Nelson
#441: Ubuntu packaging. #460: Cross-compilation under Launchpad. #461: Man page. #462: Debian menu file.
147
echo "CONFIG_IN=${CONFIG_IN}" >> $CONFIG_IN
72 by Jim Nelson
#296: Now with configure script to set installation prefix. Also, moved all .ui files into separate directory. Shotwell determines whether to use local or installed resources files at runtime.
148
149
printf "Configured.  Type 'make' to build, 'make install' to install.\n"