]> arthur.barton.de Git - netatalk.git/blobdiff - macros/netatalk.m4
Solaris fixes
[netatalk.git] / macros / netatalk.m4
index 512e479a7aae8cd5fd3a4b7f21774a4056f4e8fe..9237affeb39cdf82e4f76c70836446b3b4cd955e 100644 (file)
@@ -145,7 +145,7 @@ AC_ARG_ENABLE(shell-check,
 dnl Check for optional sysv initscript install
 AC_DEFUN([AC_NETATALK_SYSV_STYLE], [
     AC_ARG_WITH(sysv-style,
-                [  --with-sysv-style       use OS specific sysv config [[redhat-sysv|redhat-systemd|suse|gentoo|netbsd|debian]]],
+                [  --with-sysv-style       use OS specific sysv config [[redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|systemd]]],
                 sysv_style="$withval", sysv_style=none
     )
     case "$sysv_style" in 
@@ -159,8 +159,14 @@ AC_DEFUN([AC_NETATALK_SYSV_STYLE], [
            AC_MSG_RESULT([enabling redhat-style systemd support])
            ;;
     "suse")
-           AC_MSG_RESULT([enabling suse-style sysv support])
+           AC_MSG_RESULT([--enable-suse is obsoleted. Use --enable-suse-sysv or --enable-suse-systemd])
         ;;
+    "suse-sysv")
+           AC_MSG_RESULT([enabling suse-style sysv configuration])
+           ;;
+    "suse-systemd")
+           AC_MSG_RESULT([enabling suse-style systemd support (>=openSUSE12.1)])
+           ;;
     "gentoo")
            AC_MSG_RESULT([enabling gentoo-style sysv support])
         ;;
@@ -170,10 +176,24 @@ AC_DEFUN([AC_NETATALK_SYSV_STYLE], [
     "debian")
            AC_MSG_RESULT([enabling debian-style sysv support])
         ;;
+    "systemd")
+           AC_MSG_RESULT([use general systemd configuration])
+        ;;
     *)
            AC_MSG_RESULT([disabling sysv support])
         ;;
     esac
+    AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
+    AM_CONDITIONAL(USE_REDHAT_SYSV, test x$sysv_style = xredhat-sysv)
+    AM_CONDITIONAL(USE_SUSE_SYSV, test x$sysv_style = xsuse-sysv)
+    AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
+    AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
+    AM_CONDITIONAL(USE_SOLARIS, test x$sysv_style = xsolaris)
+    AM_CONDITIONAL(USE_GENTOO, test x$sysv_style = xgentoo)
+    AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian)
+    AM_CONDITIONAL(USE_SYSTEMD, test x$sysv_style = xsystemd || test x$sysv_style = xredhat-systemd || test x$sysv_style = xsuse-systemd)
+    AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = xnone)
+
 ])
 
 dnl OS specific configuration
@@ -273,6 +293,8 @@ if test x"$this_os" = "xsolaris"; then
        AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
        AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
        AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
+    AC_DEFINE(_XOPEN_SOURCE, 600, [Solaris compilation environment])
+    AC_DEFINE(__EXTENSIONS__,  1, [Solaris compilation environment])
        CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
        need_dash_r=yes
        sysv_style=solaris
@@ -608,7 +630,7 @@ case "$this_os" in
 
   *solaris*)
        AC_CHECK_FUNCS([attropen],
-                   [neta_cv_eas_sys_found=yes],
+                   [neta_cv_eas_sys_found=yes; AC_DEFINE(HAVE_EAFD, 1, [extattr API has full fledged fds for EAs])],
                    [neta_cv_eas_sys_not_found=yes])
   ;;