]> arthur.barton.de Git - netatalk.git/blobdiff - macros/netatalk.m4
Merge remote-tracking branch 'origin/develop' into spotlight
[netatalk.git] / macros / netatalk.m4
index 5e04b518eeba8af17747335a58d84015d5595231..f5e48b8bbed810a658d3f1f343c5c217ab6c42b2 100644 (file)
@@ -163,7 +163,9 @@ AC_DEFUN([AC_NETATALK_LIBEVENT], [
         AC_MSG_ERROR([--with-libevent requires a path])
     fi
     AC_MSG_RESULT([$use_bundled_libevent])
-    AC_CONFIG_SUBDIRS([libevent])
+    if test x"$use_bundled_libevent" = x"yes" ; then
+        AC_CONFIG_SUBDIRS([libevent])
+    fi
     AC_SUBST(LIBEVENT_CFLAGS)
     AC_SUBST(LIBEVENT_LDFLAGS)
     AM_CONDITIONAL(USE_BUILTIN_LIBEVENT, test x"$use_bundled_libevent" = x"yes")
@@ -410,7 +412,7 @@ AC_ARG_ENABLE(shell-check,
 )
 ])
 
-dnl Check for optional sysv initscript install
+dnl Check for optional initscript install
 AC_DEFUN([AC_NETATALK_INIT_STYLE], [
     AC_ARG_WITH(init-style,
                 [  --with-init-style       use OS specific init config [[redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd]]],
@@ -422,36 +424,46 @@ AC_DEFUN([AC_NETATALK_INIT_STYLE], [
         ;;
     "redhat-sysv")
            AC_MSG_RESULT([enabling redhat-style sysv initscript support])
+           ac_cv_init_dir="/etc/rc.d/init.d"
            ;;
     "redhat-systemd")
            AC_MSG_RESULT([enabling redhat-style systemd support])
+           ac_cv_init_dir="/lib/systemd/system"
            ;;
     "suse")
            AC_MSG_ERROR([--with-init-style=suse is obsoleted. Use suse-sysv or suse-systemd.])
         ;;
     "suse-sysv")
            AC_MSG_RESULT([enabling suse-style sysv initscript support])
+           ac_cv_init_dir="/etc/init.d"
            ;;
     "suse-systemd")
            AC_MSG_RESULT([enabling suse-style systemd support (>=openSUSE12.1)])
+           ac_cv_init_dir="/lib/systemd/system"
            ;;
     "gentoo")
            AC_MSG_RESULT([enabling gentoo-style initscript support])
+           ac_cv_init_dir="/etc/init.d"
         ;;
     "netbsd")
            AC_MSG_RESULT([enabling netbsd-style initscript support])
+           ac_cv_init_dir="/etc/rc.d"
         ;;
     "debian")
            AC_MSG_RESULT([enabling debian-style initscript support])
+           ac_cv_init_dir="/etc/init.d"
         ;;
     "solaris")
            AC_MSG_RESULT([enabling solaris-style SMF support])
+           ac_cv_init_dir="/lib/svc/manifest/network/"
         ;;
     "systemd")
            AC_MSG_RESULT([enabling general systemd support])
+           ac_cv_init_dir="/lib/systemd/system"
         ;;
     "none")
            AC_MSG_RESULT([disabling init-style support])
+           ac_cv_init_dir="none"
         ;;
     *)
            AC_MSG_ERROR([illegal init-style])
@@ -466,6 +478,12 @@ AC_DEFUN([AC_NETATALK_INIT_STYLE], [
     AM_CONDITIONAL(USE_SYSTEMD, test x$init_style = xsystemd || test x$init_style = xredhat-systemd || test x$init_style = xsuse-systemd)
     AM_CONDITIONAL(USE_UNDEF, test x$init_style = xnone)
 
+    AC_ARG_WITH(init-dir,
+                [  --with-init-dir=PATH    path to OS specific init directory],
+                ac_cv_init_dir="$withval", ac_cv_init_dir="$ac_cv_init_dir"
+    )
+    INIT_DIR="$ac_cv_init_dir"
+    AC_SUBST(INIT_DIR, ["$ac_cv_init_dir"])
 ])
 
 dnl OS specific configuration