|
1 # HG changeset patch |
|
2 # Parent 9dbc874e6cf72a133e8568ae28fd254c6028d60a |
|
3 [work-in-progress] Add possibility to build with CMake |
|
4 |
|
5 diff -r 9dbc874e6cf7 .hgignore |
|
6 --- a/.hgignore Fri Jul 20 17:29:26 2012 +0300 |
|
7 +++ b/.hgignore Fri Jul 20 17:29:52 2012 +0300 |
|
8 @@ -34,3 +34,5 @@ |
|
9 tags |
|
10 mcabber/ptodo |
|
11 mcabber/ppatches |
|
12 + |
|
13 +mcabber/build |
|
14 diff -r 9dbc874e6cf7 mcabber/CMakeLists.txt |
|
15 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
16 +++ b/mcabber/CMakeLists.txt Fri Jul 20 17:29:52 2012 +0300 |
|
17 @@ -0,0 +1,296 @@ |
|
18 +## Copyright 2010-2012 Myhailo Danylenko |
|
19 +# This file is part of mcabber. |
|
20 +# |
|
21 +# mcabber is free software: you can redistribute it and/or modify |
|
22 +# it under the terms of the GNU General Public License as published by |
|
23 +# the Free Software Foundation, either version 2 of the License, or |
|
24 +# (at your option) any later version. |
|
25 +# |
|
26 +# This program is distributed in the hope that it will be useful, |
|
27 +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
28 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
29 +# GNU General Public License for more details. |
|
30 +# |
|
31 +# You should have received a copy of the GNU General Public License |
|
32 +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
33 + |
|
34 +cmake_minimum_required ( VERSION 2.6 ) |
|
35 +project ( mcabber C ) |
|
36 +set ( PROJECT_VERSION "0.10.2-dev" ) |
|
37 + |
|
38 +## User settable options |
|
39 +option ( ENABLE_DEBUG "Enable debugging output" OFF ) # XXX is it really used? |
|
40 +option ( USE_SIGWINCH "Compile with SIGWINCH handler" OFF ) |
|
41 +option ( XEP0022 "Enable obsolete Message Events (XEP-0022)" OFF ) # + XEP0085? |
|
42 +option ( MODULES_ENABLE "Enable dynamic module loading" ON ) |
|
43 +option ( WANT_LIBIDN "Compile with libidn support" ON ) |
|
44 +option ( WANT_GPGME "Compile with PGP support (libgpgme required)" ON ) |
|
45 +option ( WANT_OTR "Compile with OTR support" OFF ) |
|
46 +option ( WANT_ENCHANT "Use enchant for spell-checking" OFF ) |
|
47 +option ( WANT_ASPELL "Use aspell for spell-checking" OFF ) |
|
48 +option ( ENABLE_HGCSET "Report hg changeset in version string" OFF ) |
|
49 + |
|
50 +# FIXME |
|
51 +set ( DATA_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Path to data files" ) |
|
52 +set ( PKGLIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" CACHE PATH "Path to modules" ) |
|
53 + |
|
54 +set ( MCABBER_BRANCH "experimental" ) |
|
55 +set ( MCABBER_VERSION ${PROJECT_VERSION} ) |
|
56 + |
|
57 +## Check for build dependencies |
|
58 +find_package(PkgConfig REQUIRED) |
|
59 + |
|
60 +# Standard includes |
|
61 +include ( CheckIncludeFiles ) |
|
62 +check_include_files ( "wctype.h" HAVE_WCTYPE_H ) |
|
63 +check_include_files ( "localcharset.h" HAVE_LOCALCHARSET_H ) |
|
64 +# Standard functions |
|
65 +include ( CheckSymbolExists ) |
|
66 +check_symbol_exists ( arc4random "stdlib.h" HAVE_ARC4RANDOM ) |
|
67 +check_symbol_exists ( iswblank "wctype.h" HAVE_ISWBLANK ) |
|
68 +set ( CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE ) |
|
69 +check_symbol_exists ( strcasestr "string.h" HAVE_STRCASESTR ) |
|
70 +set ( CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE ) |
|
71 +check_symbol_exists ( wcwidth "wchar.h" HAVE_WCHAR_H ) # TODO change to HAVE_WCWIDTH (used @utf8.h) |
|
72 +check_symbol_exists ( timezone "time.h" HAVE_TIMEZONE ) |
|
73 +# Types |
|
74 +include ( CheckStructHasMember ) |
|
75 +check_struct_has_member ( "struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF ) |
|
76 + |
|
77 +# Glib |
|
78 +pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.14.0 ) |
|
79 +if ( MODULES_ENABLE ) |
|
80 + pkg_check_modules ( GMODULE REQUIRED gmodule-2.0 ) |
|
81 +endif () |
|
82 + |
|
83 +# Loudmouth |
|
84 +pkg_check_modules ( LM REQUIRED loudmouth-1.0>=1.4.2 ) |
|
85 +set ( CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS} ) |
|
86 +set ( CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES} ) |
|
87 +set ( CMAKE_REQUIRESD_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS} ) |
|
88 +check_symbol_exists ( lm_connection_unregister_reply_handler "loudmouth/loudmouth.h" HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER ) |
|
89 + |
|
90 +# Libidn |
|
91 +if ( WANT_LIBIDN ) |
|
92 + pkg_check_modules ( LIBIDN libidn ) |
|
93 + if ( LIBIDN_FOUND ) |
|
94 + set ( HAVE_LIBIDN TRUE ) |
|
95 + endif () |
|
96 +endif () |
|
97 + |
|
98 +# Ncursesw / Ncurses / Curses |
|
99 +pkg_check_modules ( CURSES ncursesw ) |
|
100 +if ( CURSES_FOUND ) |
|
101 + pkg_check_modules ( PANEL REQUIRED panelw ) |
|
102 + set ( HAVE_UNICODE TRUE ) |
|
103 +else() |
|
104 + pkg_check_modules ( CURSES ncurses ) |
|
105 + if ( CURSES_FOUND ) |
|
106 + pkg_check_modules ( PANEL REQUIRED panel ) |
|
107 + set ( HAVE_UNICODE FALSE ) |
|
108 + else () |
|
109 + find_package ( Curses ) |
|
110 + # XXX just fail? |
|
111 + endif () |
|
112 +endif () |
|
113 +set ( CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIRS} ) |
|
114 +set ( CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARIES} ) |
|
115 +set ( CMAKE_REQUIRED_FLAGS ${CURSES_LDFLAGS} ${CURSES_CFLAGS} ) |
|
116 +check_symbol_exists ( ESCDELAY "curses.h" HAVE_ESCDELAY ) |
|
117 + |
|
118 +# Gpgme |
|
119 +if ( WANT_GPGME ) |
|
120 + find_program ( GPGME_CONFIG_EXECUTABLE gpgme-config DOC "Path to gpgme-config executable" ) |
|
121 + if ( GPGME_CONFIG_EXECUTABLE ) |
|
122 + execute_process ( COMMAND ${GPGME_CONFIG_EXECUTABLE} --libs OUTPUT_VARIABLE GPGME_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE ) |
|
123 + execute_process ( COMMAND ${GPGME_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE GPGME_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ) |
|
124 + set ( HAVE_GPGME TRUE ) |
|
125 + endif () |
|
126 +endif () |
|
127 + |
|
128 +# Libotr |
|
129 +if ( WANT_OTR ) |
|
130 + pkg_check_modules ( LIBOTR libotr ) |
|
131 + if ( LIBOTR_FOUND ) |
|
132 + set ( HAVE_LIBOTR TRUE ) |
|
133 + endif () |
|
134 +endif () |
|
135 + |
|
136 +# Spellcheckers |
|
137 +if ( WANT_ENCHANT ) |
|
138 + pkg_check_modules ( ENCHANT enchant ) |
|
139 + if ( ENCHANT_FOUND ) |
|
140 + set ( WITH_ENCHANT TRUE ) |
|
141 + endif () |
|
142 +elseif ( WANT_ASPELL ) |
|
143 + find_package ( ASPELL ) |
|
144 + if ( ASPELL_FOUND ) |
|
145 + set ( WITH_ASPELL TRUE ) |
|
146 + endif () |
|
147 +endif () |
|
148 + |
|
149 +# LaTeX for guide |
|
150 +find_package ( LATEX ) |
|
151 +if ( PDFLATEX_COMPILER AND BIBTEX_COMPILER ) |
|
152 + set ( HAVE_LATEX TRUE ) |
|
153 +endif () |
|
154 + |
|
155 +## HG Changeset |
|
156 +if ( ENABLE_HGCSET ) |
|
157 + find_program ( HG_EXECUTABLE hg DOC "Path to hg (mercurial) to request changeset information" ) |
|
158 + if ( HG_EXECUTABLE ) |
|
159 + execute_process ( COMMAND hg identify --id OUTPUT_VARIABLE HGCSET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) |
|
160 + endif () |
|
161 +endif () |
|
162 + |
|
163 +link_directories ( ${GLIB_LIBRARY_DIRS} |
|
164 + ${GMODULE_LIBRARY_DIRS} |
|
165 + ${LM_LIBRARY_DIRS} |
|
166 + ${LIBIDN_LIBRARY_DIRS} |
|
167 + ${ENCHANT_LIBRARY_DIRS} |
|
168 + ${CURSES_LIBRARY_DIRS} |
|
169 + ${PANEL_LIBRARY_DIRS} |
|
170 + ${LIBOTR_LIBRARY_DIRS} ) |
|
171 + |
|
172 +## Define targets |
|
173 +set ( mcabber_SUBSYSTEMS |
|
174 + caps commands compl events hbuf help histolog hooks |
|
175 + modules nohtml otr pgp roster screen settings utf8 utils |
|
176 + xmpp xmpp_helper xmpp_iq xmpp_iqrequest xmpp_muc xmpp_s10n ) |
|
177 +if ( NOT MODULES_ENABLE ) |
|
178 + list ( APPEND mcabber_SUBSYSTEMS extcmd fifo ) |
|
179 +endif () |
|
180 +set ( mcabber_SOURCES |
|
181 + mcabber/api.h |
|
182 + mcabber/main.c |
|
183 + mcabber/logprint.h |
|
184 + mcabber/xmpp_defines.h |
|
185 + ${mcabber_BINARY_DIR}/include/mcabber/config.h |
|
186 + ${mcabber_BINARY_DIR}/include/mcabber/hgcset.h ) |
|
187 +foreach ( PART IN LISTS mcabber_SUBSYSTEMS ) |
|
188 + list ( APPEND mcabber_SOURCES mcabber/${PART}.c mcabber/${PART}.h ) |
|
189 +endforeach () |
|
190 +add_executable ( mcabber ${mcabber_SOURCES} ) |
|
191 + |
|
192 +if ( MODULES_ENABLE ) |
|
193 + add_library ( beep MODULE modules/beep/beep.c ) |
|
194 + add_library ( eventcmd MODULE modules/eventcmd/eventcmd.c mcabber/extcmd.c ) |
|
195 + add_library ( fifo MODULE modules/fifo/fifo_module.c mcabber/fifo.c ) |
|
196 + add_library ( urlregex MODULE modules/urlregex/urlregex.c ) |
|
197 + add_library ( xttitle MODULE modules/xttitle/xttitle.c ) |
|
198 +endif () |
|
199 + |
|
200 +## Compiler setup |
|
201 +configure_file ( config.h.in include/mcabber/config.h ) |
|
202 +configure_file ( hgcset.h.in include/mcabber/hgcset.h ) # TODO: eliminate |
|
203 +include_directories ( SYSTEM |
|
204 + ${GLIB_INCLUDE_DIRS} |
|
205 + ${GMODULE_INCLUDE_DIRS} |
|
206 + ${LM_INCLUDE_DIRS} |
|
207 + ${LIBIDN_INCLUDE_DIRS} |
|
208 + ${ENCHANT_INCLUDE_DIRS} |
|
209 + ${ASPELL_INCLUDE_DIR} |
|
210 + ${CURSES_INCLUDE_DIRS} |
|
211 + ${PANEL_INCLUDE_DIRS} |
|
212 + ${LIBOTR_INCLUDE_DIRS} ) |
|
213 +target_link_libraries ( mcabber |
|
214 + ${GLIB_LIBRARIES} |
|
215 + ${GMODULE_LIBRARIES} |
|
216 + ${LM_LIBRARIES} |
|
217 + ${LIBIDN_LIBRARIES} |
|
218 + ${ENCHANT_LIBRARIES} |
|
219 + ${ASPELL_LIBRARIES} |
|
220 + ${CURSES_LIBRARIES} |
|
221 + ${PANEL_LIBRARIES} |
|
222 + ${GPGME_LIBRARIES} |
|
223 + ${LIBOTR_LIBRARIES} ) |
|
224 +target_link_libraries ( fifo |
|
225 + ${GLIB_LIBRARIES} ) |
|
226 +target_link_libraries ( eventcmd |
|
227 + ${GLIB_LIBRARIES} ) |
|
228 +target_link_libraries ( xttitle |
|
229 + ${GLIB_LIBRARIES} ) |
|
230 +include_directories ( ${mcabber_SOURCE_DIR} |
|
231 + ${mcabber_BINARY_DIR}/include |
|
232 + ${mcabber_BINARY_DIR}/include/mcabber ) |
|
233 +set_target_properties ( mcabber PROPERTIES |
|
234 + COMPILE_FLAGS "-Wall ${GPGME_CFLAGS} -D_GNU_SOURCE" ) |
|
235 + |
|
236 +## Extra targets |
|
237 +if ( HAVE_LATEX ) |
|
238 + add_custom_command ( OUTPUT guide.aux |
|
239 + COMMAND ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null |
|
240 + DEPENDS doc/guide/guide.png doc/guide/guide.tex |
|
241 + WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide ) |
|
242 + add_custom_command ( OUTPUT guide.bbl |
|
243 + COMMAND BIBINPUTS=${mcabber_SOURCE_DIR}/doc/guide ${BIBTEX_COMPILER} guide >/dev/null |
|
244 + DEPENDS guide.aux doc/guide/guide.bib |
|
245 + WORKING_DIRECTORY ${mcabber_BINARY_DIR} ) |
|
246 + add_custom_command ( OUTPUT guide.pdf |
|
247 + COMMAND ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null |
|
248 + DEPENDS guide.bbl guide.aux doc/guide/guide.png doc/guide/guide.tex |
|
249 + WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide ) |
|
250 + add_custom_target ( guide ALL ${PDFLATEX_COMPILER} -output-directory=${mcabber_BINARY_DIR} guide >/dev/null |
|
251 + DEPENDS guide.pdf |
|
252 + WORKING_DIRECTORY ${mcabber_SOURCE_DIR}/doc/guide |
|
253 + SOURCES doc/guide/guide.bib doc/guide/guide.png doc/guide/guide.tex ) |
|
254 +endif () |
|
255 + |
|
256 +## Packaging information |
|
257 +set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
|
258 +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
|
259 +set(CPACK_PACKAGE_VENDOR "McKael") |
|
260 +set(CPACK_PACKAGE_CONTACT "Mikael BERTHE <mikael@lilotux.net>") |
|
261 +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Small Jabber (XMPP) console client") |
|
262 +set(CPACK_PACKAGE_DESCRIPTION_FILE ${mcabber_SOURCE_DIR}/README) |
|
263 +set(CPACK_RESOURCE_FILE_LICENSE ${mcabber_SOURCE_DIR}/COPYING) |
|
264 +set(CPACK_RESOURCE_FILE_README ${mcabber_SOURCE_DIR}/README) |
|
265 +set(CPACK_RESOURCE_FILE_WELCOME ${mcabber_SOURCE_DIR}/README) |
|
266 +set(CPACK_SOURCE_GENERATOR TBZ2) |
|
267 +set(CPACK_GENERATOR DEB CACHE STRING "Binary package generator, eg DEB, RPM, TGZ, NSIS...") |
|
268 +set(CPACK_DEBIAN_PACKAGE_SECTION libs) |
|
269 +# XXX: tmp=`tempfile`; obj=${mcabber_BINARY_DIR}/mcabber.so; ldd $obj > $tmp; objdump -p $obj | \grep NEEDED | sed -e 's/.*NEEDED *//' | xargs -I "{}" grep -F "{}" $tmp | sed -e 's/.*=> *\(\S*\).*/\1/' | xargs dpkg -S | cut -d : -f 1 | sort -u ; \rm $tmp |
|
270 +set(CPACK_DEBIAN_PACKAGE_DEPENDS "") |
|
271 +find_program(DPKG_EXECUTABLE dpkg) |
|
272 +if(DPKG_EXECUTABLE) |
|
273 + execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
274 +else() |
|
275 + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE STRING "Architecture of package") |
|
276 +endif() |
|
277 +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") |
|
278 +# XXX: Set package name directly to get rid of -Sources? |
|
279 +set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so") |
|
280 +include(CPack) |
|
281 + |
|
282 +## Preinstallation stuff |
|
283 +if ( MODULES_ENABLE ) |
|
284 + # build time variables (cflags) |
|
285 + configure_file ( mcabber.pc.in.in mcabber.pc.in @ONLY ) |
|
286 + # install time variables (paths) |
|
287 + install ( CODE "configure_file ( ${mcabber_BINARY_DIR}/mcabber.pc.in ${mcabber_BINARY_DIR}/mcabber.pc )" ) |
|
288 +endif () |
|
289 +# full executable path in menu entry |
|
290 +install ( CODE "configure_file ( ${mcabber_SOURCE_DIR}/mcabber.menu.in ${mcabber_BINARY_DIR}/mcabber.menu )" ) |
|
291 + |
|
292 +## Set up installer |
|
293 +install ( TARGETS mcabber DESTINATION bin ) |
|
294 +if ( MODULES_ENABLE ) |
|
295 + install ( DIRECTORY mcabber/ ${mcabber_BINARY_DIR}/include/mcabber/ DESTINATION include/mcabber FILES_MATCHING PATTERN "*.h" PATTERN ".*" EXCLUDE ) |
|
296 + install ( TARGETS beep eventcmd fifo urlregex xttitle DESTINATION lib/mcabber ) |
|
297 + install ( FILES ${mcabber_BINARY_DIR}/mcabber.pc DESTINATION lib/pkgconfig ) |
|
298 +endif () |
|
299 +install ( DIRECTORY doc/help DESTINATION share/mcabber FILES_MATCHING PATTERN "*.txt" ) |
|
300 +install ( FILES doc/mcabber.1 DESTINATION share/man/man1 ) |
|
301 +install ( FILES mcabber.desktop DESTINATION share/applications ) |
|
302 +install ( FILES ${mcabber_BINARY_DIR}/mcabber.menu DESTINATION share/menu RENAME mcabber ) |
|
303 +install ( FILES mcabberrc.example DESTINATION share/doc/${CPACK_PACKAGE_NAME}/examples ) |
|
304 +install ( FILES ChangeLog DESTINATION share/doc/${CPACK_PACKAGE_NAME} RENAME changelog ) |
|
305 +install ( FILES COPYING DESTINATION share/doc/${CPACK_PACKAGE_NAME} RENAME copyright ) |
|
306 +install ( FILES AUTHORS README TODO ChangeLog.api doc/HOWTO_modules.txt doc/README_PGP.txt DESTINATION share/doc/${CPACK_PACKAGE_NAME} ) |
|
307 +install ( DIRECTORY contrib DESTINATION share/doc/${CPACK_PACKAGE_NAME} ) |
|
308 +install ( FILES doc/mcabber.1.html doc/manpage.css DESTINATION share/doc/${CPACK_PACKAGE_NAME}/html ) |
|
309 +if ( HAVE_LATEX ) |
|
310 + install ( FILES ${mcabber_BINARY_DIR}/guide.pdf DESTINATION share/doc/${CPACK_PACKAGE_NAME} ) # :/ |
|
311 +endif () |
|
312 + |
|
313 +## The End ## vim: se ts=4 sw=4: ## |
|
314 diff -r 9dbc874e6cf7 mcabber/config.h.in |
|
315 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
316 +++ b/mcabber/config.h.in Fri Jul 20 17:29:52 2012 +0300 |
|
317 @@ -0,0 +1,49 @@ |
|
318 +/* help @help.c */ |
|
319 +#define DATA_DIR "@DATA_DIR@" |
|
320 +/* conditional @main.c */ /* does it have any effect really? */ |
|
321 +#cmakedefine ENABLE_DEBUG @ENABLE_DEBUG@ |
|
322 +/* conditional @main.c */ |
|
323 +#cmakedefine ENABLE_HGCSET @ENABLE_HGCSET@ |
|
324 +/* @xmpp.c */ |
|
325 +#cmakedefine HAVE_ARC4RANDOM @HAVE_ARC4RANDOM@ |
|
326 +/* @screen.c */ |
|
327 +#cmakedefine HAVE_ESCDELAY @HAVE_ESCDELAY@ |
|
328 +/* alot */ |
|
329 +#cmakedefine HAVE_GPGME @HAVE_GPGME@ |
|
330 +/* @utf8.h */ |
|
331 +#cmakedefine HAVE_ISWBLANK @HAVE_ISWBLANK@ |
|
332 +/* @utils.c */ |
|
333 +#cmakedefine HAVE_LIBIDN @HAVE_LIBIDN@ |
|
334 +/* alot */ |
|
335 +#cmakedefine HAVE_LIBOTR @HAVE_LIBOTR@ |
|
336 +/* @screen.c */ |
|
337 +#cmakedefine HAVE_LOCALCHARSET_H @HAVE_LOCALCHARSET_H@ |
|
338 +#cmakedefine HAVE_NCURSESW_NCURSES_H @HAVE_NCURSESW_NCURSES_H@ |
|
339 +#cmakedefine HAVE_NCURSES_NCURSES_H @HAVE_NCURSES_NCURSES_H@ |
|
340 +/* @utils */ |
|
341 +#cmakedefine HAVE_STRCASESTR @HAVE_STRCASESTR@ |
|
342 +/* utils, xmpp_iq */ |
|
343 +#cmakedefine HAVE_TIMEZONE @HAVE_TIMEZONE@ |
|
344 +#cmakedefine HAVE_TM_GMTOFF @HAVE_TM_GMTOFF@ |
|
345 +/* utils, main */ |
|
346 +#cmakedefine HAVE_UNICODE @HAVE_UNICODE@ |
|
347 +#cmakedefine HAVE_WCHAR_H @HAVE_WCHAR_H@ |
|
348 +#cmakedefine HAVE_WCTYPE_H @HAVE_WCTYPE_H@ |
|
349 +/* modules */ |
|
350 +#define MCABBER_BRANCH "@MCABBER_BRANCH@" |
|
351 +#define MCABBER_VERSION "@MCABBER_VERSION@" |
|
352 +#cmakedefine MODULES_ENABLE @MODULES_ENABLE@ |
|
353 +/* identification */ |
|
354 +#define PACKAGE_NAME "@PROJECT_NAME@" |
|
355 +#define PACKAGE_STRING "@PROJECT_NAME@ @PROJECT_VERSION@" |
|
356 +#define PACKAGE_VERSION "@PROJECT_VERSION@" |
|
357 +/* modules */ |
|
358 +#define PKGLIB_DIR "@PKGLIB_DIR@" |
|
359 +/* option */ |
|
360 +#cmakedefine USE_SIGWINCH @USE_SIGWINCH@ |
|
361 +/* spelling */ |
|
362 +#cmakedefine WITH_ASPELL @WITH_ASPELL@ |
|
363 +#cmakedefine WITH_ENCHANT @WITH_ENCHANT@ |
|
364 +/* option, also XEP0085? */ |
|
365 +#cmakedefine XEP0022 @XEP0022@ |
|
366 +/* end */ |
|
367 diff -r 9dbc874e6cf7 mcabber/configure.ac |
|
368 --- a/mcabber/configure.ac Fri Jul 20 17:29:26 2012 +0300 |
|
369 +++ b/mcabber/configure.ac Fri Jul 20 17:29:52 2012 +0300 |
|
370 @@ -36,9 +36,8 @@ |
|
371 |
|
372 # Checks for header files. |
|
373 AC_HEADER_STDC |
|
374 -AC_CHECK_HEADERS([arpa/inet.h fcntl.h locale.h netdb.h netinet/in.h stddef.h \ |
|
375 - stdlib.h string.h strings.h sys/socket.h sys/time.h \ |
|
376 - syslog.h termios.h wchar.h wctype.h localcharset.h]) |
|
377 +AC_CHECK_HEADERS([fcntl.h locale.h stdlib.h string.h sys/time.h \ |
|
378 + termios.h wchar.h wctype.h localcharset.h]) |
|
379 AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file])) |
|
380 AC_VAR_TIMEZONE_EXTERNALS |
|
381 |
|
382 @@ -59,10 +58,8 @@ |
|
383 AC_TYPE_SIGNAL |
|
384 AC_FUNC_STRFTIME |
|
385 AC_FUNC_VPRINTF |
|
386 -AC_CHECK_FUNCS([alarm arc4random bzero gethostbyname gethostname inet_ntoa \ |
|
387 - isascii memmove memset modf select setlocale socket strcasecmp \ |
|
388 - strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \ |
|
389 - iswblank]) |
|
390 +AC_CHECK_FUNCS([arc4random memset setlocale strcasecmp strchr strncasecmp \ |
|
391 + strrchr strstr strcasestr iswblank]) |
|
392 |
|
393 |
|
394 AC_CHECK_DECLS([strptime],,, |
|
395 diff -r 9dbc874e6cf7 mcabber/hgcset.h.in |
|
396 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
397 +++ b/mcabber/hgcset.h.in Fri Jul 20 17:29:52 2012 +0300 |
|
398 @@ -0,0 +1,3 @@ |
|
399 +/* this can go to config.h */ |
|
400 +#define HGCSET "@HGCSET@" |
|
401 +/* end */ |
|
402 diff -r 9dbc874e6cf7 mcabber/mcabber.menu.in |
|
403 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
404 +++ b/mcabber/mcabber.menu.in Fri Jul 20 17:29:52 2012 +0300 |
|
405 @@ -0,0 +1,2 @@ |
|
406 +?package(mcabber):needs="text" section="Applications/Network/Communication"\ |
|
407 + title="mcabber" command="@CMAKE_INSTALL_PREFIX@/bin/mcabber" |
|
408 diff -r 9dbc874e6cf7 mcabber/mcabber.pc.in.in |
|
409 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
410 +++ b/mcabber/mcabber.pc.in.in Fri Jul 20 17:29:52 2012 +0300 |
|
411 @@ -0,0 +1,14 @@ |
|
412 +prefix=${CMAKE_INSTALL_PREFIX} |
|
413 +exec_prefix=$${EMPTY}{prefix} |
|
414 +libdir=$${EMPTY}{prefix}/lib |
|
415 +includedir=$${EMPTY}{prefix}/include |
|
416 +datadir=@DATA_DIR@ |
|
417 +pkglibdir=@PKGLIB_DIR@ |
|
418 + |
|
419 +Name: MCabber |
|
420 +Description: Modular XMPP client |
|
421 +URL: http://mcabber.com |
|
422 +Requires.private: glib-2.0 gmodule-2.0 loudmouth-1.0 |
|
423 +Version: @PROJECT_VERSION@ |
|
424 +Libs: |
|
425 +Cflags: -I$${EMPTY}{includedir} @LIBOTR_CFLAGS@ @GPGME_CFLAGS@ |