1 dnl configure.in for netatalk
3 AC_INIT(bin/adv1tov2/adv1tov2.c)
5 NETATALK_VERSION=`cat VERSION`
6 AC_SUBST(NETATALK_VERSION)
9 AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
10 AM_CONFIG_HEADER(config.h)
12 dnl Reset locations to proper places
13 AC_PREFIX_DEFAULT(/usr)
15 dnl Checks for programs.
23 dnl *********************************************************************
24 dnl FIXME! FIXME! These should be selectable properly, and should produce
25 dnl the proper flags and defines...
26 dnl *********************************************************************
28 dnl Checks for libraries.
29 dnl Replace `main' with a function in -labs:
30 AC_CHECK_LIB(abs, main)
31 dnl Replace `main' with a function in -laudit:
32 AC_CHECK_LIB(audit, main)
33 dnl Replace `main' with a function in -lauth:
34 AC_CHECK_LIB(auth, main)
35 dnl Replace `main' with a function in -lcmd:
36 AC_CHECK_LIB(cmd, main)
37 dnl Replace `main' with a function in -lcom_err:
38 AC_CHECK_LIB(com_err, main)
39 dnl Replace `main' with a function in -lcrypt:
40 AC_CHECK_LIB(crypt, main)
41 dnl Replace `main' with a function in -lcrypto:
42 AC_CHECK_LIB(crypto, main)
43 dnl Replace `main' with a function in -ld:
45 dnl Replace `main' with a function in -ldb:
46 AC_CHECK_LIB(db, main)
47 dnl Replace `main' with a function in -ldes:
48 AC_CHECK_LIB(des, main)
49 dnl Replace `main' with a function in -ldl:
50 AC_CHECK_LIB(dl, main)
51 dnl Replace `main' with a function in -lkauth:
52 AC_CHECK_LIB(kauth, main)
53 dnl Replace `main' with a function in -lkrb:
54 AC_CHECK_LIB(krb, main)
55 dnl Replace `main' with a function in -llwp:
56 AC_CHECK_LIB(lwp, main)
57 dnl Replace `main' with a function in -ln:
59 dnl Replace `main' with a function in -lnsl:
60 AC_CHECK_LIB(nsl, main)
61 dnl Replace `main' with a function in -lprot:
62 AC_CHECK_LIB(prot, main)
63 dnl Replace `main' with a function in -lresolv:
64 AC_CHECK_LIB(resolv, main)
65 dnl Replace `main' with a function in -lrpcsvc:
66 AC_CHECK_LIB(rpcsvc, main)
67 dnl Replace `main' with a function in -lrx:
68 AC_CHECK_LIB(rx, main)
69 dnl Replace `main' with a function in -lrxkad:
70 AC_CHECK_LIB(rxkad, main)
71 dnl Replace `main' with a function in -lsocket:
72 AC_CHECK_LIB(socket, main)
73 dnl Replace `main' with a function in -lsys:
74 AC_CHECK_LIB(sys, main)
75 dnl Replace `main' with a function in -lubik:
76 AC_CHECK_LIB(ubik, main)
78 dnl Checks for header files.
82 AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h)
84 dnl --- check for openssl headers ... if so, add proper flags
85 AC_CHECK_HEADER(openssl/cast.h,
86 AC_DEFINE(OPENSSL_DHX, 1)
88 AC_MSG_RESULT([including openssl libraries])
92 dnl Checks for typedefs, structures, and compiler characteristics.
104 dnl Checks for library functions.
106 AC_PROG_GCC_TRADITIONAL
113 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strstr strtoul)
115 dnl --------------------------------------------------------------------------
116 dnl specific configuration comes in here:
117 dnl --------------------------------------------------------------------------
119 AC_ARG_WITH(admin-group,
120 [ --with-admin-group=grp enable and set administrative group],
122 AC_DEFINE_UNQUOTED(ADMIN_GRP, "$admin_grp")
123 AC_MSG_RESULT([enabling administrative group "$admin_grp"]),
126 AC_ARG_WITH(auth-printing-dir,
127 [ --with-auth-printing-dir=path
128 path to authenticated printing directory],
130 AC_DEFINE_UNQUOTED(CAPDIR, "$cap_dir")
132 AC_MSG_RESULT([enabling authenticated printing support]),
135 AC_ARG_WITH(config-dir,
136 [ --with-config-dir=path path to config files [default=/etc/atalk]],
137 config_dir="$withval",
138 config_dir="/etc/atalk"
140 AC_DEFINE_UNQUOTED(CONFIG_DIR, "$config_dir",
141 [path to config dir [default=/etc/atalk]])
142 CONFIG_DIR="$config_dir"
144 AC_MSG_RESULT([setting configuration files location to $CONFIG_DIR]),
146 AC_ARG_WITH(cracklib,
147 [ --with-cracklib=dict enable/set location of cracklib dictionary],
149 AC_CHECK_LIB(crack, main,
150 AC_DEFINE(USE_CRACKLIB)
152 AC_MSG_RESULT([enabling cracklib support])
153 if test "$cracklib" = "yes"; then
154 cracklib="/usr/lib/cracklib_dict"
156 AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
157 [path to cracklib dictionary])
158 AC_MSG_RESULT([setting cracklib dictionary to $cracklib]),
159 AC_MSG_ERROR([cracklib not found!])
164 [ --disable-ddp disable DDP],
165 if test "$enableval" = "no"; then
167 AC_MSG_RESULT([disabling DDP])
172 [ --enable-debug enable debug code],
174 AC_MSG_RESULT([enabling debugging code]),
179 AC_ARG_WITH(message-dir,
180 [ --with-msg-dir=path path to message files [default=/etc/atalk/msg]],
182 if test x"$msg_dir" = "x"; then
183 msg_dir="$CONFIG_DIR/msg"
185 AC_DEFINE_UNQUOTED(SERVERTEXT, "$msg_dir",
186 [path to message dir [default=$CONFIG_DIR/msg]])
187 SERVERTEXT="$msg_dir"
192 [ --with-pam enable password authentication modules support],
193 AC_CHECK_LIB(pam, main,
196 AC_MSG_RESULT([enabling pam modules support])
201 [ --with-shadow enable shadow password support],
202 AC_MSG_RESULT([enabling shadow password support])
206 AC_ARG_WITH(flock-locks,
207 [ --with-flock-locks enable flock locks support],
208 AC_MSG_RESULT([enabling flock locks])
209 AC_DEFINE(USE_FLOCK_LOCKS)
212 AC_ARG_WITH(tcp-wrappers,
213 [ --with-tcp-wrappers enable TCP wrappers support],
214 AC_CHECK_LIB(wrap, main,
217 AC_MSG_RESULT([enabling TCP wrappers support])
221 AC_ARG_WITH(uams-path,
222 [ --with-uams-path=path path to UAMs [default=/etc/atalk/uams]],
223 uams_path="$withval",
224 uams_path="/etc/atalk/uams"
226 AC_DEFINE_UNQUOTED(UAMS_PATH, "$uams_path",
227 [path to UAMs [default=/etc/atalk/uams]])
228 UAMS_PATH="$uams_path"
231 dnl --------------------------------------------------------------------------
232 dnl drop in includes for top level directory structures here...
233 dnl --------------------------------------------------------------------------
234 LIBS="$LIBS -L\$(top_srcdir)/libatalk/"
235 CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/sys"
237 dnl --------------------------------------------------------------------------
238 dnl specific configuration comes in here:
239 dnl --------------------------------------------------------------------------
241 dnl --------------------- determine operating system from "target"
242 case "$ac_cv_target_os" in
243 *freebsd*) this_os=freebsd ;;
244 *linux*) this_os=linux ;;
245 *openbsd*) this_os=openbsd ;;
246 *netbsd*) this_os=netbsd ;;
247 *solaris*) this_os=solaris ;;
250 case "$ac_cv_target_cpu" in
251 i386|i486|i586|i686|k7) this_cpu=x86 ;;
252 alpha) this_cpu=alpha ;;
253 mips) this_cpu=mips ;;
254 powerpc|ppc) this_cpu=ppc ;;
257 dnl --------------------- operating system specific flags (port from sys/*)
259 dnl ----- FreeBSD specific -----
260 if test x"$this_os" = "xfreebsd"; then
261 AC_MSG_RESULT([ * FreeBSD specific configuration])
263 AC_DEFINE(SENDFILE_FLAVOR_BSD)
266 dnl ----- Linux specific -----
267 if test x"$this_os" = "xlinux"; then
268 AC_MSG_RESULT([ * Linux specific configuration])
269 AC_DEFINE(SENDFILE_FLAVOR_LINUX)
271 dnl ----- check if we need the quotactl wrapper
272 AC_CHECK_HEADER(sys/quota.h,,
273 AC_MSG_RESULT([enabling quotactl wrapper])
274 AC_DEFINE(NEED_QUOTACTL_WRAPPER)
277 dnl ----- Linux/alpha specific -----
278 if test x"$this_cpu" = "xalpha"; then
279 AC_MSG_RESULT([enabling gcc memcpy bug workaround])
280 AC_DEFINE(HAVE_GCC_MEMCPY_BUG)
284 dnl ----- NetBSD specific -----
285 if test x"$this_os" = "xnetbsd"; then
286 AC_MSG_RESULT([ * NetBSD specific configuration])
288 AC_DEFINE(DLSYM_PREPEND_UNDERSCORE)
289 CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
292 dnl ----- OpenBSD specific -----
293 if test x"$this_os" = "xopenbsd"; then
294 AC_MSG_RESULT([ * OpenBSD specific configuration])
298 dnl ----- Solaris specific -----
299 if test x"$this_os" = "xsolaris"; then
300 AC_MSG_RESULT([ * Solaris specific configuration])
302 AC_DEFINE(_ISOC9X_SOURCE)
303 AC_DEFINE(NO_STRUCT_TM_GMTOFF)
308 dnl --------------------- last minute substitutions
312 AM_CONDITIONAL(USE_DHX, test x$compile_dhx = xyes)
314 dnl --------------------- generate files
318 bin/adv1tov2/Makefile
321 bin/afppasswd/Makefile
322 bin/getzones/Makefile
323 bin/megatron/Makefile
330 contrib/printing/Makefile
331 contrib/shell_utils/Makefile
332 contrib/timelord/Makefile
334 distrib/config/Makefile
335 distrib/config/netatalk-config
336 distrib/initscripts/Makefile
337 distrib/initscripts/rc.atalk.redhat
341 etc/afpd/nls/Makefile
347 include/atalk/Makefile
349 libatalk/adouble/Makefile
350 libatalk/asp/Makefile
351 libatalk/atp/Makefile
352 libatalk/compat/Makefile
353 libatalk/dsi/Makefile
354 libatalk/nbp/Makefile
355 libatalk/netddp/Makefile
356 libatalk/util/Makefile
363 sys/netatalk/Makefile
365 [chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]