dnl Kitchen sink for configuration macros
+dnl Filesystem Hierarchy Standard (FHS) compatibility
+AC_DEFUN([AC_NETATALK_FHS], [
+AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibility])
+AC_ARG_ENABLE(fhs,
+ [ --enable-fhs use Filesystem Hierarchy Standard (FHS) compatibility],[
+ if test "$enableval" = "yes"; then
+ uams_path="${libdir}/netatalk"
+ sysconfdir="/etc"
+ PKGCONFDIR=${sysconfdir}/netatalk
+ SERVERTEXT="${PKGCONFDIR}/msg"
+ use_pam_so=yes
+ mandir="/usr/share/man"
+ AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ],[
+ AC_MSG_RESULT([no])
+ ]
+)])
+
+dnl 64bit platform check
+AC_DEFUN([AC_NETATALK_64BIT_LIBS], [
+AC_MSG_CHECKING([whether to check for 64bit libraries])
+# Test if the compiler is in 64bit mode
+echo 'int i;' > conftest.$ac_ext
+atalk_cv_cc_64bit_output=no
+if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *"ELF 64"*)
+ atalk_cv_cc_64bit_output=yes
+ ;;
+ esac
+fi
+rm -rf conftest*
+
+case $host_cpu:$atalk_cv_cc_64bit_output in
+powerpc64:yes | s390x:yes | sparc*:yes | x86_64:yes | i386:yes)
+ case $target_os in
+ solaris2*)
+ AC_MSG_RESULT([yes])
+ atalk_libname="lib/64"
+ ;;
+ *bsd* | dragonfly*)
+ AC_MSG_RESULT([no])
+ atalk_libname="lib"
+ ;;
+ *)
+ AC_MSG_RESULT([yes])
+ atalk_libname="lib64"
+ ;;
+ esac
+ ;;
+*:*)
+ AC_MSG_RESULT([no])
+ atalk_libname="lib"
+ ;;
+esac
+])
+
dnl Check for optional admin group support
AC_DEFUN([AC_NETATALK_ADMIN_GROUP], [
netatalk_cv_admin_group=yes
])
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-sysv|suse-systemd|gentoo|netbsd|debian|systemd]]],
- sysv_style="$withval", sysv_style=none
+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|systemd]]],
+ init_style="$withval", init_style=none
)
- case "$sysv_style" in
+ case "$init_style" in
"redhat")
- AC_MSG_ERROR([--enable-redhat is obsoleted. Use --enable-redhat-sysv or --enable-redhat-systemd.])
+ AC_MSG_ERROR([--with-init-style=redhat is obsoleted. Use redhat-sysv or redhat-systemd.])
;;
"redhat-sysv")
AC_MSG_RESULT([enabling redhat-style sysv (upstart) configuration])
AC_MSG_RESULT([enabling redhat-style systemd support])
;;
"suse")
- AC_MSG_RESULT([--enable-suse is obsoleted. Use --enable-suse-sysv or --enable-suse-systemd])
+ AC_MSG_ERROR([--with-init-style=suse is obsoleted. Use suse-sysv or suse-systemd.])
;;
"suse-sysv")
AC_MSG_RESULT([enabling suse-style sysv 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_NETBSD, test x$init_style = xnetbsd)
+ AM_CONDITIONAL(USE_REDHAT_SYSV, test x$init_style = xredhat-sysv)
+ AM_CONDITIONAL(USE_SUSE_SYSV, test x$init_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)
+ AM_CONDITIONAL(USE_TRU64, test x$init_style = xtru64)
+ AM_CONDITIONAL(USE_SOLARIS, test x$init_style = xsolaris)
+ AM_CONDITIONAL(USE_GENTOO, test x$init_style = xgentoo)
+ AM_CONDITIONAL(USE_DEBIAN, test x$init_style = xdebian)
+ 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_DEFINE(__EXTENSIONS__, 1, [Solaris compilation environment])
CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
need_dash_r=yes
- sysv_style=solaris
+ init_style=solaris
solaris_module=no
AC_MSG_CHECKING([if we can build Solaris kernel module])