X-Git-Url: http://git.ipfire.org/?p=ddns.git;a=blobdiff_plain;f=configure.ac;h=9acfd6f00b4f929542c618653013ef52b56b659a;hp=de89e65fe1d06d8982065bf836f6270a4cc3176c;hb=d7d1febecdadd6ba3632e421e7ada2cfd7c14d7d;hpb=0b5e00a20faa4789bf4f241b1147ba8f6c0a031c diff --git a/configure.ac b/configure.ac index de89e65..9acfd6f 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AC_PREREQ([2.64]) AC_INIT([ddns], - [0.01], + [010], [info@ipfire.org], [ddns], [http://git.ipfire.org/?p=oddments/ddns.git;a=summary]) @@ -51,11 +51,61 @@ AC_PROG_LN_S AC_PROG_MKDIR_P AC_PROG_SED +AC_PATH_PROG([XSLTPROC], [xsltproc]) + # Python AM_PATH_PYTHON([2.7]) save_LIBS="$LIBS" +# pkg-config +PKG_PROG_PKG_CONFIG +# This makes sure pkg.m4 is available. +m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) + +# ------------------------------------------------------------------------------ +have_manpages=no +AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages], + [do not install man pages])) +AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) +AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) + +# ------------------------------------------------------------------------------ + +AC_ARG_WITH([systemd], + AS_HELP_STRING([--with-systemd], [Enable systemd support.]) +) + +AS_IF([test "x$with_systemd" != "xno"], + [PKG_CHECK_MODULES(systemd, [libsystemd], + [have_systemd=yes], [have_systemd=no])], + [have_systemd=no] +) + +AS_IF([test "x$have_systemd" = "xyes"], + [AC_MSG_CHECKING([for systemd system unit directory]) + AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)] + ) + + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) + + if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then + AC_MSG_RESULT([$systemdsystemunitdir]) + else + AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)]) + fi + ], + [AS_IF([test "x$with_systemd" = "xyes"], + [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.]) + ]) +]) + +AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"]) + +# ------------------------------------------------------------------------------ + AC_CONFIG_FILES([ Makefile po/Makefile.in @@ -64,6 +114,11 @@ AC_CONFIG_FILES([ AC_OUTPUT AC_MSG_RESULT([ - $PACKAGE_NAME $VERSION + ${PACKAGE_NAME} ${VERSION} + + prefix: ${prefix} + sysconfdir: ${sysconfdir} + Systemd support ${have_systemd} + Generate man-pages: ${have_manpages} ])