+dnl Whether to enable developer build
+AC_DEFUN([AC_DEVELOPER], [
+ AC_MSG_CHECKING([whether to enable developer build])
+ AC_ARG_ENABLE(
+ developer,
+ AS_HELP_STRING([--enable-developer], [whether to enable developer build (ABI checking)]),
+ enable_dev=$enableval,
+ enable_dev=no
+ )
+ AC_MSG_RESULT([$enable_dev])
+ AM_CONDITIONAL(DEVELOPER, test x"$enable_dev" = x"yes")
+])
+
+dnl Whether to disable bundled libevent
+AC_DEFUN([AC_NETATALK_LIBEVENT], [
+ AC_MSG_CHECKING([whether to disable bundled libevent (define CPPFLAGS and LDFLAGS otherwise appropiately to pick up installed version)])
+ AC_ARG_ENABLE(
+ bundled-libevent,
+ [AS_HELP_STRING([--disable-bundled-libevent],[whether the bundled version of libevent shall not be used (define CPPFLAGS and LDFLAGS otherwise appropiately to pick up installed version)
+ ])],
+ use_bundled_libevent=$enableval,
+ use_bundled_libevent=yes
+ )
+
+ if test x"$use_bundled_libevent" = x"yes" ; then
+ AC_CONFIG_SUBDIRS([libevent])
+ fi
+ AM_CONDITIONAL(USE_BUILTIN_LIBEVENT, test x"$use_bundled_libevent" = x"yes")
+])
+
+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
+ bindir="/bin"
+ sbindir="/sbin"
+ sysconfdir="/etc"
+ libdir="/lib"
+ localstatedir="/var"
+ mandir="/usr/share/man"
+ uams_path="${libdir}/netatalk"
+ PKGCONFDIR="${sysconfdir}"
+ SERVERTEXT="${localstatedir}/netatalk/msg"
+ use_pam_so=yes
+ 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
+])
+