comparison configure.ac @ 13588:bbf2e601be82

[gaim-migrate @ 15973] this should make configure _NOT_ fail on systems where dbus isn't installed. It's a bit messy buy should work fine.. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Thu, 06 Apr 2006 22:28:22 +0000
parents e3c13c8096f0
children c4a5d8950d8c
comparison
equal deleted inserted replaced
13587:bfda68675f7b 13588:bbf2e601be82
685 dnl # although a newer dbus is installed. But I have tried to order the 685 dnl # although a newer dbus is installed. But I have tried to order the
686 dnl # directory searching to keep this situation at a minimum. 686 dnl # directory searching to keep this situation at a minimum.
687 dnl ########################################################################### 687 dnl ###########################################################################
688 AC_ARG_WITH(dbus-services, [ --with-dbus-services=<dir> Where the D-Bus services directory is located.]) 688 AC_ARG_WITH(dbus-services, [ --with-dbus-services=<dir> Where the D-Bus services directory is located.])
689 689
690 AC_MSG_CHECKING([location of the D-Bus services directory]) 690 DBUS_SERVICES_DIR=""
691 if ! test -z "$with_dbus_services" ; then 691
692 if ! test -d "$with_dbus_services" ; then 692 if test x"$enable_dbus" = "xyes" ; then
693 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.]) 693 AC_MSG_CHECKING([location of the D-Bus services directory])
694 fi 694 if ! test -z "$with_dbus_services" ; then
695 695 if ! test -d "$with_dbus_services" ; then
696 DBUS_SERVICES_DIR="$with_dbus_services" 696 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
697 else 697 fi
698 if test x"$prefix" = x"NONE" ; then 698
699 dnl # no prefix given, so we look for the correct dbus system paths. 699 DBUS_SERVICES_DIR="$with_dbus_services"
700 dnl # if a prefix is given, we use it. 700 else
701 701 if test x"$prefix" = x"NONE" ; then
702 serviceprefixes="$datadir $libdir /usr/share /usr/local/share" 702 dnl # no prefix given, so we look for the correct dbus system paths.
703 DBUS_SERVICES_DIR="" 703 dnl # if a prefix is given, we use it.
704 704
705 for d in $serviceprefixes ; do 705 serviceprefixes="$datadir $libdir /usr/share /usr/local/share"
706 dir="$d/dbus-1/services" 706 DBUS_SERVICES_DIR=""
707 if test -d $dir ; then 707
708 DBUS_SERVICES_DIR="$dir" 708 for d in $serviceprefixes ; do
709 break 709 dir="$d/dbus-1/services"
710 if test -d $dir ; then
711 DBUS_SERVICES_DIR="$dir"
712 break
713 fi
714 done
715
716 if test -z $DBUS_SERVICES_DIR ; then
717 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.])
710 fi 718 fi
711 done 719 else
712 720 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
713 if test -z $DBUS_SERVICES_DIR ; then 721 fi
714 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.]) 722 fi
715 fi 723 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
716 else 724 AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.])
717 DBUS_SERVICES_DIR="$datadir/dbus-1/services" 725 fi
718 fi
719 fi
720 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
721 AC_SUBST(DBUS_SERVICES_DIR) 726 AC_SUBST(DBUS_SERVICES_DIR)
722 727
723
724 if test "x$enable_dbus" = "xyes" ; then 728 if test "x$enable_dbus" = "xyes" ; then
725 AC_MSG_RESULT([$DBUS_SESSION_DIR])
726 AC_SUBST(DBUS_SESSION_DIR)
727 AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.])
728 echo "Building with DBUS support" 729 echo "Building with DBUS support"
729 else 730 else
730 echo "Building without DBUS support" 731 echo "Building without DBUS support"
731 fi 732 fi
732 733