| 307 enable_gevolution="$enableval", enable_gevolution="yes") |
309 enable_gevolution="$enableval", enable_gevolution="yes") |
| 308 AC_ARG_ENABLE(cap, |
310 AC_ARG_ENABLE(cap, |
| 309 [AC_HELP_STRING([--disable-cap], |
311 [AC_HELP_STRING([--disable-cap], |
| 310 [compile without Contact Availability Prediction plugin])], |
312 [compile without Contact Availability Prediction plugin])], |
| 311 enable_cap="$enableval", enable_cap="yes") |
313 enable_cap="$enableval", enable_cap="yes") |
| 312 |
314 AC_ARG_ENABLE(gestures, |
| |
315 [AC_HELP_STRING([--disable-gestures], |
| |
316 [compile without the gestures plugin])], |
| |
317 enable_gestures="$enableval", enable_gestures="yes") |
| 313 |
318 |
| 314 AC_PATH_XTRA |
319 AC_PATH_XTRA |
| 315 # We can't assume that $x_libraries will be set, because autoconf does not |
320 # We can't assume that $x_libraries will be set, because autoconf does not |
| 316 # set it in the case when the X libraries are in a standard place. |
321 # set it in the case when the X libraries are in a standard place. |
| 317 # Ditto for $x_includes |
322 # Ditto for $x_includes |
| 341 dnl We only really need Pango >= 1.4 for decent RTL support |
346 dnl We only really need Pango >= 1.4 for decent RTL support |
| 342 PKG_CHECK_MODULES(pango, [pango >= 1.4.0], |
347 PKG_CHECK_MODULES(pango, [pango >= 1.4.0], |
| 343 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:) |
348 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:) |
| 344 |
349 |
| 345 dnl ####################################################################### |
350 dnl ####################################################################### |
| |
351 dnl # Check if we should compile with X support |
| |
352 dnl ####################################################################### |
| |
353 if test "x$with_x" = "xyes" ; then |
| |
354 PKG_CHECK_MODULES(X11, x11, |
| |
355 [AC_DEFINE(HAVE_X, 1, [Define to 1 if you have X11])], |
| |
356 [AC_MSG_RESULT(no) |
| |
357 with_x=no]) |
| |
358 AC_SUBST(X11_LIBS) |
| |
359 AC_SUBST(X11_CFLAGS) |
| |
360 fi |
| |
361 |
| |
362 dnl ####################################################################### |
| 346 dnl # Check for XScreenSaver |
363 dnl # Check for XScreenSaver |
| 347 dnl ####################################################################### |
364 dnl ####################################################################### |
| 348 if test "x$enable_screensaver" = "xyes" ; then |
365 if test "x$enable_screensaver" = "xyes" ; then |
| 349 old_LIBS="$LIBS" |
366 if test "x$with_x" = "xyes" ; then |
| 350 LIBS="$LIBS $GTK_LIBS $x_libpath_add" |
367 old_LIBS="$LIBS" |
| 351 XSS_LIBS="" |
368 LIBS="$LIBS $GTK_LIBS $x_libpath_add" |
| 352 XSS_HEADERS="" |
369 XSS_LIBS="" |
| 353 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) |
370 XSS_HEADERS="" |
| 354 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) |
371 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) |
| 355 if test "x$XSS_LIBS" != "x"; then |
372 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) |
| 356 oldCPPFLAGS="$CPPFLAGS" |
373 if test "x$XSS_LIBS" != "x"; then |
| 357 CPPFLAGS="$CPPFLAGS $x_incpath_add" |
374 oldCPPFLAGS="$CPPFLAGS" |
| 358 AC_TRY_COMPILE([ |
375 CPPFLAGS="$CPPFLAGS $x_incpath_add" |
| |
376 AC_TRY_COMPILE([ |
| 359 #include <X11/Xlib.h> |
377 #include <X11/Xlib.h> |
| 360 #include <X11/extensions/scrnsaver.h> |
378 #include <X11/extensions/scrnsaver.h> |
| 361 ], [], [], [enable_screensaver=no]) |
379 ], [], [], [enable_screensaver=no]) |
| 362 CPPFLAGS="$oldCPPFLAGS" |
380 CPPFLAGS="$oldCPPFLAGS" |
| |
381 else |
| |
382 enable_screensaver=no |
| |
383 fi |
| |
384 LIBS="$old_LIBS" |
| |
385 |
| |
386 if test "x$enable_screensaver" = "xyes" ; then |
| |
387 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.]) |
| |
388 AC_SUBST(XSS_LIBS) |
| |
389 fi |
| 363 else |
390 else |
| 364 enable_screensaver=no |
391 enable_screensaver=no |
| 365 fi |
|
| 366 LIBS="$old_LIBS" |
|
| 367 |
|
| 368 if test "x$enable_screensaver" = "xyes" ; then |
|
| 369 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.]) |
|
| 370 AC_SUBST(XSS_LIBS) |
|
| 371 fi |
392 fi |
| 372 fi |
393 fi |
| 373 |
394 |
| 374 dnl ####################################################################### |
395 dnl ####################################################################### |
| 375 dnl # Check for X session management libs |
396 dnl # Check for X session management libs |
| 376 dnl ####################################################################### |
397 dnl ####################################################################### |
| 377 if test "x$enable_sm" = "xyes"; then |
398 if test "x$enable_sm" = "xyes"; then |
| 378 enable_sm=no |
399 if test "x$with_x" = "xyes" ; then |
| 379 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) |
400 enable_sm=no |
| 380 if test "x$found_sm_lib" = "xtrue"; then |
401 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) |
| 381 oldCPPFLAGS="$CPPFLAGS" |
402 if test "x$found_sm_lib" = "xtrue"; then |
| 382 CPPFLAGS="$CPPFLAGS $x_incpath_add" |
403 oldCPPFLAGS="$CPPFLAGS" |
| 383 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) |
404 CPPFLAGS="$CPPFLAGS $x_incpath_add" |
| 384 CPPFLAGS="$oldCPPFLAGS" |
405 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) |
| 385 fi |
406 CPPFLAGS="$oldCPPFLAGS" |
| 386 |
407 fi |
| 387 if test "x$enable_sm" = "xyes"; then |
408 |
| 388 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) |
409 if test "x$enable_sm" = "xyes"; then |
| 389 AC_SUBST(SM_LIBS) |
410 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) |
| |
411 AC_SUBST(SM_LIBS) |
| |
412 fi |
| |
413 else |
| |
414 enable_sm=no |
| |
415 fi |
| |
416 fi |
| |
417 |
| |
418 dnl ####################################################################### |
| |
419 dnl # Check for X11 to allow the gestures plugin |
| |
420 dnl ####################################################################### |
| |
421 if test "x$enable_gestures" = "xyes"; then |
| |
422 if test "x$with_x" = "xno" ; then |
| |
423 enable_gestures=no |
| 390 fi |
424 fi |
| 391 fi |
425 fi |
| 392 |
426 |
| 393 dnl ####################################################################### |
427 dnl ####################################################################### |
| 394 dnl # Check for startup notification |
428 dnl # Check for startup notification |