comparison configure.ac @ 11356:0b746a52238d

[gaim-migrate @ 13578] DBus service directory detection broke the build process on systems without DBus. Fixed. committer: Tailor Script <tailor@pidgin.im>
author Piotr Zielinski <zielaj>
date Sun, 28 Aug 2005 21:43:47 +0000
parents 23f5b11fd9eb
children c84c35ee8202
comparison
equal deleted inserted replaced
11355:6903f2f6d61f 11356:0b746a52238d
337 dnl This autogenerated code is system-independent, so in principle we 337 dnl This autogenerated code is system-independent, so in principle we
338 dnl can generate all of it before shipping. But I thought adding 338 dnl can generate all of it before shipping. But I thought adding
339 dnl auto-generated stuff to the CVS is inelegant. Alternatively, 339 dnl auto-generated stuff to the CVS is inelegant. Alternatively,
340 dnl these python scripts could be rewritten in C (brrrr ...). 340 dnl these python scripts could be rewritten in C (brrrr ...).
341 341
342
342 if test "x$enable_dbus" = "xyes" ; then 343 if test "x$enable_dbus" = "xyes" ; then
343 AC_PATH_PROG([PYTHON], [python], [no]) 344 AC_PATH_PROG([PYTHON], [python], [no])
344 if test "x$PYTHON" = "xno" ; then 345 if test "x$PYTHON" = "xno" ; then
345 AC_MSG_WARN([python interpreter not found in your path]) 346 AC_MSG_WARN([python interpreter not found in your path])
346 enable_dbus=no 347 enable_dbus=no
352 AC_MSG_WARN([python version >= 2.4 required]) 353 AC_MSG_WARN([python version >= 2.4 required])
353 enable_dbus=no 354 enable_dbus=no
354 fi 355 fi
355 fi 356 fi
356 357
357 if test "x$enable_dbus" = "xyes" ; then
358 AC_DEFINE(HAVE_DBUS, 1, [Define if we're using DBUS.])
359 echo "Building with DBUS support"
360 else
361 echo "Building without DBUS support"
362 fi
363
364 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
365
366 dnl Here we locate the directory containing DBus .service files for 358 dnl Here we locate the directory containing DBus .service files for
367 dnl the session bus. Adapted from the guifications project. 359 dnl the session bus. Adapted from the guifications project.
368 360
369 AC_ARG_WITH(dbus-session-dir, [ --with-dbus-session-dir=<dir> Location of the D-BUS session directory.]) 361 AC_ARG_WITH(dbus-session-dir, [ --with-dbus-session-dir=<dir> Location of the D-BUS session directory.])
370 362
371 AC_MSG_CHECKING([location of the D-BUS session directory]) 363 if test "x$enable_dbus" = "xyes" ; then
372 if ! test -z "$with_dbus_session_dir"; then 364 AC_MSG_CHECKING([location of the D-BUS session directory])
373 if ! test -d "$with_dbus_session_dir"; then 365 if ! test -z "$with_dbus_session_dir"; then
374 AC_MSG_ERROR([$with_dbus_session_dir does not exist, if this is the correct location please make sure that it exists.]) 366 if ! test -d "$with_dbus_session_dir"; then
367 AC_MSG_WARN([$with_dbus_session_dir does not exist, if this is the correct location please make sure that it exists.])
368 enable_dbus=no
375 fi 369 fi
376 370
377 DBUS_SESSION_DIR="$with_dbus_session_dir" 371 DBUS_SESSION_DIR="$with_dbus_session_dir"
378 else 372 else
379 dnl # add more to this as needed 373 dnl # add more to this as needed
380 servicesprefixes="$DATADIR $LIBDIR /usr/share /usr/local/share" 374 servicesprefixes="$DATADIR $LIBDIR /usr/share /usr/local/share"
381 DBUS_SESSION_DIR="" 375 DBUS_SESSION_DIR=""
382 376
383 for p in $servicesprefixes; do 377 for p in $servicesprefixes; do
384 dir="$p/dbus-1/services" 378 dir="$p/dbus-1/services"
385 if test -d $dir; then 379 if test -d $dir; then
386 DBUS_SESSION_DIR="$dir" 380 DBUS_SESSION_DIR="$dir"
387 break 381 break
388 fi 382 fi
389 done 383 done
390 384
391 if test -z $DBUS_SESSION_DIR; then 385 if test -z $DBUS_SESSION_DIR; then
392 AC_MSG_ERROR([D-BUS session directory was not found! Please use --with-dbus-session-dir and specify it's location.]) 386 AC_MSG_WARN([D-BUS session directory was not found! Please use --with-dbus-session-dir and specify its location.])
393 fi 387 enable_dbus=no
394 fi 388 fi
395 AC_MSG_RESULT([$DBUS_SESSION_DIR]) 389 fi
396 AC_SUBST(DBUS_SESSION_DIR) 390
391
392 fi
393
394 if test "x$enable_dbus" = "xyes" ; then
395 AC_MSG_RESULT([$DBUS_SESSION_DIR])
396 AC_SUBST(DBUS_SESSION_DIR)
397 AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.])
398 echo "Building with DBUS support"
399 else
400 echo "Building without DBUS support"
401 fi
402
403 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
404
405
406
407
397 408
398 409
399 dnl ####################################################################### 410 dnl #######################################################################
400 dnl # Check for startup notification 411 dnl # Check for startup notification
401 dnl ####################################################################### 412 dnl #######################################################################