]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
GNU/kFreeBSD build fix, from Patrick Coulthard
[netatalk.git] / configure.in
index 7c939c200f103d0394130a55e45cd53faebd0613..e64a0e6f3f707f1bf13eaecd3de7c7243dc8a251 100644 (file)
@@ -385,16 +385,32 @@ AC_ARG_ENABLE(locking,
 
 )
 
-
 AC_ARG_ENABLE(redhat,
-       [  --enable-redhat         use redhat-style sysv configuration ],[
+       [  --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_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
@@ -525,6 +541,7 @@ 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 ;;
@@ -548,7 +565,7 @@ 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])
+     kfreebsd-gnu) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
         ;;
 esac
 
@@ -574,6 +591,15 @@ if test x"$this_os" = "xfreebsd"; then
     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
+
 dnl ----- HP-UX 11 specific -----
 if test x"$this_os" = "xhpux11"; then
        AC_MSG_RESULT([ * HP-UX 11 specific configuration])
@@ -1261,7 +1287,8 @@ AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
 AM_CONDITIONAL(DEFAULT_HOOK, test x$neta_cv_have_libgcrypt != xyes && test x$neta_cv_have_openssl != xyes)
 AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
-AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
+AM_CONDITIONAL(USE_REDHAT_SYSV, test x$sysv_style = xredhat-sysv)
+AM_CONDITIONAL(USE_REDHAT_SYSTEMD, test x$sysv_style = xredhat-systemd)
 AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
@@ -1285,20 +1312,19 @@ AC_OUTPUT([Makefile
        bin/cnid/cnid2_create
        bin/getzones/Makefile
        bin/megatron/Makefile
-    bin/misc/Makefile
+       bin/misc/Makefile
        bin/nbp/Makefile
        bin/pap/Makefile
        bin/psorder/Makefile
        bin/uniconv/Makefile
        config/Makefile
-    config/pam/Makefile
+       config/pam/Makefile
        contrib/Makefile
        contrib/macusers/Makefile
        contrib/macusers/macusers
        contrib/printing/Makefile
        contrib/shell_utils/Makefile
-       contrib/shell_utils/afpd-mtab.pl
-    contrib/shell_utils/apple_dump
+       contrib/shell_utils/apple_dump
        contrib/shell_utils/asip-status.pl
        contrib/timelord/Makefile
        contrib/a2boot/Makefile