AC_CHECK_HEADERS(sys/param.h sys/fcntl.h sys/termios.h)
AC_CHECK_HEADERS(sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h)
dnl Checks for header files, confirmed to be required as of 2011
-AC_CHECK_HEADERS(sys/epoll.h)
AC_CHECK_HEADERS([sys/mount.h], , ,
[#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
dnl these tests have been comfirmed to be needed in 2011
-AC_CHECK_FUNC(epoll_create, AC_DEFINE([HAVE_EPOLL], 1, Whether Linux epoll is available))
AC_CHECK_FUNCS(backtrace_symbols dirfd getusershell pread pwrite pselect)
AC_CHECK_FUNCS(setlinebuf strlcat strlcpy strnlen)
AC_CHECK_FUNCS(mmap utime getpagesize) dnl needed by tbd
AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
-AC_CACHE_SAVE
-
-dnl --------------------------------------------------------------------------
dnl 64bit platform check
-dnl --------------------------------------------------------------------------
-
-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 --------------------------------------------------------------------------
-dnl OS specific configuration comes in here:
-dnl --------------------------------------------------------------------------
+AC_NETATALK_64BIT_LIBS
+dnl OS specific checks
AC_NETATALK_OS_SPECIFIC
-dnl --------------------------------------------------------------------------
-dnl specific configuration comes in here:
-dnl --------------------------------------------------------------------------
-
dnl Check for optional admin group support
AC_NETATALK_ADMIN_GROUP
dnl Check for optional valid-shell-check support
AC_NETATALK_SHELL_CHECK
-dnl Check for optional Webmin
-AC_NETATALK_WEBMIN
-
dnl Check for optional sysv initscript install
AC_NETATALK_SYSV_STYLE
dnl Check for sendfile()
AC_NETATALK_SENDFILE
-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])
- ]
-)
+AC_NETATALK_FHS
-dnl --------------------------------------------------------------------------
-dnl post-FHS substitutions, etc
-dnl --------------------------------------------------------------------------
-
-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 -I\$(top_srcdir)/sys $CFLAGS"
+UAMS_PATH="${uams_path}"
-
-dnl --------------------------------------------------------------------------
-dnl Last minute substitutions
-dnl --------------------------------------------------------------------------
-
-dnl ac_cv_target_os is now host_os, ac_cv_target_cpu is now host_cpu
AC_SUBST(LIBS)
AC_SUBST(CFLAGS)
+AC_SUBST(UAMS_PATH)
AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes)
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
+++ /dev/null
-dnl $Id: webmin.m4,v 1.1 2009-10-22 08:36:30 franklahm Exp $
-dnl Autoconf macro to install webmin + netatalk webmin module
-
-AC_DEFUN([AC_NETATALK_WEBMIN],[
- AC_ARG_WITH(webmin,
- [ --with-webmin=PATH path where webmin is installed [[$PKGCONFDIR/webmin]]],
- if test "x$withval" = "xyes"; then
- webminpath="$PKGCONFDIR"
- elif test "x$withval" = "xno"; then
- webminpath=""
- else
- webminpath="$withval"
- fi
- )
-
- AC_ARG_WITH(webminuser,
- [ --with-webminuser=NAME name for the webmin admin user],
- if test "x$withval" = "xyes"; then
- webminuser=""
- elif test "x$withval" = "xno"; then
- webminuser=""
- else
- webminuser="$withval"
- fi
- )
-
- AC_ARG_WITH(webminversion,
- [ --with-webminversion=VERSION Webmin version to fetch from sf.net [[1.490]]],
- if test "x$withval" = "xyes"; then
- webminversion="1.490"
- elif test "x$withval" = "xno"; then
- webminversions="1.490"
- else
- webminversion="$withval"
- fi
- )
-
- AC_ARG_WITH(webminpass,
- [ --with-webminpass=PASSWORD password for the webmin admin user],
- if test "x$withval" = "xyes"; then
- webminpass=""
- elif test "x$withval" = "xno"; then
- webminpass=""
- else
- webminpass="$withval"
- fi
- )
-
- AC_ARG_WITH(webminport,
- [ --with-webminport=PORT TCP port for webmin],
- if test "x$withval" = "xyes"; then
- webminport=""
- elif test "x$withval" = "xno"; then
- webminport=""
- else
- webminport="$withval"
- fi
- )
-
- AC_MSG_CHECKING([if webmin administration shall be installed])
- if test "x$webminpath" != "x" &&
- test "x$webminuser" != "x" &&
- test "x$webminpass" != "x" &&
- test "x$webminport" != "x" &&
- test "x$webminversion" != "x"; then
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([if neccessary Perl module 'Net::SSLeay' is installed])
- $ac_cv_path_PERL -e 'use Net::SSLeay' >/dev/null 2>/dev/null
- if test "$?" != "0" ; then
- AC_MSG_RESULT([no])
- webminpath=""
- else
- AC_MSG_RESULT([yes])
- AC_MSG_NOTICE([Installing Webmin in "$webminpath/webmin"])
- fi
- else
- AC_MSG_RESULT([no])
- fi
-
- AC_SUBST(WEBMIN_PATH, $webminpath)
- AC_SUBST(WEBMIN_VERSION, $webminversion)
- AC_SUBST(WEBMIN_USER, $webminuser)
- AC_SUBST(WEBMIN_PASS, $webminpass)
- AC_SUBST(WEBMIN_PORT, $webminport)
-])
\ No newline at end of file