]> arthur.barton.de Git - netatalk.git/commitdiff
new configure option --with-init-dir=PATH
authorHAT <hat@fa2.so-net.ne.jp>
Fri, 22 Mar 2013 15:12:15 +0000 (00:12 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Fri, 22 Mar 2013 15:12:15 +0000 (00:12 +0900)
NEWS
distrib/initscripts/Makefile.am
macros/netatalk.m4
macros/summary.m4

diff --git a/NEWS b/NEWS
index 3f7c312cb7311b57cb87f36b4c0b6b81234b89ad..0828927a6bc80cafa92772d6163761469e0f0c03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ Changes in 3.0.3
        system security configuration files.
        New option 'afpstats' (default: no) which determines whether
        to enable the feature or not.
+* NEW: configure option --with-init-dir
 * NEW: dtrace probes, cf include/atalk/afp_dtrace.d for available
        probes.
 * UPD: Reload groups when reloading volumes. FR #71.
index 2d1cb3ab566b63d8fc30e744faa794c1a6d5a210..79dcfb3f283179abfcfb342ff095881577113c18 100644 (file)
@@ -54,7 +54,7 @@ uninstall: uninstall-startup
 
 if USE_REDHAT_SYSV
 
-sysvdir        = /etc/rc.d/init.d
+sysvdir        = $(INIT_DIR)
 sysv_SCRIPTS = netatalk
 
 $(sysv_SCRIPTS): rc.redhat
@@ -76,7 +76,7 @@ endif
 
 if USE_SYSTEMD
 
-servicedir     = /lib/systemd/system
+servicedir     = $(INIT_DIR)
 service_DATA   = netatalk.service
 
 netatalk.service: service.systemd
@@ -98,7 +98,7 @@ endif
 
 if USE_SUSE_SYSV
 
-sysvdir        = /etc/init.d
+sysvdir        = $(INIT_DIR)
 sysv_SCRIPTS = netatalk
 
 $(sysv_SCRIPTS): rc.suse
@@ -120,7 +120,7 @@ endif
 
 if USE_NETBSD
 
-sysvdir = /etc/rc.d
+sysvdir = $(INIT_DIR)
 sysv_SCRIPTS = netatalk
 
 netatalk: rc.netbsd
@@ -141,7 +141,7 @@ endif
 
 if USE_SOLARIS
 
-servicedir = /lib/svc/manifest/network/
+servicedir = $(INIT_DIR)
 service_DATA = netatalk.xml
 
 install-data-hook:
@@ -158,7 +158,7 @@ endif
 
 if USE_GENTOO
 
-sysvdir = /etc/init.d
+sysvdir = $(INIT_DIR)
 sysv_SCRIPTS = netatalk
 
 $(sysv_SCRIPTS): rc.gentoo
@@ -180,7 +180,7 @@ endif
 
 if USE_DEBIAN
 
-sysvdir = /etc/init.d
+sysvdir = $(INIT_DIR)
 sysv_SCRIPTS = netatalk
 
 $(sysv_SCRIPTS): rc.debian
index 3d4576e6bddc6369a51596fce4c7b7ea261ea99c..beceeef9ffcd01e113c12896dd68dc88952bf64a 100644 (file)
@@ -355,7 +355,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]]],
@@ -367,36 +367,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])
@@ -411,6 +421,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
index 7f5e649991a0da5fe80f486f12383980ad3ee33c..b8db25798fe2d2b98f02553f7cdca0a9b0411b89 100644 (file)
@@ -57,6 +57,9 @@ dnl   AC_MSG_RESULT([         Samba sharemode interop: $neta_cv_have_smbshmd])
        AC_MSG_RESULT([         dtrace probes:           $WDTRACE])
        AC_MSG_RESULT([    Paths:])
        AC_MSG_RESULT([         Netatalk lockfile:       $ac_cv_netatalk_lock])
+       if test "x$init_style" != x"none"; then
+               AC_MSG_RESULT([         init directory:          $ac_cv_init_dir])
+       fi
        if test x"$atalk_cv_with_dbus" = x"yes"; then
                AC_MSG_RESULT([         dbus system directory:   $ac_cv_dbus_sysdir])
        fi