comparison configure.ac @ 19478:b2578b2d4bc4

Remove X11 specifics from configure.ac. Allows to build against native, non-X11 Quartz
author Sean Egan <seanegan@gmail.com>
date Mon, 27 Aug 2007 22:45:15 +0000
parents b67bfe1513ee
children 47a2d00ab060 1e5d5d55a231
comparison
equal deleted inserted replaced
19477:b1e7dfd662fb 19478:b2578b2d4bc4
273 You must have the GLib 2.0 development headers installed to build. 273 You must have the GLib 2.0 development headers installed to build.
274 ])]) 274 ])])
275 AC_SUBST(GLIB_CFLAGS) 275 AC_SUBST(GLIB_CFLAGS)
276 AC_SUBST(GLIB_LIBS) 276 AC_SUBST(GLIB_LIBS)
277 277
278 AC_ARG_WITH(x, [],
279 with_x="$withval", with_x="yes")
278 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui], 280 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
279 [compile without GTK+ user interface])], 281 [compile without GTK+ user interface])],
280 enable_gtkui="$enableval", enable_gtkui="yes") 282 enable_gtkui="$enableval", enable_gtkui="yes")
281 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui], 283 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
282 [compile without console user interface])], 284 [compile without console user interface])],
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
448 dnl ####################################################################### 482 dnl #######################################################################
449 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin) 483 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
450 dnl ####################################################################### 484 dnl #######################################################################
451 if test "x$enable_cap" = "xyes"; then 485 if test "x$enable_cap" = "xyes"; then
452 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[ 486 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
453 AC_MSG_RESULT(no) 487 AC_MSG_RESULT(no)
454 enable_cap="no" 488 enable_cap="no"
455 ]) 489 ])
456 fi 490 fi
491
457 492
458 else # GTK 493 else # GTK
459 enable_cap=no 494 enable_cap=no
460 enable_gevolution=no 495 enable_gevolution=no
461 enable_gtkspell=no 496 enable_gtkspell=no
465 fi # GTK 500 fi # GTK
466 501
467 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes") 502 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
468 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes") 503 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
469 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") 504 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
505 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
506
470 507
471 dnl ####################################################################### 508 dnl #######################################################################
472 dnl # Check for ncurses and other things used by the console UI 509 dnl # Check for ncurses and other things used by the console UI
473 dnl ####################################################################### 510 dnl #######################################################################
474 GNT_LIBS="" 511 GNT_LIBS=""
529 if test x"$NCURSES_HEADERS" != "x"; then 566 if test x"$NCURSES_HEADERS" != "x"; then
530 GNT_CFLAGS="-I$NCURSES_HEADERS" 567 GNT_CFLAGS="-I$NCURSES_HEADERS"
531 fi 568 fi
532 fi 569 fi
533 fi 570 fi
534
535 PKG_CHECK_MODULES(X11, x11,
536 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)])
537 AC_SUBST(X11_LIBS)
538 AC_SUBST(X11_CFLAGS)
539 fi 571 fi
540 572
541 AC_SUBST(GNT_LIBS) 573 AC_SUBST(GNT_LIBS)
542 AC_SUBST(GNT_CFLAGS) 574 AC_SUBST(GNT_CFLAGS)
543 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes") 575 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
2222 echo $PACKAGE $VERSION 2254 echo $PACKAGE $VERSION
2223 2255
2224 echo 2256 echo
2225 echo Build GTK+ 2.x UI............. : $enable_gtkui 2257 echo Build GTK+ 2.x UI............. : $enable_gtkui
2226 echo Build console UI.............. : $enable_consoleui 2258 echo Build console UI.............. : $enable_consoleui
2259 echo Build for X11................. : $with_x
2227 echo 2260 echo
2261 echo Enable Gestures............... : $enable_gestures
2228 echo Protocols to build dynamically : $DYNAMIC_PRPLS 2262 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2229 echo Protocols to link statically.. : $STATIC_PRPLS 2263 echo Protocols to link statically.. : $STATIC_PRPLS
2230 echo 2264 echo
2231 echo Build with GStreamer support.. : $enable_gst 2265 echo Build with GStreamer support.. : $enable_gst
2232 echo Build with D-Bus support...... : $enable_dbus 2266 echo Build with D-Bus support...... : $enable_dbus