~compiz-team/compiz-core/compiz-core.fix_862719

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Dennis kasprzyk
  • Author(s): Dennis Kasprzyk
  • Date: 2008-10-06 17:11:30 UTC
  • Revision ID: git-v1:f235e2a766f344f426c6054b7e69a42b41c79e3b
Initial version of CMake build system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
project (compiz)
 
2
 
 
3
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 
4
include (cmake/base.cmake)
 
5
include (cmake/macros.cmake)
 
6
include (CheckFunctionExists)
 
7
 
 
8
set (CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;MinSizeRe" CACHE INTERNAL "" FORCE)
 
9
if (NOT CMAKE_BUILD_TYPE)
 
10
    set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
 
11
endif (NOT CMAKE_BUILD_TYPE)
 
12
 
 
13
# compiz package version number
 
14
# An odd micro number indicates in-progress development.
 
15
# An even micro number indicates a released version.
 
16
set (COMPIZ_VERSION_MAJOR 1)
 
17
set (COMPIZ_VERSION_MINOR 91)
 
18
set (COMPIZ_VERSION_MICRO 1)
 
19
set (VERSION ${COMPIZ_VERSION_MAJOR}.${COMPIZ_VERSION_MINOR}.${COMPIZ_VERSION_MICRO})
 
20
 
 
21
set (DECOR_INTERFACE_VERSION 20080901)
 
22
 
 
23
set (prefix ${CMAKE_INSTALL_PREFIX})
 
24
set (exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
 
25
set (libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
 
26
set (includedir ${CMAKE_INSTALL_PREFIX}/include)
 
27
set (datadir ${CMAKE_INSTALL_PREFIX}/share)
 
28
 
 
29
set (compiz_plugindir ${libdir}/compiz)
 
30
set (compiz_imagedir ${datadir}/compiz)
 
31
set (compiz_metadatadir ${datadir}/compiz)
 
32
 
 
33
set (ALL_LINGUAS af ar bg bn bn_IN bs ca cs cy da de el en_GB en_US es eu et fi fr gl gu he hi hr hu id it ja ka km ko lo lt mk mr nb nl or pa pl pt pt_BR ro ru sk sl sr sv ta tr uk vi xh zh_CN zh_TW zu)
 
34
set (GETTEXT_PACKAGE compiz)
 
35
 
 
36
find_package (Boost)
 
37
if (NOT Boost_FOUND OR Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 34)
 
38
    message (FATAL_ERROR "Boost version >= 1.34.0 needed")
 
39
endif (NOT Boost_FOUND OR Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 34)
 
40
 
 
41
set (COMPIZ_REQUIRES
 
42
    x11-xcb
 
43
    xrandr
 
44
    xinerama
 
45
    ice
 
46
    sm
 
47
    libxml-2.0
 
48
    libxslt
 
49
    libstartup-notification-1.0>=0.7
 
50
)
 
51
 
 
52
set (DECORATION_REQUIRES xrender)
 
53
 
 
54
pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
 
55
pkg_check_modules (LIBDECORATION REQUIRED ${DECORATION_REQUIRES})
 
56
 
 
57
set (COMPIZ_CFLAGS "${COMPIZ_CFLAGS} -I${Boost_INCLUDE_DIR}")
 
58
 
 
59
check_pkg_module (xrender>=0.9.3 HAVE_XRENDER_0_9_3)
 
60
 
 
61
set (USE_GTK 1 CACHE BOOL "Build gtk-window-decorator")
 
62
set (USE_METACITY 1 CACHE BOOL "Gtk-window-decorator metacity theme support")
 
63
set (USE_GNOME 1 CACHE BOOL "Gnome settings module")
 
64
set (USE_GNOME_KEYBINDINGS 1 CACHE BOOL "Gnome keybindings")
 
65
set (USE_GCONF 1 CACHE BOOL "Install GConf schemas")
 
66
 
 
67
if (USE_GCONF)
 
68
    pkg_check_modules (GCONF gconf-2.0)
 
69
 
 
70
    find_program (GCONFTOOL_EXECUTABLE gconftool-2)
 
71
    mark_as_advanced (FORCE GCONFTOOL_EXECUTABLE)
 
72
 
 
73
    if (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
 
74
        set (USE_GCONF 0)
 
75
    endif (NOT GCONF_FOUND OR NOT GCONFTOOL_EXECUTABLE)
 
76
endif (USE_GCONF)
 
77
 
 
78
if (USE_GTK)
 
79
    pkg_check_modules (GTK_WINDOW_DECORATOR
 
80
        xrender>=0.8.4
 
81
        gtk+-2.0>=2.8.0
 
82
        libwnck-1.0
 
83
        pangocairo
 
84
    )
 
85
    if (GTK_WINDOW_DECORATOR_FOUND)
 
86
        set (CMAKE_REQUIRED_FLAGS ${GTK_WINDOW_DECORATOR_CFLAGS})
 
87
        set (CMAKE_REQUIRED_LIBRARIES ${GTK_WINDOW_DECORATOR_LIBRARIES})
 
88
        check_function_exists (wnck_window_has_name HAVE_WNCK_WINDOW_HAS_NAME)
 
89
        set (CMAKE_REQUIRED_FLAGS "")
 
90
        set (CMAKE_REQUIRED_LIBRARIES "")
 
91
 
 
92
        check_pkg_module (libwnck-1.0>=2.18.1 HAVE_LIBWNCK_2_18_1)
 
93
        check_pkg_module (libwnck-1.0>=2.19.4 HAVE_LIBWNCK_2_19_4)
 
94
 
 
95
        if (USE_METACITY)
 
96
            pkg_check_modules (METACITY libmetacity-private)
 
97
            if (METACITY_FOUND)
 
98
                check_pkg_module (libmetacity-private>=2.15.21 HAVE_METACITY_2_15_21)
 
99
                check_pkg_module (libmetacity-private>=2.17.0 HAVE_METACITY_2_17_0)
 
100
                check_pkg_module (libmetacity-private>=2.23.2 HAVE_METACITY_2_23_2)
 
101
            else (METACITY_FOUND)
 
102
                set (USE_METACITY 0)
 
103
            endif (METACITY_FOUND)
 
104
        endif (USE_METACITY)
 
105
 
 
106
        if (USE_GNOME)
 
107
            pkg_check_modules (GNOME_WINDOW_SETTINGS
 
108
                gnome-window-settings-2.0
 
109
                gnome-desktop-2.0
 
110
            )
 
111
 
 
112
            if (GNOME_WINDOW_SETTINGS_FOUND)
 
113
                exec_program (${PKG_CONFIG_EXECUTABLE} 
 
114
                  ARGS "--variable=prefix gnome-window-settings-2.0" 
 
115
                  OUTPUT_VARIABLE windowsettingsdatadir
 
116
                )
 
117
                set (windowsettingsdatadir ${windowsettingsdatadir}/share)
 
118
                exec_program (${PKG_CONFIG_EXECUTABLE} 
 
119
                  ARGS "--variable=libdir gnome-window-settings-2.0"
 
120
                  OUTPUT_VARIABLE windowsettingslibdir
 
121
                )
 
122
            else (GNOME_WINDOW_SETTINGS_FOUND)
 
123
                set (USE_GNOME 0)
 
124
            endif (GNOME_WINDOW_SETTINGS_FOUND)
 
125
        endif (USE_GNOME)
 
126
 
 
127
        if (USE_GNOME_KEYBINDINGS)
 
128
            pkg_check_modules (GNOME_KEY_BINDINGS gnome-keybindings)
 
129
            if (GNOME_KEY_BINDINGS_FOUND)
 
130
                exec_program (${PKG_CONFIG_EXECUTABLE}
 
131
                  ARGS "--variable=keysdir gnome-keybindings"
 
132
                  OUTPUT_VARIABLE keybindingsdir
 
133
                )
 
134
            else (GNOME_KEY_BINDINGS_FOUND)
 
135
                set (USE_GNOME_KEYBINDINGS 0)
 
136
            endif (GNOME_KEY_BINDINGS_FOUND)
 
137
        endif (USE_GNOME_KEYBINDINGS)
 
138
    else (GTK_WINDOW_DECORATOR_FOUND)
 
139
        set (USE_GTK 0)
 
140
    endif (GTK_WINDOW_DECORATOR_FOUND)
 
141
endif (USE_GTK)
 
142
 
 
143
if (!USE_GTK)
 
144
    set (USE_METACITY 0)
 
145
    set (USE_GNOME 0)
 
146
    set (USE_GNOME_KEYBINDINGS 0)
 
147
endif (!USE_GTK)
 
148
 
 
149
set (_compiz_package_string "compiz ${VERSION}")
 
150
 
 
151
configure_file (${compiz_SOURCE_DIR}/config.h.cmake.in ${compiz_BINARY_DIR}/config.h)
 
152
 
 
153
 
 
154
add_subdirectory (src)
 
155
add_subdirectory (include)
 
156
add_subdirectory (images)
 
157
add_subdirectory (libdecoration)
 
158
add_subdirectory (gtk)
 
159
add_subdirectory (kde)
 
160
add_subdirectory (po)
 
161
add_subdirectory (metadata)
 
162
add_subdirectory (plugins)
 
163
 
 
164
# AC_ISC_POSIX
 
165
# AC_PROG_CC
 
166
# AC_PROG_CPP
 
167
# AC_PROG_CXX
 
168
# AC_PROG_LIBTOOL
 
169
# AC_HEADER_STDC
 
170
# AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
 
171
 
172
# ALL_LINGUAS="af ar bg bn bn_IN bs ca cs cy da de el en_GB en_US es eu et fi fr gl gu he hi hr hu id it ja ka km ko lo lt mk mr nb nl or pa pl pt pt_BR ro ru sk sl sr sv ta tr uk vi xh zh_CN zh_TW zu"
 
173
# AC_SUBST(ALL_LINGUAS)
 
174
# AM_GLIB_GNU_GETTEXT
 
175
# GETTEXT_PACKAGE=compiz
 
176
# AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
 
177
# AC_SUBST(GETTEXT_PACKAGE)
 
178
 
179
# AX_BOOST_BASE([1.34.0])
 
180
 
181
# if test "x$GCC" = "xyes"; then
 
182
#   case " $CFLAGS " in
 
183
#   *[[\ \      ]]-Wall[[\ \    ]]*) ;;
 
184
#   *) CFLAGS="$CFLAGS -Wall" ;;
 
185
#   esac
 
186
 
187
#   case " $CFLAGS " in
 
188
#   *[[\ \      ]]-Wpointer-arith[[\ \  ]]*) ;;
 
189
#   *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
 
190
#   esac
 
191
 
192
#   case " $CFLAGS " in
 
193
#   *[[\ \      ]]-Wstrict-prototypes[[\ \      ]]*) ;;
 
194
#   *) CFLAGS="$CFLAGS -Wstrict-prototypes" ;;
 
195
#   esac
 
196
 
197
#   case " $CFLAGS " in
 
198
#   *[[\ \      ]]-Wmissing-prototypes[[\ \     ]]*) ;;
 
199
#   *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
 
200
#   esac
 
201
 
202
#   case " $CFLAGS " in
 
203
#   *[[\ \      ]]-Wmissing-declarations[[\ \   ]]*) ;;
 
204
#   *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
 
205
#   esac
 
206
 
207
#   case " $CFLAGS " in
 
208
#   *[[\ \      ]]-Wnested-externs[[\ \ ]]*) ;;
 
209
#   *) CFLAGS="$CFLAGS -Wnested-externs" ;;
 
210
#   esac
 
211
 
212
#   case " $CFLAGS " in
 
213
#   *[[\ \      ]]-D_FORTIFY_SOURCE=2[[\ \      ]]*) ;;
 
214
#   *) CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" ;;
 
215
#   esac
 
216
 
217
#   if test "x$enable_ansi" = "xyes"; then
 
218
#     case " $CFLAGS " in
 
219
#     *[[\ \    ]]-ansi[[\ \    ]]*) ;;
 
220
#     *) CFLAGS="$CFLAGS -ansi" ;;
 
221
#     esac
 
222
 
223
#     case " $CFLAGS " in
 
224
#     *[[\ \    ]]-pedantic[[\ \        ]]*) ;;
 
225
#     *) CFLAGS="$CFLAGS -pedantic" ;;
 
226
#     esac
 
227
#   fi
 
228
# fi
 
229
 
230
# if test "x$GCC" = "xyes"; then
 
231
#   case " $CXXFLAGS " in
 
232
#   *[[\ \      ]]-Wall[[\ \    ]]*) ;;
 
233
#   *) CXXFLAGS="$CXXFLAGS -Wall" ;;
 
234
#   esac
 
235
 
236
#   case " $CXXFLAGS " in
 
237
#   *[[\ \      ]]-D_FORTIFY_SOURCE=2[[\ \      ]]*) ;;
 
238
#   *) CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2" ;;
 
239
#   esac
 
240
# fi
 
241
 
242
# AC_C_BIGENDIAN
 
243
 
244
 
 
245
# AC_ARG_WITH(default-plugins, [  --with-default-plugins=PLUGINS ],
 
246
#                      [default_plugins="$withval"],
 
247
#                      [default_plugins=""])
 
248
# AC_SUBST(default_plugins)
 
249
 
250
 
251
# AC_MSG_CHECKING(for GL_CFLAGS)
 
252
# AC_ARG_WITH(gl-cflags, [  --with-gl-cflags=CFLAGS ],
 
253
#                      [GL_CFLAGS="$withval"],
 
254
#                      [GL_CFLAGS=""])
 
255
 
256
# AC_MSG_RESULT($GL_CFLAGS)
 
257
# AC_MSG_CHECKING(for GL_LIBS)
 
258
# AC_ARG_WITH(gl-libs, [  --with-gl-libs=LIBS ],
 
259
#                    [GL_LIBS="$withval"],
 
260
#                    [GL_LIBS="-lGL"])
 
261
# AC_MSG_RESULT($GL_LIBS)
 
262
 
263
# AC_SUBST(GL_CFLAGS)
 
264
# AC_SUBST(GL_LIBS)
 
265
 
266
# AC_CHECK_PROGS(XSLTPROC, xsltproc)
 
267
# if test -z "$XSLTPROC"; then
 
268
#   AC_MSG_ERROR([Couldn't find xsltproc])
 
269
# fi
 
270
 
271
# PKG_CHECK_MODULES(LIBPNG, libpng)
 
272
 
273
# AC_ARG_ENABLE(glib,
 
274
#   [  --disable-glib          Disable glib plugin],
 
275
#   [use_glib=$enableval], [use_glib=yes])
 
276
 
277
# if test "x$use_glib" = "xyes"; then
 
278
#   PKG_CHECK_MODULES(GLIB, glib-2.0)
 
279
# fi
 
280
 
281
# AM_CONDITIONAL(USE_GLIB, test "x$use_glib" = "xyes")
 
282
# if test "$use_glib" = yes; then
 
283
#   AC_DEFINE(USE_GLIB, 1, [Build glib plugin])
 
284
# fi
 
285
 
286
# AC_ARG_ENABLE(gconf,
 
287
#   [  --disable-gconf         Disable gconf plugin],
 
288
#   [use_gconf=$enableval], [use_gconf=yes])
 
289
 
290
# if test "x$use_gconf" = "xyes"; then
 
291
#   PKG_CHECK_MODULES(GCONF, gconf-2.0)
 
292
 
293
#   AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 
294
#   if test x"$GCONFTOOL" = xno; then
 
295
#     AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
 
296
#   fi
 
297
# fi
 
298
 
299
# AM_GCONF_SOURCE_2
 
300
 
301
# AM_CONDITIONAL(USE_GCONF, test "x$use_gconf" = "xyes")
 
302
# if test "$use_gconf" = yes; then
 
303
#   AC_DEFINE(USE_GCONF, 1, [Build gconf plugin])
 
304
# fi
 
305
 
306
# stylesheetdir=$datadir/compiz
 
307
# AC_SUBST(stylesheetdir)
 
308
 
309
# AC_ARG_ENABLE(dbus,
 
310
#   [  --disable-dbus          Disable dbus plugin],
 
311
#   [use_dbus=$enableval], [use_dbus=yes])
 
312
 
313
# if test "x$use_dbus" = "xyes"; then
 
314
#   PKG_CHECK_MODULES(DBUS, dbus-1 libxml-2.0, [use_dbus=yes], [use_dbus=no])
 
315
# fi
 
316
 
317
# AM_CONDITIONAL(DBUS_PLUGIN, test "x$use_dbus" = "xyes")
 
318
# if test "$use_dbus" = yes; then
 
319
#   AC_DEFINE(USE_DBUS, 1, [Build dbus plugin])
 
320
# fi
 
321
 
322
# AC_ARG_ENABLE(dbus-glib,
 
323
#   [  --disable-dbus-glib     Disable dbus-glib support],
 
324
#   [use_dbus_glib=$enableval], [use_dbus_glib=yes])
 
325
 
326
# if test "x$use_dbus_glib" = "xyes"; then
 
327
#   PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1, [use_dbus_glib=yes], [use_dbus_glib=no])
 
328
# fi
 
329
 
330
# if test "$use_dbus" = yes; then
 
331
#   AC_DEFINE(USE_DBUS_GLIB, 1, [Build dbus glib support])
 
332
# fi
 
333
 
334
# AC_ARG_ENABLE(inotify,
 
335
#   [  --disable-inotify       Disable inotify plugin],
 
336
#   [use_inotify=$enableval], [use_inotify=yes])
 
337
 
338
# if test "x$use_inotify" = "xyes"; then
 
339
#   AC_CHECK_HEADERS([sys/inotify.h], [use_inotify=yes], [use_inotify=no])
 
340
# fi
 
341
 
342
# AM_CONDITIONAL(INOTIFY_PLUGIN, test "x$use_inotify" = "xyes")
 
343
# if test "$use_inotify" = yes; then
 
344
#   AC_DEFINE(USE_INOTIFY, 1, [Build inotify plugin])
 
345
# fi
 
346
 
347
# AC_ARG_ENABLE(fuse,
 
348
#   [  --disable-fuse          Disable fuse plugin],
 
349
#   [use_fuse=$enableval], [use_fuse=yes])
 
350
 
351
# if test "x$use_fuse" = "xyes"; then
 
352
#   PKG_CHECK_MODULES(FUSE, fuse, [use_fuse=yes], [use_fuse=no])
 
353
# fi
 
354
 
355
# AM_CONDITIONAL(FUSE_PLUGIN, test "x$use_fuse" = "xyes")
 
356
# if test "$use_fuse" = yes; then
 
357
#   AC_DEFINE(USE_FUSE, 1, [Build fuse plugin])
 
358
# fi
 
359
 
360
# AC_ARG_ENABLE(annotate,
 
361
#   [  --disable-annotate      Disable annotate plugin],
 
362
#   [use_annotate=$enableval], [use_annotate=yes])
 
363
 
364
# if test "x$use_annotate" = "xyes"; then
 
365
#   PKG_CHECK_MODULES(ANNOTATE, cairo-xlib-xrender, [use_annotate=yes], [use_annotate=no])
 
366
# fi
 
367
 
368
# AM_CONDITIONAL(ANNOTATE_PLUGIN, test "x$use_annotate" = "xyes")
 
369
# if test "$use_annotate" = yes; then
 
370
#   AC_DEFINE(USE_ANNOTATE, 1, [Build annotate plugin])
 
371
# fi
 
372
 
373
# AC_ARG_ENABLE(librsvg,
 
374
#   [  --disable-librsvg       Disable svg support],
 
375
#   [use_librsvg=$enableval], [use_librsvg=yes])
 
376
 
377
# if test "x$use_librsvg" = "xyes"; then
 
378
#   PKG_CHECK_MODULES(LIBRSVG, [cairo >= 1.0 librsvg-2.0 >= 2.14.0], [use_librsvg=yes], [use_librsvg=no])
 
379
# fi
 
380
 
381
# AM_CONDITIONAL(USE_LIBRSVG, test "x$use_librsvg" = "xyes")
 
382
# if test "$use_librsvg" = yes; then
 
383
#   AC_DEFINE(USE_LIBRSVG, 1, [librsvg for SVG support])
 
384
# fi
 
385
 
386
 
 
387
# AC_ARG_ENABLE(kde,
 
388
#   [  --disable-kde           Disable kde window decorator],
 
389
#   [use_kde=$enableval], [use_kde=yes])
 
390
 
391
# if test "x$use_kde" = "xyes"; then
 
392
#   qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
 
393
#   qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
 
394
 
395
#   if test -n "$QTDIR" ; then
 
396
#     qt_incdirs="$QTDIR/include $qt_incdirs"
 
397
#     qt_libdirs="$QTDIR/lib $qt_libdirs"
 
398
#   fi
 
399
 
400
#   qt_test_include="qstyle.h"
 
401
#   qt_test_library="libqt-mt.so"
 
402
 
403
#   dnl Check for Qt headers
 
404
#   AC_MSG_CHECKING([for Qt headers])
 
405
#   qt_incdir="no"
 
406
#   for it in $qt_incdirs ; do
 
407
#     if test -r "$it/$qt_test_include" ; then
 
408
#       qt_incdir="$it"
 
409
#       break
 
410
#     fi
 
411
#   done
 
412
#   AC_MSG_RESULT([$qt_incdir])
 
413
 
414
#   dnl Check for Qt libraries
 
415
#   AC_MSG_CHECKING([for Qt libraries])
 
416
#   qt_libdir="no"
 
417
#   for qt_check in $qt_libdirs ; do
 
418
#     if test -r "$qt_check/$qt_test_library" ; then
 
419
#       qt_libdir="$qt_check"
 
420
#       break
 
421
#     fi
 
422
#   done
 
423
#   AC_MSG_RESULT([$qt_libdir])
 
424
 
425
#   use_kde=no;
 
426
#   if test "x$qt_libdir" != "xno" ; then
 
427
#     if test "x$qt_incdir" != "xno" ; then
 
428
#       use_kde=yes;
 
429
#     fi
 
430
#   fi
 
431
 
432
#   QT_CXXFLAGS="-I$qt_incdir"
 
433
#   QT_LIBS="-L$qt_libdir"
 
434
 
435
#   if test "x$use_kde" = xyes; then
 
436
#     kdedir=`kde-config --prefix --expandvars 2>/dev/null`
 
437
#     kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
 
438
#     kdeincs=`kde-config --install include --expandvars 2>/dev/null`
 
439
#     if test -d "$kdelibs"; then
 
440
#       PKG_CHECK_MODULES(KDE_WINDOW_DECORATOR,
 
441
#                       dbus-1 xdamage xcomposite,
 
442
#                       [use_kde=yes], [use_kde=no])
 
443
 
444
#       KDE_CFLAGS="$QT_CXXFLAGS -I$kdeincs"
 
445
#       KDE_LIBS="$QT_LIBS -L$kdelibs -lkdecore -lkdecorations -ldbus-qt-1"
 
446
 
447
#       QT_MOC=$QTDIR/bin/moc
 
448
#       DCOPIDL=$kdedir/bin/dcopidl
 
449
#       DCOPIDL2CPP=$kdedir/bin/dcopidl2cpp
 
450
#     else
 
451
#       use_kde=no;
 
452
#     fi
 
453
#   fi
 
454
# fi
 
455
 
456
# AM_CONDITIONAL(USE_KDE, test "x$use_kde" = "xyes")
 
457
# if test "$use_kde" = yes; then
 
458
#   AC_DEFINE(USE_KDE, 1, [Build kde window decorator])
 
459
# fi
 
460
 
461
# AC_SUBST(KDE_CFLAGS)
 
462
# AC_SUBST(KDE_LIBS)
 
463
# AC_SUBST(QT_MOC)
 
464
# AC_SUBST(DCOPIDL)
 
465
# AC_SUBST(DCOPIDL2CPP)
 
466
 
467
# AC_ARG_ENABLE(kde4,
 
468
#   [  --disable-kde4          Disable kde4 window decorator],
 
469
#   [use_kde4=$enableval], [use_kde4=yes])
 
470
 
471
# if test "x$use_kde4" = "xyes"; then
 
472
#   
 
473
#   kde4dir=`kde4-config --prefix --expandvars 2>/dev/null`
 
474
#   kde4libs=`kde4-config --install lib --expandvars 2>/dev/null`
 
475
#   kde4incs=`kde4-config --install include --expandvars 2>/dev/null`
 
476
 
477
#   kde4_test_includes="kdecoration.h kcommondecoration.h kdecorationbridge.h plasma/panelsvg.h"
 
478
 
479
#   dnl Check for KWin headers
 
480
#   AC_MSG_CHECKING([for KWin headers])
 
481
 
482
#   kde4_notfound=""
 
483
#   for file in $kde4_test_includes ; do
 
484
#     status=" $file"
 
485
#     for it in $kde4incs ; do
 
486
#       if test -r "$it/$file" ; then
 
487
#         status=""
 
488
#         break;
 
489
#       fi
 
490
#     done
 
491
#     kde4_notfound="$kde4_notfound$status"
 
492
#   done
 
493
#   if test -z "$kde4_notfound" ; then
 
494
#       kde4_notfound="yes"
 
495
#   else
 
496
#       kde4_notfound="$kde4_notfound not found"
 
497
#       kde4libs=""
 
498
#   fi
 
499
 
500
#   AC_MSG_RESULT([$kde4_notfound])
 
501
 
502
#   if test -d "$kde4libs"; then
 
503
#     PKG_CHECK_MODULES(KDE4_WINDOW_DECORATOR,
 
504
#                     dbus-1 xdamage xcomposite QtCore >= 4.0.0 QtGui QtDBus,
 
505
#                       [use_kde4=yes], [use_kde4=no])
 
506
 
507
#     KDE4_CFLAGS="-I$kde4incs"
 
508
#     KDE4_LIBS="-L$kde4libs -lkdecore -lkdecorations -lplasma"
 
509
 
510
#     QT4_MOC=`pkg-config QtGui --variable=moc_location`
 
511
#     QDBUSXML2CPP=`pkg-config QtGui --variable=exec_prefix`"/bin/qdbusxml2cpp"
 
512
#   else
 
513
#     use_kde4=no;
 
514
#   fi
 
515
# fi
 
516
 
517
# AM_CONDITIONAL(USE_KDE4, test "x$use_kde4" = "xyes")
 
518
# if test "$use_kde4" = yes; then
 
519
#   AC_DEFINE(USE_KDE4, 1, [Build kde4 window decorator])
 
520
# fi
 
521
 
522
# AC_SUBST(KDE4_CFLAGS)
 
523
# AC_SUBST(KDE4_LIBS)
 
524
# AC_SUBST(QT4_MOC)
 
525
# AC_SUBST(QDBUSXML2CPP)
 
526
 
527
# AC_ARG_ENABLE(kconfig,
 
528
#   [  --disable-kconfig       Disable kconfig plugin],
 
529
#   [use_kconfig=$enableval], [use_kconfig=yes])
 
530
 
531
# if test "x$use_kde" != "xyes"; then
 
532
#   use_kconfig=no;
 
533
# fi
 
534
 
535
# if test "x$use_kconfig" = "xyes"; then
 
536
#   KCONFIG_CFLAGS=$KDE_CFLAGS
 
537
#   KCONFIG_LIBS=$KDE_LIBS
 
538
#   KDE_KCFG_DIR=`kde-config --install kcfg --expandvars 2>/dev/null`
 
539
#   KDE_KCONFIG_DIR=`kde-config --install config --expandvars 2>/dev/null`
 
540
# fi
 
541
 
542
# AM_CONDITIONAL(USE_KCONFIG, test "x$use_kconfig" = "xyes")
 
543
# if test "$use_kconfig" = yes; then
 
544
#   AC_DEFINE(USE_KCONFIG, 1, [Build kconfig plugin])
 
545
# fi
 
546
 
547
# AC_SUBST(KCONFIG_CFLAGS)
 
548
# AC_SUBST(KCONFIG_LIBS)
 
549
# AC_SUBST(KDE_KCFG_DIR)
 
550
# AC_SUBST(KDE_KCONFIG_DIR)
 
551
 
552
# kcfgdir=$KDE_KCFG_DIR
 
553
# AC_SUBST(kcfgdir)
 
554
 
555
# AC_ARG_WITH(max-desktops,
 
556
#   [  --with-max-desktops     Max reasonable desktops],
 
557
#   [MAX_DESKTOPS=$withval],
 
558
#   [MAX_DESKTOPS=36])
 
559
 
560
# if test -n "$MAX_DESKTOPS"; then
 
561
#   AC_DEFINE_UNQUOTED(MAX_DESKTOPS, $MAX_DESKTOPS, [Max reasonable desktops])
 
562
# fi
 
563
 
564
# AC_CONFIG_COMMANDS([include/compiz-common.h],
 
565
# [
 
566
#       commonfile=include/compiz-common.h
 
567
#       outfile=$commonfile.tmp
 
568
#       AC_MSG_NOTICE([creating $commonfile])
 
569
#       cat > $outfile <<_EOF
 
570
# #ifndef COMPIZ_COMMON_H
 
571
# #define COMPIZ_COMMON_H
 
572
 
573
# #ifdef  __cplusplus
 
574
# # define COMPIZ_BEGIN_DECLS  extern "C" {
 
575
# # define COMPIZ_END_DECLS    }
 
576
# #else
 
577
# # define COMPIZ_BEGIN_DECLS
 
578
# # define COMPIZ_END_DECLS
 
579
# #endif
 
580
 
581
# #define COMPIZ_VERSION_MAJOR $COMPIZ_VERSION_MAJOR
 
582
# #define COMPIZ_VERSION_MINOR $COMPIZ_VERSION_MINOR
 
583
# #define COMPIZ_VERSION_MICRO $COMPIZ_VERSION_MICRO
 
584
 
585
# #define COMPIZ_VERSION_STRING "$COMPIZ_VERSION_MAJOR.$COMPIZ_VERSION_MINOR.$COMPIZ_VERSION_MICRO"
 
586
 
587
# _EOF
 
588
#       echo '#endif' >> $outfile
 
589
 
590
#       if cmp -s $outfile $commonfile; then
 
591
#         AC_MSG_NOTICE([$commonfile is unchanged])
 
592
#         rm -f $outfile
 
593
#       else
 
594
#         mv $outfile $commonfile
 
595
#       fi
 
596
# ],[
 
597
#       COMPIZ_VERSION_MAJOR=$COMPIZ_VERSION_MAJOR
 
598
#       COMPIZ_VERSION_MINOR=$COMPIZ_VERSION_MINOR
 
599
#       COMPIZ_VERSION_MICRO=$COMPIZ_VERSION_MICRO
 
600
# ])
 
601
 
602
# AC_OUTPUT([
 
603
# compiz.pc
 
604
# compiz-cube.pc
 
605
# compiz-scale.pc
 
606
# compiz-gconf.pc
 
607
# compiz-kconfig.pc
 
608
# Makefile
 
609
# src/Makefile
 
610
# libdecoration/Makefile
 
611
# libdecoration/libdecoration.pc
 
612
# include/Makefile
 
613
# plugins/Makefile
 
614
# images/Makefile
 
615
# gtk/Makefile
 
616
# gtk/window-decorator/Makefile
 
617
# gtk/gnome/Makefile
 
618
# kde/Makefile
 
619
# kde/window-decorator/Makefile
 
620
# kde/window-decorator-kde4/Makefile
 
621
# po/Makefile.in
 
622
# metadata/Makefile
 
623
# plugins/composite/Makefile
 
624
# plugins/opengl/Makefile
 
625
# ])
 
626
 
627
# echo ""
 
628
# echo "the following optional plugins will be compiled:"
 
629
# echo "  glib:     $use_glib"
 
630
# echo "  gconf:    $use_gconf"
 
631
# echo "  kconfig:  $use_kconfig"
 
632
# echo "  dbus:     $use_dbus"
 
633
# echo "  annotate: $use_annotate"
 
634
# echo "  svg:      $use_librsvg"
 
635
# echo "  inotify:  $use_inotify"
 
636
# echo "  fuse:     $use_fuse"
 
637
# echo ""
 
638
# echo "and the following optional features will be compiled:"
 
639
# echo "  gtk:      $use_gtk"
 
640
# echo "  metacity: $use_metacity"
 
641
# echo "  gnome:    $use_gnome"
 
642
# echo "  kde:      $use_kde"
 
643
# echo "  kde4:     $use_kde4"
 
644
# echo ""