~cszikszoy/do-plugins/pastebin

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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
AC_PREREQ(2.61)
AC_INIT([Do-plugins],[0.3.0])

AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AM_MAINTAINER_MODE

AC_PROG_INSTALL

dnl pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
        AC_MSG_ERROR([You need to install pkg-config])
fi

dnl Handle various possible C# compilers
AC_PATH_PROG(CSC, csc, no)
AC_PATH_PROG(GMCS, gmcs, no)
AC_PATH_PROG(RUNTIME, mono, no)
CS="C#"

if test "x$CSC" = "xno" ; then
        if test "x$GMCS" = "xno" ; then
                if test "x$MCS" = "xno" ; then
                        AC_MSG_ERROR([No $CS compiler found])
                else
                        CSC=$MCS
                        ENABLE_DBUS="no"
                fi
        else
                CSC=$GMCS
        fi
fi

AC_SUBST(CSC)
AC_SUBST(RUNTIME)

dnl - Check dependencies

PKG_CHECK_MODULES([DO_ADDINS], [do.addins])
PKG_CHECK_MODULES([DO_DBUS], [do.dbus])

AC_SUBST(DO_ADDINS_LIBS)
AC_SUBST(DO_DBUS_LIBS)


dnl - Evolution plugin

AC_ARG_ENABLE([evolution-plugin],
	AS_HELP_STRING([--enable-evolution-plugin],[Enable the Evolution plugin]),
	enable_evo_plugin=$enableval,
	enable_evo_plugin=yes)

if test "x$enable_evo_plugin" = "xyes" ; then
PKG_CHECK_MODULES([EVOLUTION_SHARP],
		  [evolution-sharp],
		  has_evo_deps=yes,
		  has_evo_deps=no)
AC_SUBST(EVOLUTION_SHARP_LIBS)
fi

if test "x$has_evo_deps" != "xyes" ; then
	if test "x$enable_evo_plugin" = "xyes" ; then
		dnl Error out if explicitly asked for the Evolution plugin
		AC_MSG_ERROR([Could not find evolution-sharp])
	fi
	enable_evo_plugin="no"
else
	if test "x$enable_evo_plugin" != "xyes" ; then
		enable_evo_plugin="no"
	fi
fi

AM_CONDITIONAL(ENABLE_EVO_PLUGIN, test "x$enable_evo_plugin" = "xyes")

dnl - Amarok plugin
AC_ARG_ENABLE([amarok-plugin],
	AS_HELP_STRING([--enable-amarok-plugin],[Enable the Amarok plugin]),
	enable_amarok_plugin=$enableval,
	enable_amarok_plugin=yes)

AM_CONDITIONAL(ENABLE_AMAROK_PLUGIN, test "x$enable_amarok_plugin" = "xyes")

dnl - OpenSearch plugin
AC_ARG_ENABLE([opensearch-plugin],
	AS_HELP_STRING([--enable-opensearch-plugin],[Enable the OpenSearch plugin]),
	enable_opensearch_plugin=$enableval,
	enable_opensearch_plugin=yes)

AM_CONDITIONAL(ENABLE_OPENSEARCH_PLUGIN, 
               test "x$enable_opensearch_plugin" = "xyes")

dnl - Pastebin plugin
AC_ARG_ENABLE([pastebin-plugin],
	AS_HELP_STRING([--enable-pastebin-plugin],[Enable the Pastebin plugin]),
	enable_pastebin_plugin=$enableval,
	enable_pastebin_plugin=yes)

AM_CONDITIONAL(ENABLE_PASTEBIN_PLUGIN, test "x$enable_pastebin_plugin" = "xyes")

dnl - Banshee plugin
AC_ARG_ENABLE([banshee-plugin],
	AS_HELP_STRING([--enable-banshee-plugin],[Enable the Banshee plugin]),
	enable_banshee_plugin=$enableval,
	enable_banshee_plugin=yes)

if test "x$enable_banshee_plugin" = "xyes" ; then
PKG_CHECK_MODULES([NDESK_DBUS],
		  [ndesk-dbus-1.0 ndesk-dbus-glib-1.0],
		  has_banshee_deps=yes,
		  has_banshee_deps=no)
AC_SUBST(NDESK_DBUS_LIBS)
fi

if test "x$has_banshee_deps" != "xyes" ; then
	if test "x$enable_banshee_plugin" = "xyes" ; then
		dnl Error out if explicitly asked for the BANSHEE plugin
		AC_MSG_ERROR([Could not find ndesk-dbus or ndesk-dbus-glib])
	fi
	enable_banshee_plugin="no"
else
	if test "x$enable_banshee_plugin" != "xyes" ; then
		enable_banshee_plugin="no"
	fi
fi

AM_CONDITIONAL(ENABLE_BANSHEE_PLUGIN, test "x$enable_banshee_plugin" = "xyes")


dnl - SSH plugin
AC_ARG_ENABLE([ssh-plugin],
	AS_HELP_STRING([--enable-ssh-plugin],[Enable the SSH plugin]),
	enable_ssh_plugin=$enableval,
	enable_ssh_plugin=yes)

if test "x$enable_ssh_plugin" = "xyes" ; then
PKG_CHECK_MODULES([GCONF_SHARP],
		  [gconf-sharp-2.0],
		  has_ssh_deps=yes,
		  has_ssh_deps=no)
AC_SUBST(GCONF_SHARP_LIBS)
fi

if test "x$has_ssh_deps" != "xyes" ; then
	if test "x$enable_ssh_plugin" = "xyes" ; then
		dnl Error out if explicitly asked for the SSH plugin
		AC_MSG_ERROR([Could not find gconf-sharp-2.0])
	fi
	enable_ssh_plugin="no"
else
	if test "x$enable_ssh_plugin" != "xyes" ; then
		enable_ssh_plugin="no"
	fi
fi

AM_CONDITIONAL(ENABLE_SSH_PLUGIN, test "x$enable_ssh_plugin" = "xyes")

dnl - Launchpad plugin
AC_ARG_ENABLE([launchpad-plugin],
	AS_HELP_STRING([--enable-launchpad-plugin],[Enable the Launchpad plugin]),
	enable_launchpad_plugin=$enableval,
	enable_launchpad_plugin=yes)

AM_CONDITIONAL(ENABLE_LAUNCHPAD_PLUGIN, test "x$enable_launchpad_plugin" = "xyes")

dnl Plugin install paths

AC_ARG_WITH(plugindir, 
            AS_HELP_STRING([--with-plugindir=DIR],[Plugin install path [$datadir/gnome-do/plugins]]),
            [plugindir="$withval"], 
	    [plugindir="$datadir/gnome-do/plugins"])

AC_SUBST(plugindir)

CSFLAGS=

AC_SUBST(CSFLAGS)

AC_CONFIG_FILES([
	Makefile
	GNOME-Session/Makefile
	Evolution/Makefile
	Evolution/src/Makefile
	Epiphany/Makefile
	Amarok/Makefile
	Rhythmbox/Makefile
	Rhythmbox/src/Makefile
	Pidgin/Makefile
	Pidgin/src/Makefile
	LocateFiles/Makefile
	Thunderbird/Makefile
	Thunderbird/src/Makefile
	GoogleCalculator/Makefile
	OpenSearch/Makefile
	OpenSearch/src/Makefile
	Pastebin/Makefile
	Pastebin/src/Makefile
	SimplePlugins/Makefile
	Templates/Makefile
	Banshee/Makefile
	Banshee/src/Makefile
	SSH/Makefile
	File/Makefile
	Launchpad/Makefile
	Launchpad/src/Makefile
])

AC_OUTPUT