1 dnl configure.ac for netatalk
3 AC_INIT(etc/afpd/main.c)
5 NETATALK_VERSION=`cat $srcdir/VERSION`
6 AC_SUBST(NETATALK_VERSION)
9 AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
10 AM_CONFIG_HEADER(config.h)
11 AM_MAINTAINER_MODE([enable])
13 dnl Checks for programs.
31 dnl Check if we can use attribute unused (gcc only) from ethereal
32 AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
33 if test x$GCC != x ; then
34 CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
37 CFLAGS="-D_U_=\"\" $CFLAGS"
41 dnl Checks for header files, some checks are obsolete, unfortunately the code
42 dnl uses the resulting macros, so the code has to cleaned up too before
43 dnl we can remove the checks here.
44 AC_CHECK_HEADERS(mntent.h unistd.h termios.h ufs/quota.h)
45 AC_CHECK_HEADERS(netdb.h sgtty.h statfs.h dlfcn.h langinfo.h locale.h)
46 AC_CHECK_HEADERS(sys/param.h sys/fcntl.h sys/termios.h)
47 AC_CHECK_HEADERS(sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h)
48 dnl Checks for header files, confirmed to be required as of 2011
49 AC_CHECK_HEADERS([sys/mount.h], , ,
50 [#ifdef HAVE_SYS_PARAM_H
51 #include <sys/param.h>
54 AC_CHECK_TYPES([fshare_t], [], [], [[#include <fcntl.h>]])
56 AC_SYS_LARGEFILE([], AC_MSG_ERROR([AFP 3.x support requires Large File Support.]))
58 dnl --------------------------------------------------------------------------
59 dnl check if dlsym needs to add an underscore, uses libtool macros
60 dnl --------------------------------------------------------------------------
62 AC_CHECK_FUNCS(dlopen dlsym dlclose)
64 if test x"$libltdl_cv_need_uscore" = xyes; then
65 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
69 ac_neta_haveatfuncs=yes
70 AC_CHECK_FUNCS(openat renameat fstatat unlinkat, , ac_neta_haveatfuncs=no)
71 if test x"$ac_neta_haveatfuncs" = x"yes" ; then
72 AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)
73 AC_DEFINE([HAVE_ATFUNCS], 1, whether at funcs are available)
75 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
77 dnl these tests have been comfirmed to be needed in 2011
78 AC_CHECK_FUNCS(backtrace_symbols dirfd getusershell pread pwrite pselect)
79 AC_CHECK_FUNCS(setlinebuf strlcat strlcpy strnlen mempcpy)
80 AC_CHECK_FUNCS(mmap utime getpagesize) dnl needed by tbd
82 dnl search for necessary libraries
83 AC_SEARCH_LIBS(gethostbyname, nsl)
84 AC_SEARCH_LIBS(connect, socket)
85 AX_PTHREAD(, [AC_MSG_ERROR([missing pthread_sigmask])])
87 AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
89 dnl 64bit platform check
90 AC_NETATALK_64BIT_LIBS
92 dnl OS specific checks
93 AC_NETATALK_OS_SPECIFIC
95 dnl Check for optional admin group support
96 AC_NETATALK_ADMIN_GROUP
98 dnl Check for optional AFS support
101 dnl --with-pkgconfdir check to change configuration directory location
102 AC_NETATALK_CONFIG_DIRS
104 dnl Check for optional cracklib support
107 dnl Check whether to enable debug code
110 dnl Check whethe to disable tickle SIGALARM stuff, which eases debugging
111 AC_NETATALK_DEBUGGING
113 dnl Check for libiconv support
114 AC_NETATALK_CHECK_ICONV
116 dnl Check for CNID database backends
117 AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no])
119 dnl Check for quota support
120 AC_NETATALK_CHECK_QUOTA
122 dnl Check for optional Zeroconf support
125 dnl Check for optional TCP-wrappers support
126 AC_NETATALK_TCP_WRAPPERS
128 dnl Check for PAM libs
131 dnl Check for optional shadow password support
134 dnl Check for optional valid-shell-check support
135 AC_NETATALK_SHELL_CHECK
137 dnl Check for optional sysv initscript install
138 AC_NETATALK_INIT_STYLE
140 dnl Path where UAM modules shall be installed
141 AC_ARG_WITH(uams-path, [ --with-uams-path=PATH path to UAMs [[$libdir/netatalk/]]], [uams_path="$withval/"], [uams_path="$libdir/netatalk/"])
143 dnl Check for libgcrypt, if found enables DHX2 UAM
144 AC_NETATALK_PATH_LIBGCRYPT([1:1.2.3])
146 dnl Check for openssl, if found enables DHX UAM and Randnum UAM
149 dnl Check for Berkeley DB library
155 dnl Check for building PGP UAM module
158 dnl Check for building Kerberos V UAM module
161 dnl Check for Kerberos 5 support
164 dnl Check for overwrite the config files or not
165 AC_NETATALK_OVERWRITE_CONFIG
167 dnl Check for LDAP support, for client-side ACL visibility
170 dnl Check for ACL support
173 dnl Check for Extended Attributes support
174 AC_NETATALK_EXTENDED_ATTRIBUTES
176 dnl Check if realpath() takes NULL
179 dnl Check for sendfile()
182 dnl Check whether bundled libevent shall not be used
185 dnl Check for Tracker
186 AC_NETATALK_SPOTLIGHT
188 dnl libatalk API checks
194 dnl Check for dbus-glib, for AFP stats on dbus
195 AC_NETATALK_DBUS_GLIB
197 dnl FHS stuff has to be done last because it overrides other defaults
200 dnl netatalk lockfile path, must come after AC_NETATALK_FHS
203 dnl Check for Docbook and build documentation if found
206 CFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include $CFLAGS"
207 UAMS_PATH="${uams_path}"
213 AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
214 AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes)
215 AM_CONDITIONAL(HAVE_OPENSSL, test x$neta_cv_have_openssl = xyes)
216 AM_CONDITIONAL(HAVE_ACLS, test x"$with_acl_support" = x"yes")
217 AM_CONDITIONAL(HAVE_LDAP, test x"$netatalk_cv_ldap" = x"yes")
218 AM_CONDITIONAL(USE_DHX, test x$neta_cv_compile_dhx = xyes)
219 AM_CONDITIONAL(USE_DHX2, test x$neta_cv_compile_dhx2 = xyes)
220 AM_CONDITIONAL(USE_RANDNUM, test x$neta_cv_have_openssl = xyes)
221 AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
222 AM_CONDITIONAL(USE_PAM, test x$netatalk_cv_install_pam = xyes)
223 AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
224 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
225 AM_CONDITIONAL(DEFAULT_HOOK, test x$neta_cv_have_libgcrypt != xyes && test x$neta_cv_have_openssl != xyes)
226 AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes)
227 AM_CONDITIONAL(HAVE_ATFUNCS, test x"$ac_neta_haveatfuncs" = x"yes")
228 AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
230 dnl Enable silent Automake rules if present
231 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
233 dnl --------------------- generate files
237 bin/afppasswd/Makefile
239 bin/cnid/cnid2_create
240 bin/megatron/Makefile
246 contrib/macusers/Makefile
247 contrib/macusers/macusers
248 contrib/shell_utils/Makefile
249 contrib/shell_utils/apple_dump
250 contrib/shell_utils/asip-status.pl
252 distrib/config/Makefile
253 distrib/config/netatalk-config
254 distrib/initscripts/Makefile
260 doc/manual/manual.xml
261 doc/manpages/Makefile
262 doc/manpages/man1/Makefile
263 doc/manpages/man5/Makefile
264 doc/manpages/man8/Makefile
267 etc/cnid_dbd/Makefile
268 etc/netatalk/Makefile
269 etc/spotlight/Makefile
272 include/atalk/Makefile
274 libatalk/acl/Makefile
275 libatalk/adouble/Makefile
276 libatalk/bstring/Makefile
277 libatalk/cnid/Makefile
278 libatalk/cnid/cdb/Makefile
279 libatalk/cnid/last/Makefile
280 libatalk/cnid/dbd/Makefile
281 libatalk/cnid/tdb/Makefile
282 libatalk/compat/Makefile
283 libatalk/dsi/Makefile
284 libatalk/iniparser/Makefile
285 libatalk/talloc/Makefile
286 libatalk/tdb/Makefile
287 libatalk/unicode/Makefile
288 libatalk/unicode/charsets/Makefile
289 libatalk/util/Makefile
290 libatalk/vfs/Makefile
295 man/man1/afpldaptest.1
298 man/man1/apple_dump.1
299 man/man1/asip-status.pl.1
302 man/man1/netatalk-config.1
306 man/man5/afp_signature.conf.5
307 man/man5/afp_voluuid.conf.5
308 man/man5/extmap.conf.5
312 man/man8/cnid_metad.8
317 [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
320 AC_NETATALK_LIBS_SUMMARY
321 AC_NETATALK_CONFIG_SUMMARY