-NETATALK_ZEROCONF
-
-dnl Check for PAM libs
-netatalk_cv_use_pam=no
-AC_PATH_PAM([
- use_pam_so=yes
- compile_pam=yes
- netatalk_cv_use_pam=yes
- AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
-])
-
-netatalk_cv_use_shadowpw=no
-AC_ARG_WITH(shadow,
- [ --with-shadow enable shadow password support [[auto]]],
- [netatalk_cv_use_shadowpw="$withval"],
- [netatalk_cv_use_shadowpw=auto]
-)
-
-if test "x$netatalk_cv_use_shadowpw" != "xno"; then
- AC_CHECK_HEADER([shadow.h])
- if test x"$ac_cv_header_shadow_h" = x"yes"; then
- netatalk_cv_use_shadowpw=yes
- AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
- else
- if test "x$shadowpw" = "xyes"; then
- AC_MSG_ERROR([shadow support not available])
- else
- netatalk_cv_use_shadowpw=no
- fi
- fi
-fi
-
-AC_MSG_CHECKING([whether shadow support should be enabled])
-if test "x$netatalk_cv_use_shadowpw" = "xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-
-
-netatalk_cv_use_shellcheck=yes
-AC_MSG_CHECKING([whether checking for a valid shell should be enabled])
-AC_ARG_ENABLE(shell-check,
- [ --disable-shell-check disable checking for a valid shell],[
- if test "$enableval" = "no"; then
- AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
- AC_MSG_RESULT([no])
- netatalk_cv_use_shellcheck=no
- else
- AC_MSG_RESULT([yes])
- fi
- ],[
- AC_MSG_RESULT([yes])
- ]
-)
-
-NETATALK_TCP_WRAPPERS
-
-AC_MSG_CHECKING([whether system (fcntl) locking should be disabled])
-AC_ARG_ENABLE(locking,
- [ --disable-locking disable system locking],[
- if test "$enableval" = "no"; then
- AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
-
- ],[
- AC_MSG_RESULT([no])
- ]
-
-)
-
-AC_ARG_ENABLE(redhat,
- [ --enable-redhat obsoleted ],[
- echo "ERROR: --enable-redhat is obsoleted. Use --enable-redhat-sysv or --enable-redhat-systemd."
- echo "exit 1"
- exit 1
- ]
-)
-
-AC_ARG_ENABLE(redhat-sysv,
- [ --enable-redhat-sysv use redhat-style sysv (upstart) configuration ],[
- if test "$enableval" = "yes"; then
- sysv_style=redhat-sysv
- fi
- AC_MSG_RESULT([enabling redhat-style sysv support])
- ]
-)
-
-AC_ARG_ENABLE(redhat-systemd,
- [ --enable-redhat-systemd use redhat-style systemd (>=Fedora15) configuration ],[
- if test "$enableval" = "yes"; then
- sysv_style=redhat-systemd
- fi
- AC_MSG_RESULT([enabling redhat-style systemd support])
- ]
-)
-
-AC_ARG_ENABLE(suse,
- [ --enable-suse use suse-style sysv configuration ],[
- if test "$enableval" = "yes"; then
- sysv_style=suse
- fi
- AC_MSG_RESULT([enabling suse-style sysv support])
- ]
-)
-
-AC_ARG_ENABLE(gentoo,
- [ --enable-gentoo use gentoo-style sysv configuration ],[
- if test "$enableval" = "yes"; then
- sysv_style=gentoo
- fi
- AC_MSG_RESULT([enabling gentoo-style sysv support])
- ]
-)
-
-AC_ARG_ENABLE(netbsd,
- [ --enable-netbsd use NetBSD-style rc.d configuration ],
- if test "x$enableval" = "xyes"; then
- sysv_style=netbsd
- fi
- AC_MSG_RESULT([enabling NetBSD-style rc.d support])
-)
-
-AC_ARG_ENABLE(debian,
- [ --enable-debian use debian-style sysv configuration ],[
- if test "$enableval" = "yes"; then
- sysv_style=debian
- fi
- AC_MSG_RESULT([enabling debian-style sysv support])
- ]
-)
-
-dnl ----- timelord compilation (disabled by default)
-AC_MSG_CHECKING([whether timelord should be compiled])
-compile_timelord=no
-AC_ARG_ENABLE(timelord,
- [ --enable-timelord enable compilation of timelord server],
- [compile_timelord="$enableval"],
- [compile_timelord="no"]
-)
-AC_MSG_RESULT([$compile_timelord])
-
-dnl ----- a2boot compilation (disabled by default)
-AC_MSG_CHECKING([whether a2boot should be compiled])
-compile_a2boot=no
-AC_ARG_ENABLE(a2boot,
- [ --enable-a2boot enable compilation of Apple2 boot server],
- [compile_a2boot="$enableval"],
- [compile_a2boot="no"]
-)
-AC_MSG_RESULT([$compile_a2boot])
-
-AC_ARG_WITH(uams-path,
- [ --with-uams-path=PATH path to UAMs [[PKGCONF/uams]]],[
- uams_path="$withval"
- ],[
- uams_path="${PKGCONFDIR}/uams"
- ]
-)
-
-NETATALK_AC_CUPS
-
-dnl check if we can use attribute unused (gcc only) from ethereal
-AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
-if test x$GCC != x ; then
- CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
- AC_MSG_RESULT(yes)
-else
- CFLAGS="-D_U_=\"\" $CFLAGS"
- AC_MSG_RESULT(no)
-fi
-
-dnl --------------------------------------------------------------------------
-dnl FHS stuff has to be done last because it overrides other defaults
-dnl --------------------------------------------------------------------------
-
-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 --------------------------------------------------------------------------
-dnl post-FHS substitutions, etc
-dnl --------------------------------------------------------------------------
-
-dnl ***** UAMS_PATH
-dnl AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
-dnl [path to UAMs [default=PKGCONF/uams]])
-UAMS_PATH="${uams_path}"
-AC_SUBST(UAMS_PATH)
-
-dnl --------------------------------------------------------------------------
-dnl drop in includes for top level directory structures here...
-dnl --------------------------------------------------------------------------
-
-dnl Note: $(top_srcdir)/include should be added before all other includes
-dnl so that includes from that directory a preferred to includes from
-dnl /usr/include or similar places.
-LIBS="$LIBS -L\$(top_srcdir)/libatalk"
-CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
-
-AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
-
-dnl --------------------------------------------------------------------------
-dnl specific configuration comes in here:
-dnl --------------------------------------------------------------------------
-
-dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
-
-dnl --------------------- determine operating system from "target"
-case "$host_os" in
- *aix*) this_os=aix ;;
- *kfreebsd*-gnu) this_os=kfreebsd-gnu ;;
- *freebsd*) this_os=freebsd ;;
- *hpux11*) this_os=hpux11 ;;
- *irix*) this_os=irix ;;
- *linux*) this_os=linux ;;
- *osx*) this_os=macosx ;;
- *darwin*) this_os=macosx ;;
- *netbsd*) this_os=netbsd ;;
- *openbsd*) this_os=openbsd ;;
- *osf*) this_os=tru64 ;;
- *solaris*) this_os=solaris ;;
-esac
-
-case "$host_cpu" in
- i386|i486|i586|i686|k7) this_cpu=x86 ;;
- alpha) this_cpu=alpha ;;
- mips) this_cpu=mips ;;
- powerpc|ppc) this_cpu=ppc ;;
-esac
-
-dnl --------------------- GNU source
-case "$this_os" in
- linux) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
- ;;
- kfreebsd-gnu) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
- ;;
-esac
-
-dnl --------------------- operating system specific flags (port from sys/*)
-
-dnl ----- AIX specific -----
-if test x"$this_os" = "xaix"; then
- AC_MSG_RESULT([ * AIX specific configuration])
- AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
-
- dnl This is probably a lie; AIX 4.3 supports a 64-bit long
- dnl compilation environment. It's enough to get things defined
- dnl right in endian.h provided that long long is supported, though.
- AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
-fi
-
-dnl ----- FreeBSD specific -----
-if test x"$this_os" = "xfreebsd"; then
- AC_MSG_RESULT([ * FreeBSD specific configuration])
- AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
- AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
-
- AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW)
-fi
-
-dnl ----- GNU/kFreeBSD specific -----
-if test x"$this_os" = "xkfreebsd-gnu"; then
- AC_MSG_RESULT([ * GNU/kFreeBSD specific configuration])
- AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
- AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
- AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
- AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW)
-fi