* Re-indent configure.ac to four spaces
authorTrent Lloyd <lathiat@bur.st>
Tue, 23 Aug 2005 20:35:26 +0000 (20:35 +0000)
committerTrent Lloyd <lathiat@bur.st>
Tue, 23 Aug 2005 20:35:26 +0000 (20:35 +0000)
 * Make all python programs that use DBUS only install if compiling with DBUS support (avahi-utils/Makefile.am, man/Makefile.am)

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@431 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-utils/Makefile.am
configure.ac
man/Makefile.am

index 43147b7..edbd2cb 100644 (file)
@@ -36,9 +36,9 @@ EXTRA_DIST = \
        avahi-resolve-address.in \
        avahi-discover.desktop.in
 
-SUBDIRS=avahi
-
 if HAVE_PYTHON
+if HAVE_DBUS
+SUBDIRS=avahi
 
 desktopdir = $(datadir)/applications
 desktop_DATA = avahi-discover.desktop
@@ -81,3 +81,4 @@ avahi-resolve-address: avahi-resolve-address.in
 CLEANFILES = $(pythonscripts) $(desktop_DATA)
 
 endif
+endif
index be62e38..2eca925 100644 (file)
@@ -29,8 +29,8 @@ AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
 AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/Software/Avahi])
 
 if type -p stow > /dev/null && test -d /usr/local/stow ; then
-   AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
-   ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
 fi
 
 # Checks for programs.
@@ -51,21 +51,21 @@ AC_PROG_LIBTOOL
 #
 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of debian, gentoo, archlinux or none]))
 if test "z$with_distro" = "z"; then
-   #AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
-   AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
-   AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
-   AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
+    #AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
+    AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
+    AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
+    AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
 fi
 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
 
 if test "z$with_distro" = "z"; then
-   AC_MSG_ERROR([Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO])
-   exit 1
+    AC_MSG_ERROR([Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO])
+    exit 1
 else
 case $with_distro in
-   debian|gentoo|archlinux)
+    debian|gentoo|archlinux)
      ;;
-   *)
+    *)
      AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome)])
      ;;
 esac
@@ -77,11 +77,11 @@ AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
 
 test_gcc_flag() {
-   AC_LANG_CONFTEST([int main() {}])
-   $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
-   ret=$?
-   rm -f conftest.o
-   return $ret
+    AC_LANG_CONFTEST([int main() {}])
+    $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+    ret=$?
+    rm -f conftest.o
+    return $ret
 }
 
 # If using GCC specify some additional parameters
@@ -234,11 +234,11 @@ AC_ARG_ENABLE(expat,
         [HAVE_EXPAT=yes]) 
 
 if test "x$HAVE_EXPAT" = "xyes" ; then
-   AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
+    AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
 
-   if ! $have_expat ; then
-      AC_MSG_ERROR([*** libexpat not found ***])
-   fi
+    if ! $have_expat ; then
+        AC_MSG_ERROR([*** libexpat not found ***])
+    fi
 fi
 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
 
@@ -255,9 +255,9 @@ AC_ARG_ENABLE(libdaemon,
         [HAVE_LIBDAEMON=yes]) 
 
 if test "x$HAVE_LIBDAEMON" = "xyes" ; then
-   PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
-   AC_SUBST(LIBDAEMON_CFLAGS)
-   AC_SUBST(LIBDAEMON_LIBS)
+    PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
+    AC_SUBST(LIBDAEMON_CFLAGS)
+    AC_SUBST(LIBDAEMON_LIBS)
 fi
 AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
 
@@ -273,9 +273,9 @@ AC_ARG_ENABLE(python,
        esac],[HAVE_PYTHON=yes])
 
 if test "x$HAVE_PYTHON" = "xyes" ; then
-   AM_PATH_PYTHON([2.4])
-   AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
-   AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
+    AM_PATH_PYTHON([2.4])
+    AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
+    AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
 fi
 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
 
@@ -334,16 +334,16 @@ AC_ARG_ENABLE(xmltoman,
 esac],[xmltoman=yes])
 
 if test x$xmltoman = xyes ; then
-   AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
-
-   if test x$have_xmltoman = xno ; then
-     if ! test -e man/avahi-daemon.8 ; then
-        AC_MSG_ERROR([*** xmltoman was not found, it is required to build the manpages and they have not been pre-built])
-        exit 1
-     fi
-     AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
-     xmltoman=no
-   fi
+    AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
+    if test x$have_xmltoman = xno ; then
+        if ! test -e man/avahi-daemon.8 ; then
+            AC_MSG_ERROR([*** xmltoman was not found, it is required to build the manpages and they have not been pre-built])
+            exit 1
+        fi
+        AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
+        xmltoman=no
+    fi
 fi
 
 AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
@@ -396,19 +396,19 @@ echo "
 BUILD_DAEMON="no (!)"
 
 if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
-   BUILD_DAEMON=yes
+    BUILD_DAEMON=yes
 fi
 
 BUILD_UTILS="no (!)"
 
 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" ; then
-   BUILD_UTILS=yes
+    BUILD_UTILS=yes
 fi
 
 BUILD_CLIENT="no (!)"
 
 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
-   BUILD_CLIENT=yes
+    BUILD_CLIENT=yes
 fi
 
     
index d253ddb..0271e7d 100644 (file)
@@ -28,6 +28,7 @@ man_MANS = \
        avahi.service.5
 
 if HAVE_PYTHON
+if HAVE_DBUS
 
 man_MANS += \
        avahi-browse.1 \
@@ -39,6 +40,7 @@ man_MANS += \
        avahi-bookmarks.1
 
 endif
+endif
 
 noinst_DATA = \
        avahi-browse.1.xml \