netatalk-2.2.2/0000777000175200017500000000000011704770433010335 500000000000000netatalk-2.2.2/Makefile.am0000644000175200017500000000040511655731126012305 00000000000000# Makefile.am for top level of netatalk package
SUBDIRS = libatalk bin config etc man contrib distrib include sys doc macros test
EXTRA_DIST = CONTRIBUTORS COPYRIGHT COPYING NEWS VERSION services.atalk
ACLOCAL_AMFLAGS = -I macros
AUTOMAKE_OPTIONS = foreign
netatalk-2.2.2/config/0000777000175200017500000000000011704770424011602 500000000000000netatalk-2.2.2/config/Makefile.am0000644000175200017500000001074711655731243013564 00000000000000## Makefile.am for config/
SUBDIRS = pam
SUFFIXES = .tmpl .
TMPLFILES = afpd.conf.tmpl AppleVolumes.default.tmpl
GENFILES = afpd.conf AppleVolumes.default
CLEANFILES = $(GENFILES)
EXTRA_DIST = \
AppleVolumes.default.tmpl \
AppleVolumes.system \
afp_ldap.conf \
afpd.conf.tmpl \
atalkd.conf \
netatalk.conf \
papd.conf
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
if USE_DEBIAN
CONFFILES = AppleVolumes.system
else
CONFFILES = AppleVolumes.system netatalk.conf
endif
if HAVE_ACLS
CONFFILES += afp_ldap.conf
endif
if USE_APPLETALK
CONFFILES += atalkd.conf papd.conf
endif
pkgconfdir = @PKGCONFDIR@
webminpath = @WEBMIN_PATH@
webminuser = @WEBMIN_USER@
webminversion = @WEBMIN_VERSION@
webminpass = @WEBMIN_PASS@
webminport = @WEBMIN_PORT@
#
# rule to parse template files
#
.tmpl:
sed -e s@:UAMS_PATH:@${UAMS_PATH}@ \
-e s@:ETCDIR:@${pkgconfdir}@ \
-e s@:COMPILED_BACKENDS:@"$(compiled_backends)"@ \
-e s@:DEFAULT_CNID_SCHEME:@$(DEFAULT_CNID_SCHEME)@ \
<$< >$@
#
# install configuration files
#
install-data-local: install-config-files install-webmin
uninstall-local:
for f in $(CONFFILES) $(GENFILES); do \
echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
done
if USE_DEBIAN
rm -f $(DESTDIR)/etc/default/netatalk
endif
install-config-files: $(CONFFILES) $(GENFILES)
$(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
for f in $(CONFFILES) $(GENFILES); do \
if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \
else \
echo "not overwriting $$f"; \
fi; \
done
if USE_DEBIAN
$(mkinstalldirs) $(DESTDIR)/etc/default
if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f /etc/default/netatalk; then \
echo "$(INSTALL_DATA) $(srcdir)/netatalk.conf $(DESTDIR)/etc/default/netatalk"; \
$(INSTALL_DATA) $(srcdir)/netatalk.conf $(DESTDIR)/etc/default/netatalk; \
else \
echo "not overwriting /etc/default/netatalk"; \
fi
endif
install-webmin:
if test "x$(webminpath)" != "x"; then \
if ! test -d "x$(webminpath)"; then \
mkdir -p "$(webminpath)"; \
fi; \
cd "$(webminpath)"; \
wget http://prdownloads.sourceforge.net/webadmin/webmin-$(webminversion).tar.gz ; \
tar xzf webmin-$(webminversion).tar.gz; \
rm webmin-$(webminversion).tar.gz; \
/etc/init.d/webmin stop; \
rm -r webmin; \
mv webmin-$(webminversion) webmin; \
cd webmin; \
rm -r adsl-client apache at backup-config bacula-backup bandwidth bind8 bsdexports burner \
cfengine cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin \
cluster-usermin cluster-webmin custom \
cron dfsadmin dhcpd dnsadmin dovecot exim exports \
fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports \
htaccess-htpasswd idmapd inetd inittab ipfilter ipfw ipsec jabber \
ldap-server lilo logrotate lpadmin lvm \
mailboxes mailcap majordomo man mon mscstyle3 mysql \
net nis openslp pap phpini postfix postgresql ppp-client pptp-client pptp-server \
procmail proftpd pserver qmailadmin raid rbac \
samba sarg sendmail sentry sgiexports shell \
shorewall smart-status smf software spam squid sshd \
status stunnel tcpwrappers telnet time tunnel \
updown usermin vgetty webalizer wuftpd xinetd zones; \
wget https://sourceforge.net/projects/netatalk/files/Netatalk%20Webmin%20Module/0.9-beta2/netatalk.wbm.gz/download ; \
tar xzf netatalk.wbm.gz; \
rm netatalk.wbm.gz; \
cd netatalk; \
rm config; \
echo "applevolumedefault_c=$(sysconfdir)/netatalk/AppleVolumes.default" >> config; \
echo "applevolumesystem_c=$(sysconfdir)/netatalk/AppleVolumes.system" >> config; \
echo "afpd_c=$(sysconfdir)/netatalk/afpd.conf" >> config; \
echo "atalk_c=$(sysconfdir)/netatalk/atalk.conf" >> config; \
echo "papd_c=$(sysconfdir)/netatalk/papd.conf" >> config; \
echo "afpd_d=$(sbindir)/afpd" >> config; \
echo "atalkd_d=$(sbindir)/atalkd" >> config; \
echo "papd_d=$(sbindir)/papd" >> config; \
echo "netatalk_c=@PAMDIR@/etc/pam.d" >> config; \
echo "atalk_start=$(sysconfdir)/init.d/atalk" >> config; \
echo "select_minUsers=" >> config; \
echo "select_maxUsers=" >> config; \
echo "atalk_nls=" >> config; \
cd ..; \
config_dir="$(sysconfdir)/netatalk/webmin-config" \
var_dir="$(prefix)/var" \
perl="`which perl`" \
port="$(webminport)" \
login="$(webminuser)" \
password="$(webminpass)" \
ssl=1 \
atboot=1 \
bootscript=netamin \
./setup.sh > /dev/null; \
fi
netatalk-2.2.2/config/Makefile.in0000644000175200017500000005257211703521724013572 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@HAVE_ACLS_TRUE@am__append_1 = afp_ldap.conf
@USE_APPLETALK_TRUE@am__append_2 = atalkd.conf papd.conf
subdir = config
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = pam
SUFFIXES = .tmpl .
TMPLFILES = afpd.conf.tmpl AppleVolumes.default.tmpl
GENFILES = afpd.conf AppleVolumes.default
CLEANFILES = $(GENFILES)
EXTRA_DIST = \
AppleVolumes.default.tmpl \
AppleVolumes.system \
afp_ldap.conf \
afpd.conf.tmpl \
atalkd.conf \
netatalk.conf \
papd.conf
@USE_DEBIAN_FALSE@CONFFILES = AppleVolumes.system netatalk.conf \
@USE_DEBIAN_FALSE@ $(am__append_1) $(am__append_2)
@USE_DEBIAN_TRUE@CONFFILES = AppleVolumes.system $(am__append_1) \
@USE_DEBIAN_TRUE@ $(am__append_2)
pkgconfdir = @PKGCONFDIR@
webminpath = @WEBMIN_PATH@
webminuser = @WEBMIN_USER@
webminversion = @WEBMIN_VERSION@
webminpass = @WEBMIN_PASS@
webminport = @WEBMIN_PORT@
all: all-recursive
.SUFFIXES:
.SUFFIXES: .tmpl .
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign config/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-local
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-local
#
# rule to parse template files
#
.tmpl:
sed -e s@:UAMS_PATH:@${UAMS_PATH}@ \
-e s@:ETCDIR:@${pkgconfdir}@ \
-e s@:COMPILED_BACKENDS:@"$(compiled_backends)"@ \
-e s@:DEFAULT_CNID_SCHEME:@$(DEFAULT_CNID_SCHEME)@ \
<$< >$@
#
# install configuration files
#
install-data-local: install-config-files install-webmin
uninstall-local:
for f in $(CONFFILES) $(GENFILES); do \
echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
done
@USE_DEBIAN_TRUE@ rm -f $(DESTDIR)/etc/default/netatalk
install-config-files: $(CONFFILES) $(GENFILES)
$(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
for f in $(CONFFILES) $(GENFILES); do \
if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \
else \
echo "not overwriting $$f"; \
fi; \
done
@USE_DEBIAN_TRUE@ $(mkinstalldirs) $(DESTDIR)/etc/default
@USE_DEBIAN_TRUE@ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f /etc/default/netatalk; then \
@USE_DEBIAN_TRUE@ echo "$(INSTALL_DATA) $(srcdir)/netatalk.conf $(DESTDIR)/etc/default/netatalk"; \
@USE_DEBIAN_TRUE@ $(INSTALL_DATA) $(srcdir)/netatalk.conf $(DESTDIR)/etc/default/netatalk; \
@USE_DEBIAN_TRUE@ else \
@USE_DEBIAN_TRUE@ echo "not overwriting /etc/default/netatalk"; \
@USE_DEBIAN_TRUE@ fi
install-webmin:
if test "x$(webminpath)" != "x"; then \
if ! test -d "x$(webminpath)"; then \
mkdir -p "$(webminpath)"; \
fi; \
cd "$(webminpath)"; \
wget http://prdownloads.sourceforge.net/webadmin/webmin-$(webminversion).tar.gz ; \
tar xzf webmin-$(webminversion).tar.gz; \
rm webmin-$(webminversion).tar.gz; \
/etc/init.d/webmin stop; \
rm -r webmin; \
mv webmin-$(webminversion) webmin; \
cd webmin; \
rm -r adsl-client apache at backup-config bacula-backup bandwidth bind8 bsdexports burner \
cfengine cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin \
cluster-usermin cluster-webmin custom \
cron dfsadmin dhcpd dnsadmin dovecot exim exports \
fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports \
htaccess-htpasswd idmapd inetd inittab ipfilter ipfw ipsec jabber \
ldap-server lilo logrotate lpadmin lvm \
mailboxes mailcap majordomo man mon mscstyle3 mysql \
net nis openslp pap phpini postfix postgresql ppp-client pptp-client pptp-server \
procmail proftpd pserver qmailadmin raid rbac \
samba sarg sendmail sentry sgiexports shell \
shorewall smart-status smf software spam squid sshd \
status stunnel tcpwrappers telnet time tunnel \
updown usermin vgetty webalizer wuftpd xinetd zones; \
wget https://sourceforge.net/projects/netatalk/files/Netatalk%20Webmin%20Module/0.9-beta2/netatalk.wbm.gz/download ; \
tar xzf netatalk.wbm.gz; \
rm netatalk.wbm.gz; \
cd netatalk; \
rm config; \
echo "applevolumedefault_c=$(sysconfdir)/netatalk/AppleVolumes.default" >> config; \
echo "applevolumesystem_c=$(sysconfdir)/netatalk/AppleVolumes.system" >> config; \
echo "afpd_c=$(sysconfdir)/netatalk/afpd.conf" >> config; \
echo "atalk_c=$(sysconfdir)/netatalk/atalk.conf" >> config; \
echo "papd_c=$(sysconfdir)/netatalk/papd.conf" >> config; \
echo "afpd_d=$(sbindir)/afpd" >> config; \
echo "atalkd_d=$(sbindir)/atalkd" >> config; \
echo "papd_d=$(sbindir)/papd" >> config; \
echo "netatalk_c=@PAMDIR@/etc/pam.d" >> config; \
echo "atalk_start=$(sysconfdir)/init.d/atalk" >> config; \
echo "select_minUsers=" >> config; \
echo "select_maxUsers=" >> config; \
echo "atalk_nls=" >> config; \
cd ..; \
config_dir="$(sysconfdir)/netatalk/webmin-config" \
var_dir="$(prefix)/var" \
perl="`which perl`" \
port="$(webminport)" \
login="$(webminuser)" \
password="$(webminpass)" \
ssl=1 \
atboot=1 \
bootscript=netamin \
./setup.sh > /dev/null; \
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/config/afpd.conf.tmpl0000644000175200017500000004715611655731243014270 00000000000000#
# CONFIGURATION FOR AFPD
#
# Each single line defines a virtual server that should be available.
# Though, using "\" character, newline escaping is supported.
# Empty lines and lines beginning with `#' are ignored.
# Options in this file will override both compiled-in defaults
# and command line options.
#
#
# Format:
# - [options] to specify options for the default server
# "Server name" [options] to specify an additional server
#
#
# The following options are available:
# Transport Protocols:
# -[no]tcp Make "AFP over TCP" [not] available
# -[no]ddp Make "AFP over AppleTalk" [not] available.
# If you have -proxy specified, specify -uamlist "" to
# prevent ddp connections from working.
#
# -transall Make both available
#
# Transport Options:
# -ipaddr Specifies the IP address that the server should
# advertise and listens to. The default is advertise
# the first IP address of the system, but to listen
# for any incoming request. The network address may
# be specified either in dotted-decimal format for
# IPv4 or in hexadecimal format for IPv6.
# This option also allows to use one machine to
# advertise the AFP-over-TCP/IP settings of another
# machine via NBP when used together with the -proxy
# option.
# -server_quantum
# Specifies the DSI server quantum. The minimum
# value is 1MB. The max value is 0xFFFFFFFF. If you
# specify a value that is out of range, you'll get
# the default value (currently the minimum).
# -admingroup
# Specifies the group of administrators who should
# all be seen as the superuser when they log in.
# Default is disabled.
# -ddpaddr x.y Specifies the DDP address of the server.
# the default is to auto-assign an address (0.0).
# this is only useful if you're running on
# a multihomed host.
# -port Specifies the TCP port the server should respond
# to (default is 548)
# -fqdn specify a fully-qualified domain name (+optional
# port). this gets discarded if the server can't
# resolve it. this is not honored by appleshare
# clients <= 3.8.3 (default: none)
# -hostname Use this instead of the result from calling
# hostname for dertermening which IP address to
# advertise, therfore the hostname is resolved to
# an IP which is the advertised. This is NOT used for
# listening and it is also overwritten by -ipaddr.
# -proxy Run an AppleTalk proxy server for specified
# AFP/TCP server (if address/port aren't given,
# then first IP address of the system/548 will
# be used).
# if you don't want the proxy server to act as
# a ddp server as well, set -uamlist to an empty
# string.
# -dsireadbuf [number]
# Scale factor that determines the size of the
# DSI/TCP readahead buffer, default is 12. This is
# multiplies with the DSI server quantum (default
# ~300k) to give the size of the buffer. Increasing
# this value might increase throughput in fast local
# networks for volume to volume copies. Note: This
# buffer is allocated per afpd child process, so
# specifying large values will eat up large amount of
# memory (buffer size * number of clients).
# -tcprcvbuf [number]
# Try to set TCP receive buffer using setsockpt().
# Often OSes impose restrictions on the applications
# ability to set this value.
# -tcpsndbuf [number]
# Try to set TCP send buffer using setsockpt().
# Often OSes impose restrictions on the applications
# ability to set this value.
# -slp Register this server with the Service Location
# Protocol (if SLP support was compiled in).
# -nozeroconf Don't register this server with the Multicats
# DNS Protocol.
# -advertise_ssh Allows Mac OS X clients (10.3.3-10.4) to
# automagically establish a tunneled AFP connection
# through SSH. This option is not so significant
# for the recent Mac OS X. See the Netatalk Manual
# in detail.
#
#
# Authentication Methods:
# -uampath Use this path to look for User Authentication Modules.
# (default: :UAMS_PATH:)
# -uamlist Comma-separated list of UAMs.
# (default: uams_dhx.so,uams_dhx2.so)
#
# some commonly available UAMs:
# uams_guest.so: Allow guest logins
#
# uams_clrtxt.so: (uams_pam.so or uams_passwd.so)
# Allow logins with passwords
# transmitted in the clear.
#
# uams_randnum.so: Allow Random Number and Two-Way
# Random Number exchange for
# authentication.
#
# uams_dhx.so: (uams_dhx_pam.so or uams_dhx_passwd.so)
# Allow Diffie-Hellman eXchange
# (DHX) for authentication.
#
# uams_dhx2.so: (uams_dhx2_pam.so or uams_dhx2_passwd.so)
# Allow Diffie-Hellman eXchange 2
# (DHX2) for authentication.
#
# Password Options:
# -[no]savepassword [Don't] Allow clients to save password locally
# -passwdfile Use this path to store Randnum passwords.
# (Default: :ETCDIR:/afppasswd. The only other
# useful value is ~/.passwd. See 'man afppasswd'
# for details.)
# -passwdminlen <#> minimum password length. may be ignored.
# -[no]setpassword [Don't] Allow clients to change their passwords.
# -loginmaxfail <#> maximum number of failed logins. this may be
# ignored if the uam can't handle it.
#
# AppleVolumes files:
# -defaultvol Specifies path to AppleVolumes.default file
# (default :ETCDIR:/AppleVolumes.default,
# same as -f on command line)
# -systemvol Specifies path to AppleVolumes.system file
# (default :ETCDIR:/AppleVolumes.system,
# same as -s on command line)
# -[no]uservolfirst [Don't] read the user's ~/AppleVolumes or
# ~/.AppleVolumes before reading
# :ETCDIR:/AppleVolumes.default
# (same as -u on command line)
# -[no]uservol [Don't] Read the user's volume file
# -closevol Immediately unmount volumes removed from
# AppleVolumes files on SIGHUP sent to the afp
# master process.
#
# Miscellaneous:
# -authprintdir Specifies the path to be used (per server) to
# store the files required to do CAP-style
# print authentication which papd will examine
# to determine if a print job should be allowed.
# These files are created at login and if they
# are to be properly removed, this directory
# probably needs to be umode 1777
# -guestname "user" Specifies the user name for the guest login
# (default "nobody", same as -g on command line)
# -loginmesg "Message" Client will display "Message" upon logging in
# (no default, same as -l "Message" on commandline)
# -nodebug Switch off debugging
# -client_polling With this switch enabled, afpd won't advertise
# that it is capable of server notifications, so that
# connected clients poll the server every 10 seconds
# to detect changes in opened server windows.
# Note: Depending on the number of simultaneously
# connected clients and the network's speed, this can
# lead to a significant higher load on your network!
# -sleep AFP 3.x wait number hours before disconnecting
# clients in sleep mode. Default 10 hours
# -tickleval Specify the tickle timeout interval (in seconds).
# Note, this defaults to 30 seconds, and really
# shouldn't be changed. If you want to control
# the server idle timeout, use the -timeout option.
# -timeout Specify the number of tickles to send before
# timing out a connection.
# The default is 4, therefore a connection will
# timeout in 2 minutes.
# -[no]icon [Don't] Use the platform-specific icon. Recent
# Mac OS don't display it any longer.
# -volnamelen
# Max length of UTF8-MAC volume name for Mac OS X.
# Note that Hangul is especially sensitive to this.
# 255: limit of spec
# 80: limit of generic Mac OS X (default)
# 73: limit of Mac OS X 10.1, if >= 74
# Finder crashed and restart repeatedly.
# Mac OS 9 and earlier is not influenced by this,
# Maccharset volume names are always limitted to 27.
# -[un]setuplog " []"
# Specify that any message of a loglevel up to the
# given loglevel should be logged to the given file.
# If the filename is ommited the loglevel applies to
# messages passed to syslog.
#
# By default (no explicit -setuplog and no buildtime
# configure flag --with-logfile) afpd logs to syslog
# with a default logging setup equivalent to
# "-setuplog default log_info".
#
# If build with --with-logfile[=somefile]
# (default logfile /var/log/netatalk.log) afpd
# defaults to a setup that is equivalent to
# "-setuplog default log_info [netatalk.log|somefile]"
#
# logtypes: Default, AFPDaemon, Logger, UAMSDaemon
# loglevels: LOG_SEVERE, LOG_ERROR, LOG_WARN,
# LOG_NOTE, LOG_INFO, LOG_DEBUG,
# LOG_DEBUG6, LOG_DEBUG7, LOG_DEBUG8,
# LOG_DEBUG9, LOG_MAXDEBUG
#
# Example: Useful default config
# -setuplog "default log_info /var/log/afpd.log"
#
# Debugging config
# -setuplog "default log_maxdebug /var/log/afpd.log"
#
# -signature { user: | auto }
# Specify a server signature. This option is useful
# while running multiple independent instances of
# afpd on one machine (eg. in clustered environments,
# to provide fault isolation etc.).
# Default is "auto".
# "auto" signature type allows afpd generating
# signature and saving it to afp_signature.conf
# automatically (based on random number).
# "host" signature type switches back to "auto"
# because it is obsoleted.
# "user" signature type allows administrator to
# set up a signature string manually.
# Examples: three servers running on one machine:
# first -signature user:USERS
# second -signature user:USERS
# third -signature user:ADMINS
# First two servers will act as one logical AFP
# service. If user logs in to first one and then
# connects to second one, session will be
# automatically redirected to the first one. But if
# client connects to first and then to third,
# will be asked for password twice and will see
# resources of both servers.
# Traditional method of signature generation causes
# two independent afpd instances to have the same
# signature and thus cause clients to be redirected
# automatically to server (s)he logged in first.
# -k5keytab
# -k5service
# -k5realm
# These are required if the server supports
# Kerberos 5 authentication
# -ntdomain
# -ntseparator
# Use for eg. winbind authentication, prepends
# both strings before the username from login and
# then tries to authenticate with the result
# through the availabel and active UAM authentication
# modules.
# -dircachesize entries
# Maximum possible entries in the directory cache.
# The cache stores directories and files. It is used
# to cache the full path to directories and CNIDs
# which considerably speeds up directory enumeration.
# Default size is 8192, maximum size is 131072. Given
# value is rounded up to nearest power of 2. Each
# entry takes about 100 bytes, which is not much, but
# remember that every afpd child process for every
# connected user has its cache.
# -fcelistener host[:port]
# Enables sending FCE events to the specified host,
# default port is 12250 if not specified. Specifying
# mutliple listeners is done by having this option
# once for each of them.
# -fceevents fmod,fdel,ddel,fcre,dcre,tmsz
# Speficies which FCE events are active, default is
# fmod,fdel,ddel,fcre,dcre.
# -fcecoalesce all|delete|create
# Coalesce FCE events.
# -fceholdfmod seconds
# This determines the time delay in seconds which is
# always waited if another file modification for the
# same file is done by a client before sending an FCE
# file modification event (fmod). For example saving
# a file in Photoshop would generate multiple events
# by itself because the application is opening,
# modifying and closing a file mutliple times for
# every "save". Defautl: 60 seconds.
# -keepsessions Enable "Continuous AFP Service". This means the
# ability to stop the master afpd process with a
# SIGQUIT signal, possibly install an afpd update and
# start the afpd process. Existing AFP sessions afpd
# processes will remain unaffected. Technically they
# will be notified of the master afpd shutdown, sleep
# 15-20 seconds and then try to reconnect their IPC
# channel to the master afpd process. If this
# reconnect fails, the sessions are in an undefined
# state. Therefor it's absolutely critical to restart
# the master process in time!
# -noacl2maccess Don't map filesystem ACLs to effective permissions.
#
# Codepage Options:
# -unixcodepage Specifies the servers unix codepage,
# e.g. "ISO-8859-15" or "UTF8".
# This is used to convert strings to/from
# the systems locale, e.g. for authenthication.
# Defaults to LOCALE if your system supports it,
# otherwise ASCII will be used.
#
# -maccodepage Specifies the legacy clients (<= Mac OS 9)
# codepage, e.g. "MAC_ROMAN".
# This is used to convert strings to the
# systems locale, e.g. for authenthication
# and SIGUSR2 messaging. This will also be
# the default for volumes maccharset.
#
# CNID related options:
# -cnidserver
# Specifies the IP address and port of a
# cnid_metad server, required for CNID dbd
# backend. Defaults to localhost:4700.
# The network address may be specified either
# in dotted-decimal format for IPv4 or in
# hexadecimal format for IPv6.
#
# Avahi (Bonjour) related options:
# -mimicmodel
# Specifies the icon model that appears on
# clients. Defaults to off. Examples: RackMac
# (same as Xserve), PowerBook, PowerMac, Macmini,
# iMac, MacBook, MacBookPro, MacBookAir, MacPro,
# AppleTV1,1, AirPort
#
#
# Some examples:
#
# The simplest case is to not have an afpd.conf.
#
# 4 servers w/ names server1-3 and one w/ the hostname. servers
# 1-3 get routed to different ports with server 3 being bound
# specifically to address 192.168.1.3
#
# -
# server1 -port 12000
# server2 -port 12001
# server3 -port 12002 -ipaddr 192.168.1.3
#
# a dedicated guest server, a user server, and a special
# AppleTalk-only server:
#
# "Guest Server" -uamlist uams_guest.so \
# -loginmesg "Welcome guest! I'm a public server."
# "User Server" -uamlist uams_dhx2.so -port 12000
# "special" -ddp -notcp -defaultvol -systemvol
#
# default:
# - -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword
netatalk-2.2.2/config/AppleVolumes.default.tmpl0000644000175200017500000002260111655731243016455 00000000000000# This file looks empty when viewed with "vi". In fact, there is one
# '~', so users with no AppleVolumes file in their home directory get
# their home directory by default.
#
# volume format:
# :DEFAULT: [all of the default options except volume name]
# path [name] [casefold:x] [options:z,l,j] \
# [allow:a,@b,c,d] [deny:a,@b,c,d] [dbpath:path] [password:p] \
# [rwlist:a,@b,c,d] [rolist:a,@b,c,d] [limitsize:value in bytes] \
# [preexec:cmd] [root_preexec:cmd] [postexec:cmd] [root_postexec:cmd] \
# [allowed_hosts:IPv4 address[/IPv4 netmask bits]] \
# [denied_hosts:IPv4 address[/IPv4 netmask bits]] \
# ... more, see below ...
#
# name: volume name. it can't include the ':' character
#
#
# variable substitutions:
# you can use variables for both and now. here are the
# rules:
# 1) if you specify an unknown variable, it will not get converted.
# 2) if you specify a known variable, but that variable doesn't have
# a value, it will get ignored.
#
# the variables:
# $b -> basename of path
# $c -> client's ip or appletalk address
# $d -> volume pathname on server
# $f -> full name (whatever's in the gecos field)
# $g -> group
# $h -> hostname
# $i -> client ip without tcp port or appletalk network
# $s -> server name (can be the hostname)
# $u -> username (if guest, it's whatever user guest is running as)
# $v -> volume name (either ADEID_NAME or basename of path)
# $z -> zone (may not exist)
# $$ -> $
#
#
# casefold options [syntax: casefold:option]:
# tolower -> lowercases names in both directions
# toupper -> uppercases names in both directions
# xlatelower -> client sees lowercase, server sees uppercase
# xlateupper -> client sees uppercase, server sees lowercase
#
# allow/deny/rwlist/rolist format [syntax: allow:user1,@group]:
# user1,@group,user2 -> allows/denies access from listed users/groups
# rwlist/rolist control whether or not the
# volume is ro for those users.
# allowed_hosts -> Only listed hosts and networks are allowed,
# all others are rejected. Example:
# allowed_hosts:10.1.0.0/16,10.2.1.100
# denied_hosts -> Listed hosts and nets are rejected,
# all others are allowed. Example:
# denied_hosts: 192.168.100/24,10.1.1.1
# preexec -> command to be run when the volume is mounted,
# ignore for user defined volumes
# root_preexec -> command to be run as root when the volume is mounted,
# ignore for user defined volumes
# postexec -> command to be run when the volume is closed,
# ignore for user defined volumes
# root_postexec -> command to be run as root when the volume is closed,
# ignore for user defined volumes
# veto -> hide files and directories,where the path matches
# one of the "/" delimited vetoed names. Matches are
# partial, e.g. path is /abc/def/file and veto:/abc/
# will hide the file.
# adouble -> specify the format of the metadata files.
# default is "v2". netatalk 1.x used "v1".
# "osx" cannot be treated normally any longer.
# volsizelimit -> size in MiB. Useful for TimeMachine: limits the
# reported volume size, thus preventing TM from using
# the whole real disk space for backup.
# Example: "volsizelimit:1000" would limit the
# reported disk space to 1 GB.
#
# codepage options [syntax: options:charsetname]
# volcharset -> specifies the charset to be used
# as the volume codepage
# e.g. "UTF8", "UTF8-MAC", "ISO-8859-15"
# maccharset -> specifies the charset to be used
# as the legacy client (<=Mac OS 9) codepage
# e.g. "MAC_ROMAN", "MAC_CYRILLIC"
#
# perm -> default permission value
# OR with the client requested perm
# Use with options:upriv
# dperm -> default permission value for directories
# OR with the client requested perm
# Use with options:upriv
# fperm -> default permission value for files
# OR with the client requested perm
# Use with options:upriv
# umask -> set perm mask
# Use with options:upriv
# dbpath:path -> store the database stuff in the following path.
# cnidserver:server[:port]
# -> Query this servername or IP address
# (default:localhost) and port (default: 4700)
# for CNIDs. Only used with CNID backend "dbd".
# This option here overrides any setting from
# afpd.conf:cnidserver.
# password:password -> set a volume password (8 characters max)
# cnidscheme:scheme -> set the cnid scheme for the volume,
# default is [:DEFAULT_CNID_SCHEME:]
# available schemes: [:COMPILED_BACKENDS:]
# ea -> none|auto|sys|ad
# Specify how Extended Attributes are stores. default
# is auto.
# auto: try "sys" (by setting an EA on the shared
# directory itself), fallback to "ad". Requires
# writable volume for performing the test.
# Note: options:ro overwrites "auto" with "none."
# sys: Use filesystem EAs
# ad: Use files in AppleDouble directories
# none: No EA support
#
#
# miscellaneous options [syntax: options:option1,option2]:
# tm -> enable TimeMachine support
# prodos -> make compatible with appleII clients.
# crlf -> enable crlf translation for TEXT files.
# noadouble -> don't create .AppleDouble unless a resource
# fork needs to be created.
# ro -> mount the volume as read-only.
# mswindows -> enforce filename restrictions imposed by MS
# Windows. this will also invoke a default
# codepage (iso8859-1) if one isn't already
# specified.
# nohex -> don't do :hex translations for anything
# except dot files. specify usedots as well if
# you want that turned off. note: this option
# makes the / character illegal.
# usedots -> don't do :hex translation for dot files. note: when
# this option gets set, certain file names
# become illegal. these are .Parent and
# anything that starts with .Apple.
# invisibledots -> don't do :hex translation for dot files. note: when
# this option gets set, certain file names
# become illegal. these are .Parent and
# anything that starts with .Apple. also, dot
# files created on the unix side are marked invisible.
# limitsize -> limit disk size reporting to 2GB. this is
# here for older macintoshes using newer
# appleshare clients. yucko.
# nofileid -> don't advertise createfileid, resolveid, deleteid
# calls
# root_preexec_close -> a non-zero return code from root_preexec close the
# volume being mounted.
# preexec_close -> a non-zero return code from preexec close the
# volume being mounted.
# nostat -> don't stat volume path when enumerating volumes list
# upriv -> use unix privilege.
# illegalseq -> encode illegal sequence in filename asis,
# ex "\217-", which is not a valid SHIFT-JIS char,
# is encoded as U\217 -
# nocnidcache -> Don't store and read CNID to/from AppleDouble file.
# This should not be used as it also prevents a CNID
# database rebuild with `dbd`!
# caseinsensitive -> The underlying FS is case insensitive (only
# test with JFS in OS2 mode)
# dropbox -> Allows a volume to be declared as being a "dropbox."
# Note that netatalk must be compiled with dropkludge
# support for this to function. Warning: This option
# is deprecated and might not work as expected.
# dropkludge -> same as "dropbox"
# nodev -> always use 0 for device number, helps when the
# device number is not constant across a reboot,
# cluster, ...
#
# The line below sets some DEFAULT, starting with Netatalk 2.1.
:DEFAULT: options:upriv,usedots
# The "~" below indicates that Home directories are visible by default.
# If you do not wish to have people accessing their Home directories,
# please put a pound sign in front of the tilde or delete it.
~
# End of File
netatalk-2.2.2/config/AppleVolumes.system0000644000175200017500000006206211655731126015407 00000000000000# ($Id)
###
### Delete a '#' character at the head of line if you need.
### If clients are Mac OS X only, it is not especially necessary.
### However, it might be useful for Mac OS 9 or earlier.
###
### Use at your own risk. No guarantees express or implied.
###
### Try to use MacPerl script 'ICDumpSuffixMap' included in /usr/doc
### to download file mapping list from your Internet Config Preference.
###
### inoue@ma.ns.musashi-tech.ac.jp.
###
### default translation -- note that CR <-> LF translation is done on all
### files of type TEXT (if crlf is set in volume's options).
### The first line turns off translation for files of unknown type,
### the third turns this translation on.
###. "????" "????" Unix Binary Unix application/octet-stream
###. "BINA" "UNIX" Unix Binary Unix application/octet-stream
###. "TEXT" "ttxt" ASCII Text SimpleText text/plain
#.1st "TEXT" "ttxt" Text Readme SimpleText application/text
#.669 "6669" "SNPL" 669 MOD Music PlayerPro
#.8med "STrk" "SCPL" Amiga OctaMed music SoundApp
#.8svx "8SVX" "SCPL" Amiga 8-bit sound SoundApp
#.a "TEXT" "ttxt" Assembly Source SimpleText
#.aif "AIFF" "SCPL" AIFF Sound SoundApp audio/x-aiff
#.aifc "AIFC" "SCPL" AIFF Sound Compressed SoundApp audio/x-aiff
#.aiff "AIFF" "SCPL" AIFF Sound SoundApp audio/x-aiff
#.al "ALAW" "SCPL" ALAW Sound SoundApp
#.ani "ANIi" "GKON" Animated NeoChrome GraphicConverter
#.apd "TEXT" "ALD3" Aldus Printer Description Aldus PageMaker
#.arc "mArc" "SITx" PC ARChive StuffIt Expander
#.arj "BINA" "DArj" ARJ Archive DeArj
#.arr "ARR " "GKON" Amber ARR image GraphicConverter
#.art "ART " "GKON" First Publisher GraphicConverter
#.asc "TEXT" "ttxt" ASCII Text SimpleText text/plain
#.ascii "TEXT" "ttxt" ASCII Text SimpleText text/plain
#.asf "ASF_" "Ms01" Netshow Player Netshow Server video/x-ms-asf
#.asm "TEXT" "ttxt" Assembly Source SimpleText
#.asx "ASX_" "Ms01" Netshow Player Netshow Server video/x-ms-asf
#.au "ULAW" "TVOD" Sun Sound QuickTime Player audio/basic
#.avi "VfW " "TVOD" AVI Movie QuickTime Player video/avi
#.bar "BARF" "S691" Unix BAR Archive SunTar
#.bas "TEXT" "ttxt" BASIC Source SimpleText
#.bat "TEXT" "ttxt" MS-DOS Batch File SimpleText
#.bga "BMPp" "ogle" OS/2 Bitmap PictureViewer
#.bib "TEXT" "ttxt" BibTex Bibliography SimpleText
#.bin "SIT!" "SITx" MacBinary StuffIt Expander application/macbinary
#.binary "BINA" "hDmp" Untyped Binary Data HexEdit application/octet-stream
#.bmp "BMPp" "ogle" Windows Bitmap PictureViewer
#.boo "TEXT" "ttxt" BOO encoded SimpleText
#.bst "TEXT" "ttxt" BibTex Style SimpleText
#.bw "SGI " "GKON" SGI Image GraphicConverter
#.c "TEXT" "CWIE" C Source CodeWarrior
#.cgm "CGMm" "GKON" Computer Graphics Meta GraphicConverter
#.class "Clss" "CWIE" Java Class File CodeWarrior
#.clp "CLPp" "GKON" Windows Clipboard GraphicConverter
#.cmd "TEXT" "ttxt" OS/2 Batch File SimpleText
#.com "PCFA" "SWIN" MS-DOS Executable SoftWindows
#.cp "TEXT" "CWIE" C++ Source CodeWarrior
#.cpp "TEXT" "CWIE" C++ Source CodeWarrior
#.cpt "PACT" "SITx" Compact Pro Archive StuffIt Expander
#.csv "TEXT" "XCEL" Comma Separated Vars Excel
#.ct "..CT" "GKON" Scitex-CT GraphicConverter
#.cut "Halo" "GKON" Dr Halo Image GraphicConverter
#.cvs "drw2" "DAD2" Canvas Drawing Canvas
#.dbf "COMP" "FOX+" DBase Document FoxBase+
#.dcx "DCXx" "GKON" Some PCX Images GraphicConverter
#.dif "TEXT" "XCEL" Data Interchange Format Excel
#.diz "TEXT" "R*Ch" BBS Descriptive Text BBEdit
#.dl "DL " "AnVw" DL Animation MacAnim Viewer
#.dll "PCFL" "SWIN" Windows DLL SoftWindows
#.doc "WDBN" "MSWD" Word Document Microsoft Word application/msword
#.dot "sDBN" "MSWD" Word for Windows Template Microsoft Word
#.dvi "ODVI" "xdvi" TeX DVI Document xdvi application/x-dvi
#.dwt "TEXT" "DmWr" Dreamweaver Template Dreamweaver
#.dxf "TEXT" "SWVL" AutoCAD 3D Data Swivel Pro
#.eps "EPSF" "vgrd" Postscript LaserWriter 8 application/postscript
#.epsf "EPSF" "vgrd" Postscript LaserWriter 8 application/postscript
#.etx "TEXT" "ezVu" SEText Easy View text/x-setext
#.evy "EVYD" "ENVY" Envoy Document Envoy
#.exe "PCFA" "SWIN" MS-DOS Executable SoftWindows
#.faq "TEXT" "ttxt" ASCII Text SimpleText text/x-usenet-faq
#.fit "FITS" "GKON" Flexible Image Transport GraphicConverter image/x-fits
#.flc "FLI " "TVOD" FLIC Animation QuickTime Player
#.fli "FLI " "TVOD" FLI Animation QuickTime Player
#.fm "FMPR" "FMPR" FileMaker Pro Database FileMaker Pro
#.for "TEXT" "MPS " Fortran Source MPW Shell
#.fts "FITS" "GKON" Flexible Image Transport GraphicConverter
#.gem "GEM-" "GKON" GEM Metafile GraphicConverter
#.gif "GIFf" "ogle" GIF Picture PictureViewer image/gif
#.gl "GL " "AnVw" GL Animation MacAnim Viewer
#.grp "GRPp" "GKON" GRP Image GraphicConverter
#.gz "SIT!" "SITx" Gnu ZIP Archive StuffIt Expander application/x-gzip
#.h "TEXT" "CWIE" C Include File CodeWarrior
#.hcom "FSSD" "SCPL" SoundEdit Sound ex SOX SoundApp
#.hp "TEXT" "CWIE" C Include File CodeWarrior
#.hpgl "HPGL" "GKON" HP GL/2 GraphicConverter
#.hpp "TEXT" "CWIE" C Include File CodeWarrior
#.hqx "TEXT" "SITx" BinHex StuffIt Expander application/mac-binhex40
#.htm "TEXT" "MOSS" HyperText Netscape Communicator text/html
#.html "TEXT" "MOSS" HyperText Netscape Communicator text/html
#.i3 "TEXT" "R*ch" Modula 3 Interface BBEdit
#.ic1 "IMAG" "GKON" Atari Image GraphicConverter
#.ic2 "IMAG" "GKON" Atari Image GraphicConverter
#.ic3 "IMAG" "GKON" Atari Image GraphicConverter
#.icn "ICO " "GKON" Windows Icon GraphicConverter
#.ico "ICO " "GKON" Windows Icon GraphicConverter
#.ief "IEF " "GKON" IEF image GraphicConverter image/ief
#.iff "ILBM" "GKON" Amiga IFF Image GraphicConverter
#.ilbm "ILBM" "GKON" Amiga ILBM Image GraphicConverter
#.image "dImg" "ddsk" Apple DiskCopy Image Disk Copy
#.img "IMGg" "GKON" GEM bit image/XIMG GraphicConverter
#.ini "TEXT" "ttxt" Windows INI File SimpleText
#.java "TEXT" "CWIE" Java Source File CodeWarrior
#.jfif "JPEG" "ogle" JFIF Image PictureViewer
#.jpe "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg
#.jpeg "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg
#.jpg "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg
#.latex "TEXT" "OTEX" Latex OzTex application/x-latex
#.lbm "ILBM" "GKON" Amiga IFF Image GraphicConverter
#.lha "LHA " "SITx" LHArc Archive StuffIt Expander
#.lzh "LHA " "SITx" LHArc Archive StuffIt Expander
#.m1a "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg
#.m1s "MPEG" "TVOD" MPEG-1 systemstream MoviePlayer
#.m1v "M1V " "TVOD" MPEG-1 IPB videostream MoviePlayer video/mpeg
#.m2 "TEXT" "R*ch" Modula 2 Source BBEdit
#.m2v "MPG2" "MPG2" MPEG-2 IPB videostream MPEG2decoder
#.m3 "TEXT" "R*ch" Modula 3 Source BBEdit
#.mac "PICT" "ogle" PICT Picture PictureViewer image/x-pict
#.mak "TEXT" "R*ch" Makefile BBEdit
#.mcw "WDBN" "MSWD" Mac Word Document Microsoft Word
#.me "TEXT" "ttxt" Text Readme SimpleText
#.med "STrk" "SCPL" Amiga MED Sound SoundApp
#.mf "TEXT" "*MF*" Metafont Metafont
#.mid "Midi" "TVOD" MIDI Music MoviePlayer
#.midi "Midi" "TVOD" MIDI Music MoviePlayer
#.mif "TEXT" "Fram" FrameMaker MIF FrameMaker application/x-framemaker
#.mime "TEXT" "SITx" MIME Message StuffIt Expander message/rfc822
#.ml "TEXT" "R*ch" ML Source BBEdit
#.mod "STrk" "SCPL" MOD Music SoundApp
#.mol "TEXT" "RSML" MDL Molfile RasMac
#.moov "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime
#.mov "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime
#.mp2 "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg
#.mp3 "MPG3" "TVOD" MPEG-3 audiostream MoviePlayer audio/x-mpeg
#.mpa "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg
#.mpe "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg
#.mpeg "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg
#.mpg "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg
#.msp "MSPp" "GKON" Microsoft Paint GraphicConverter
#.mtm "MTM " "SNPL" MultiMOD Music PlayerPro
#.mw "MW2D" "MWII" MacWrite Document MacWrite II application/macwriteii
#.mwii "MW2D" "MWII" MacWrite Document MacWrite II application/macwriteii
#.neo "NeoC" "GKON" Atari NeoChrome GraphicConverter
#.nfo "TEXT" "ttxt" Info Text SimpleText application/text
#.nst "STrk" "SCPL" MOD Music SoundApp
#.obj "PCFL" "SWIN" Object (DOS/Windows) SoftWindows
#.oda "ODIF" "ODA " ODA Document MacODA XTND Translator application/oda
#.okt "OKTA" "SCPL" Oktalyser MOD Music SoundApp
#.out "BINA" "hDmp" Output File HexEdit
#.ovl "PCFL" "SWIN" Overlay (DOS/Windows) SoftWindows
#.p "TEXT" "CWIE" Pascal Source CodeWarrior
#.pac "STAD" "GKON" Atari STAD Image GraphicConverter
#.pas "TEXT" "CWIE" Pascal Source CodeWarrior
#.pbm "PPGM" "GKON" Portable Bitmap GraphicConverter image/x-portable-bitmap
#.pc1 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pc2 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pc3 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pcs "PICS" "GKON" Animated PICTs GraphicConverter
#.pct "PICT" "ogle" PICT Picture PictureViewer image/x-pict
#.pcx "PCXx" "GKON" PC PaintBrush GraphicConverter
#.pdb "TEXT" "RSML" Brookhaven PDB file RasMac
#.pdf "PDF " "CARO" Portable Document Format Acrobat Reader application/pdf
#.pdx "TEXT" "ALD5" Printer Description PageMaker
#.pf "CSIT" "SITx" Private File StuffIt Expander
#.pgm "PPGM" "GKON" Portable Graymap GraphicConverter image/x-portable-graymap
#.pi1 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pi2 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pi3 "Dega" "GKON" Atari Degas Image GraphicConverter
#.pic "PICT" "ogle" PICT Picture PictureViewer image/x-pict
#.pict "PICT" "ogle" PICT Picture PictureViewer image/x-macpict
#.pit "PIT " "SITx" PackIt Archive StuffIt Expander
#.pkg "HBSF" "SITx" AppleLink Package StuffIt Expander
#.pl "TEXT" "McPL" Perl Source MacPerl
#.plt "HPGL" "GKON" HP GL/2 GraphicConverter
#.pm "PMpm" "GKON" Bitmap from xv GraphicConverter
#.pm3 "ALB3" "ALD3" PageMaker 3 Document PageMaker
#.pm4 "ALB4" "ALD4" PageMaker 4 Document PageMaker
#.pm5 "ALB5" "ALD5" PageMaker 5 Document PageMaker
#.png "PNG " "ogle" Portable Network Graphic PictureViewer
#.pntg "PNTG" "ogle" Macintosh Painting PictureViewer
#.ppd "TEXT" "ALD5" Printer Description PageMaker
#.ppm "PPGM" "GKON" Portable Pixmap GraphicConverter image/x-portable-pixmap
#.prn "TEXT" "R*ch" Printer Output File BBEdit
#.ps "TEXT" "vgrd" PostScript LaserWriter 8 application/postscript
#.psd "8BPS" "8BIM" PhotoShop Document Photoshop
#.pt4 "ALT4" "ALD4" PageMaker 4 Template PageMaker
#.pt5 "ALT5" "ALD5" PageMaker 5 Template PageMaker
#.pxr "PXR " "8BIM" Pixar Image Photoshop
#.qdv "QDVf" "GKON" QDV image GraphicConverter
#.qt "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime
#.qxd "XDOC" "XPR3" QuarkXpress Document QuarkXpress
#.qxt "XTMP" "XPR3" QuarkXpress Template QuarkXpress
#.raw "BINA" "GKON" Raw Image GraphicConverter
#.readme "TEXT" "ttxt" Text Readme SimpleText application/text
#.rgb "SGI " "GKON" SGI Image GraphicConverter image/x-rgb
#.rgba "SGI " "GKON" SGI Image GraphicConverter image/x-rgb
#.rib "TEXT" "RINI" Renderman 3D Data Renderman
#.rif "RIFF" "GKON" RIFF Graphic GraphicConverter
#.rle "RLE " "GKON" RLE image GraphicConverter
#.rme "TEXT" "ttxt" Text Readme SimpleText
#.rpl "FRL!" "REP!" Replica Document Replica
#.rsc "rsrc" "RSED" Resource File ResEdit
#.rsrc "rsrc" "RSED" Resource File ResEdit
#.rtf "TEXT" "MSWD" Rich Text Format Microsoft Word application/rtf
#.rtx "TEXT" "R*ch" Rich Text BBEdit text/richtext
#.s3m "S3M " "SNPL" ScreamTracker 3 MOD PlayerPro
#.scc "MSX " "GKON" MSX pitcure GraphicConverter
#.scg "RIX3" "GKON" ColoRIX GraphicConverter
#.sci "RIX3" "GKON" ColoRIX GraphicConverter
#.scp "RIX3" "GKON" ColoRIX GraphicConverter
#.scr "RIX3" "GKON" ColoRIX GraphicConverter
#.scu "RIX3" "GKON" ColoRIX GraphicConverter
#.sea "APPL" "????" Self-Extracting Archive Self Extracting Archive
#.sf "IRCM" "SDHK" IRCAM Sound SoundHack
#.sgi ".SGI" "ogle" SGI Image PictureViewer
#.sha "TEXT" "UnSh" Unix Shell Archive UnShar application/x-shar
#.shar "TEXT" "UnSh" Unix Shell Archive UnShar application/x-shar
#.shp "SHPp" "GKON" Printmaster Icon Library GraphicConverter
#.sit "SIT!" "SITx" StuffIt 1.5.1 Archive StuffIt Expander application/x-stuffit
#.sithqx "TEXT" "SITx" BinHexed StuffIt Archive StuffIt Expander application/mac-binhex40
#.six "SIXE" "GKON" SIXEL image GraphicConverter
#.slk "TEXT" "XCEL" SYLK Spreadsheet Excel
#.snd "BINA" "SCPL" Sound of various types SoundApp
#.spc "Spec" "GKON" Atari Spectrum 512 GraphicConverter
#.sr "SUNn" "GKON" Sun Raster Image GraphicConverter
#.sty "TEXT" "*TEX" TeX Style Textures
#.sun "SUNn" "GKON" Sun Raster Image GraphicConverter
#.sup "SCRN" "GKON" StartupScreen GraphicConverter
#.svx "8SVX" "SCPL" Amiga IFF Sound SoundApp
#.syk "TEXT" "XCEL" SYLK Spreadsheet Excel
#.sylk "TEXT" "XCEL" SYLK Spreadsheet Excel
#.tar "TARF" "SITx" Unix Tape ARchive StuffIt Expander application/x-tar
#.targa "TPIC" "GKON" Truevision Image GraphicConverter
#.taz "ZIVU" "SITx" Compressed Tape ARchive StuffIt Expander application/x-compress
#.tex "TEXT" "OTEX" TeX Document OzTeX application/x-tex
#.texi "TEXT" "OTEX" TeX Document OzTeX
#.texinfo "TEXT" "OTEX" TeX Document OzTeX application/x-texinfo
#.text "TEXT" "ttxt" ASCII Text SimpleText text/plain
#.tga "TPIC" "GKON" Truevision Image GraphicConverter
#.tgz "Gzip" "SITx" Gnu ZIPed Tape ARchive StuffIt Expander application/x-gzip
#.tif "TIFF" "ogle" TIFF Picture PictureViewer image/tiff
#.tiff "TIFF" "ogle" TIFF Picture PictureViewer image/tiff
#.tny "TINY" "GKON" Atari TINY Bitmap GraphicConverter
#.tsv "TEXT" "XCEL" Tab Separated Values Excel text/tab-separated-values
#.tx8 "TEXT" "ttxt" 8-bit ASCII Text SimpleText
#.txt "TEXT" "ttxt" ASCII Text SimpleText text/plain
#.ul "ULAW" "TVOD" Mu-Law Sound MoviePlayer audio/basic
#.url "AURL" "Arch" URL Bookmark Anarchie message/external-body
#.uu "TEXT" "SITx" UUEncode StuffIt Expander
#.uue "TEXT" "SITx" UUEncode StuffIt Expander
#.vff "VFFf" "GKON" DESR VFF Greyscale Image GraphicConverter
#.vga "BMPp" "ogle" OS/2 Bitmap PictureViewer
#.voc "VOC " "SCPL" VOC Sound SoundApp
#.w51 ".WP5" "WPC2" WordPerfect PC 5.1 Doc WordPerfect application/wordperfect5.1
#.wav "WAVE" "TVOD" Windows WAV Sound MoviePlayer audio/x-wav
#.wk1 "XLBN" "XCEL" Lotus Spreadsheet r2.1 Excel
#.wks "XLBN" "XCEL" Lotus Spreadsheet r1.x Excel
#.wmf "WMF " "GKON" Windows Metafile GraphicConverter
#.wp ".WP5" "WPC2" WordPerfect PC 5.1 Doc WordPerfect application/wordperfect5.1
#.wp4 ".WP4" "WPC2" WordPerfect PC 4.2 Doc WordPerfect
#.wp5 ".WP5" "WPC2" WordPerfect PC 5.x Doc WordPerfect application/wordperfect5.1
#.wp6 ".WP6" "WPC2" WordPerfect PC 6.x Doc WordPerfect
#.wpg "WPGf" "GKON" WordPerfect Graphic GraphicConverter
#.wpm "WPD1" "WPC2" WordPerfect Mac WordPerfect
#.wri "WDBN" "MSWD" MS Write/Windows Microsoft Word
#.wve "BINA" "SCPL" PSION sound SoundApp
#.x10 "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd
#.x11 "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd
#.xbm "XBM " "GKON" X-Windows Bitmap GraphicConverter image/x-xbm
#.xl "XLS " "XCEL" Excel Spreadsheet Excel
#.xlc "XLC " "XCEL" Excel Chart Excel
#.xlm "XLM " "XCEL" Excel Macro Excel
#.xls "XLS " "XCEL" Excel Spreadsheet Excel
#.xlw "XLW " "XCEL" Excel Workspace Excel
#.xm "XM " "SNPL" FastTracker MOD Music PlayerPro
#.xpm "XPM " "GKON" X-Windows Pixmap GraphicConverter image/x-xpm
#.xwd "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd
#.Z "ZIVU" "SITx" Unix Compress Archive StuffIt Expander application/x-compress
#.zip "ZIP " "SITx" PC ZIP Archive StuffIt Expander application/zip
#.zoo "Zoo " "Booz" Zoo Archive MacBooz
### Last Updated Jan 2, 2002
### Use at your own risk. Take care !
###
### I'd like to dedicate this as follows code to Miss.Tamaki Imazu
###
### Kazuhiko Okudaira the Nursery Teacher
### kokudaira@hotmail.com
#.bld "BLD " "GKON" BLD GraphicConverter
#.bum ".bMp" "GKON" QuickTime Importer(QuickDraw) GraphicConverter
#.cel "CEL " "GKON" KISS CEL GraphicConverter
#.cur "CUR " "GKON" Windows Cursor GraphicConverter
#.cwj "CWSS" "cwkj" ClarisWorks Document ClarisWorks 4.0
#.dat "TCLl" "GKON" TCL image GraphicConverter
#.hr "TR80" "GKON" TSR-80 HR GraphicConverter
#.iss "ISS " "GKON" ISS GraphicConverter
#.jif "JIFf" "GKON" JIF99a GraphicConverter
#.lwf "lwfF" "GKON" LuraWave(LWF) GraphicConverter
#.mbm "MBM " "GKON" PSION 5(MBM) GraphicConverter
#.ngg "NGGC" "GKON" Mobile Phone(Nokia)Format GraphicConverter
#.nol "NOL " "GKON" Mobile Phone(Nokia)Format GraphicConverter
#.pal "8BCT" "8BIM" Color Table GraphicConverter
#.pgc "PGCF" "GKON" PGC/PGF Atari Portfolio PCG GraphicConverter
#.pics "PICS" "GKON" PICS-PICT Sequence GraphicConverter
#.swf "SWFL" "SWF2" Flash Macromedia Flash
#.vpb "VPB " "GKON" VPB QUANTEL GraphicConverter
#.wbmp "WBMP" "GKON" WBMP GraphicConverter
#.x-face "TEXT" "GKON" X-Face GraphicConverter
### Nov 29, 2002
#.fla "SPA " "MFL2" Flash source Macromedia Flash
netatalk-2.2.2/config/atalkd.conf0000644000175200017500000000204311655731126013625 00000000000000#
# Format of lines in this file:
#
# interface [ -seed ] [ -router | -dontroute ]
# [ -phase { 1 | 2 } ] [ -addr net.node ]
# [ -net first[-last] ] [ -zone ZoneName ] ...
#
# -seed only works if you have multi-interfaces. Any missing arguments are
# automatically configured from the network. Note: lines can't actually be
# split, tho it's a good idea.
#
# -router is like -seed but it allows single-interface routing. -dontroute
# disables routing for the specified interface.
#
# Some examples:
#
# The simplest case is no atalkd.conf. This works on most platforms
# (notably not Solaris), since atalkd can discover the local interfaces
# on the machine.
#
# Very slightly more complicated:
#
# le0
# or
# eth0
#
# for Solaris/SunOS or Linux.
#
# A much more complicated example:
#
# le0 -phase 1
# le1 -seed -phase 2 -addr 66.6 -net 66-67 -zone "No Parking"
#
# This turns on transition routing between the le0 and le1
# interfaces on a Sun. It also causes atalkd to fail if other
# routers disagree about it's configuration of le1.
#
netatalk-2.2.2/config/afp_ldap.conf0000644000175200017500000000056311655731126014140 00000000000000# ldap_server = localhost
# ldap_auth_method = simple
# ldap_auth_dn = cn=admin,dc=domain,dc=org
# ldap_auth_pw = notthisone
# ldap_userbase = ou=users,dc=domain,dc=org
# ldap_userscope = one
# ldap_groupbase = ou=groups,dc=domain,dc=org
# ldap_groupscope = one
# ldap_uuid_attr = apple-generateduid
# ldap_name_attr = cn
# ldap_group_attr = cn
netatalk-2.2.2/config/netatalk.conf0000644000175200017500000000373411655731243014200 00000000000000# Netatalk configuration
#########################################################################
# Global configuration
#########################################################################
#### machine's AFPserver/AppleTalk name.
#ATALK_NAME=machinename
#### server (unix) and legacy client (<= Mac OS 9) charsets
ATALK_UNIX_CHARSET='LOCALE'
ATALK_MAC_CHARSET='MAC_ROMAN'
#### Don't Edit. export the charsets, read form ENV by apps
export ATALK_UNIX_CHARSET
export ATALK_MAC_CHARSET
#########################################################################
# AFP specific configuration
#########################################################################
#### Set which daemons to run.
#### If you use AFP file server, run both cnid_metad and afpd.
CNID_METAD_RUN=yes
AFPD_RUN=yes
#### maximum number of clients that can connect:
#AFPD_MAX_CLIENTS=20
#### UAMs (User Authentication Modules)
#### available options: uams_dhx.so, uams_dhx2.so, uams_guest.so,
#### uams_clrtxt.so(legacy), uams_randnum.so(legacy)
#AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
#### Set the id of the guest user when using uams_guest.so
#AFPD_GUEST=nobody
#### config for cnid_metad. Default log config:
#CNID_CONFIG="-l log_note"
#########################################################################
# AppleTalk specific configuration (legacy)
#########################################################################
#### Set which legacy daemons to run.
#### If you need AppleTalk, run atalkd.
#### papd, timelord and a2boot are dependent upon atalkd.
#ATALKD_RUN=no
#PAPD_RUN=no
#TIMELORD_RUN=no
#A2BOOT_RUN=no
#### Control whether the daemons are started in the background.
#### If it is dissatisfied that legacy atalkd starts slowly, set "yes".
#### In case using systemd/systemctl, this is not so significant.
#ATALK_BGROUND=no
#### Set the AppleTalk Zone name.
#### NOTE: if your zone has spaces in it, you're better off specifying
#### it in atalkd.conf
#ATALK_ZONE=@zone
netatalk-2.2.2/config/papd.conf0000644000175200017500000000270711655731126013320 00000000000000# Attributes are:
#
# Name Type Default Description
# pd str ".ppd" Pathname to ppd file.
# pr str "lp" LPD printer name.
# pa str "0.0" AppleTalk address (not usually needed).
# op str "operator" Operator name, for LPD spooling.
# au flag not-present If present, authentication required
# note that if ca and sp are both set,
# ca will be tried first and then sp
# am str none Comma separated list of uams to use
# (for every printer) whenever
# authentication is on
# ca str not-present If present, use cap-style authentication
# directory to place print authentication files
# sp flag not-present use PSSP authentication.
#
# Some examples:
#
# On many systems (notably not Solaris), no papd.conf is required,
# since papd shares the same defaults as lpd.
#
# A simple example:
#
# terminator:\
# :pr=lp:op=wes:\
# :pd=/usr/share/lib/ppd/HPLJ_4M.PPD:
#
# An example with authenticated printing:
# authprn:\
# :pr=|/usr/bin/lpr -Plp:\
# :pd=/usr/share/lib/ppd/HPLJ_4M.PPD:\
# :sp:ca=/tmp/print:\
# :am=uams_clrtxt.so:
#
# Note also that papd.conf can list several printers.
#
# The printer name in papd may be a full NBP-name of the form
# name:type@zone, for example:
# Printer 1:LaserWriter@Printing and Mailing:\
# :pr=|/usr/bin/lpr -Plp1:
#
# Warning: If you are using more than 15 printers and you do not
# specify the zone in the printer name, only some of the printers may
# appear in the Chooser.
netatalk-2.2.2/config/pam/0000777000175200017500000000000011704770424012357 500000000000000netatalk-2.2.2/config/pam/Makefile.am0000644000175200017500000000212611655731243014331 00000000000000## Makefile for distrib/pam/
SUFFIXES = .tmpl .
pamdir = @PAMDIR@/etc/pam.d
EXTRA_DIST = netatalk.pam.tmpl
noinst_SCRIPTS = netatalk.pam
CLEANFILES = netatalk.pam
.tmpl:
sed -e "s,[@]PAM_DIRECTIVE[@],${PAM_DIRECTIVE},g" \
-e "s,[@]PAM_AUTH[@],${PAM_AUTH}," \
-e "s,[@]PAM_ACCOUNT[@],${PAM_ACCOUNT}," \
-e "s,[@]PAM_PASSWORD[@],${PAM_PASSWORD}," \
-e "s,[@]PAM_SESSION[@],${PAM_SESSION}," \
<$< >$@
if USE_PAM
install-data-local: netatalk.pam
$(mkinstalldirs) $(DESTDIR)$(pamdir)
if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \
$(INSTALL_DATA) netatalk.pam $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
else \
echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
fi;
uninstall-local:
echo rm -f $(DESTDIR)$(pamdir)/netatalk; \
rm -f $(DESTDIR)$(pamdir)/netatalk; \
for f in $(CONFFILES) $(GENFILES); do \
echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
done
else
install-data-local:
uninstall-local:
endif
netatalk-2.2.2/config/pam/Makefile.in0000644000175200017500000003110711703521724014336 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = config/pam
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SCRIPTS = $(noinst_SCRIPTS)
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .tmpl .
pamdir = @PAMDIR@/etc/pam.d
EXTRA_DIST = netatalk.pam.tmpl
noinst_SCRIPTS = netatalk.pam
CLEANFILES = netatalk.pam
all: all-am
.SUFFIXES:
.SUFFIXES: .tmpl .
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/pam/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign config/pam/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-local
.tmpl:
sed -e "s,[@]PAM_DIRECTIVE[@],${PAM_DIRECTIVE},g" \
-e "s,[@]PAM_AUTH[@],${PAM_AUTH}," \
-e "s,[@]PAM_ACCOUNT[@],${PAM_ACCOUNT}," \
-e "s,[@]PAM_PASSWORD[@],${PAM_PASSWORD}," \
-e "s,[@]PAM_SESSION[@],${PAM_SESSION}," \
<$< >$@
@USE_PAM_TRUE@install-data-local: netatalk.pam
@USE_PAM_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pamdir)
@USE_PAM_TRUE@ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
@USE_PAM_TRUE@ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \
@USE_PAM_TRUE@ $(INSTALL_DATA) netatalk.pam $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
@USE_PAM_TRUE@ else \
@USE_PAM_TRUE@ echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
@USE_PAM_TRUE@ fi;
@USE_PAM_TRUE@uninstall-local:
@USE_PAM_TRUE@ echo rm -f $(DESTDIR)$(pamdir)/netatalk; \
@USE_PAM_TRUE@ rm -f $(DESTDIR)$(pamdir)/netatalk; \
@USE_PAM_TRUE@ for f in $(CONFFILES) $(GENFILES); do \
@USE_PAM_TRUE@ echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
@USE_PAM_TRUE@ rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
@USE_PAM_TRUE@ done
@USE_PAM_FALSE@install-data-local:
@USE_PAM_FALSE@uninstall-local:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/config/pam/netatalk.pam.tmpl0000644000175200017500000000024411655731126015551 00000000000000#%PAM-1.0
auth @PAM_DIRECTIVE@ @PAM_AUTH@
account @PAM_DIRECTIVE@ @PAM_ACCOUNT@
password @PAM_DIRECTIVE@ @PAM_PASSWORD@
session @PAM_DIRECTIVE@ @PAM_SESSION@
netatalk-2.2.2/include/0000777000175200017500000000000011704770432011757 500000000000000netatalk-2.2.2/include/Makefile.am0000644000175200017500000000005411655731126013730 00000000000000# Makefile.am for include/
SUBDIRS = atalk
netatalk-2.2.2/include/Makefile.in0000644000175200017500000004125611703521726013747 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for include/
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = atalk
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/include/atalk/0000777000175200017500000000000011704770432013053 500000000000000netatalk-2.2.2/include/atalk/directory.h0000644000175200017500000000753111655731126015154 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef ATALK_DIRECTORY_H
#define ATALK_DIRECTORY_H 1
#include
#include
#include
#include
#include
#include
#include
#include
/* setgid directories */
#ifndef DIRBITS
# ifdef AFS
# define DIRBITS 0
# else /* AFS */
# define DIRBITS S_ISGID
# endif /* AFS */
#endif /* DIRBITS */
/* reserved directory id's */
#define DIRDID_ROOT_PARENT htonl(1) /* parent directory of root */
#define DIRDID_ROOT htonl(2) /* root directory */
/* struct dir.d_flags */
#define DIRF_FSMASK (3<<0)
#define DIRF_NOFS (0<<0)
#define DIRF_AFS (1<<0)
#define DIRF_UFS (1<<1)
#define DIRF_ISFILE (1<<3) /* it's cached file, not a directory */
#define DIRF_OFFCNT (1<<4) /* offsprings count is valid */
#define DIRF_CNID (1<<5) /* renumerate id */
struct dir {
bstring d_fullpath; /* complete unix path to dir (or file) */
bstring d_m_name; /* mac name */
bstring d_u_name; /* unix name */
/* be careful here! if d_m_name == d_u_name, d_u_name */
/* will just point to the same storage as d_m_name !! */
ucs2_t *d_m_name_ucs2; /* mac name as UCS2 */
qnode_t *qidx_node; /* pointer to position in queue index */
time_t d_ctime; /* inode ctime, used and modified by reenumeration */
int d_flags; /* directory flags */
cnid_t d_pdid; /* CNID of parent directory */
cnid_t d_did; /* CNID of directory */
uint32_t d_offcnt; /* offspring count */
uint16_t d_vid; /* only needed in the dircache, because
we put all directories in one cache. */
uint32_t d_rights_cache; /* cached rights combinded from mode and possible ACL */
/* Stuff used in the dircache */
time_t dcache_ctime; /* inode ctime, used and modified by dircache */
ino_t dcache_ino; /* inode number, used to detect changes in the dircache */
};
struct path {
int m_type; /* mac name type (long name, unicode */
char *m_name; /* mac name */
char *u_name; /* unix name */
cnid_t id; /* file id (only for getmetadata) */
struct dir *d_dir; /* */
int st_valid; /* does st_errno and st set */
int st_errno;
struct stat st;
};
static inline int path_isadir(struct path *o_path)
{
return o_path->d_dir != NULL;
#if 0
return o_path->m_name == '\0' || /* we are in a it */
!o_path->st_valid || /* in cache but we can't chdir in it */
(!o_path->st_errno && S_ISDIR(o_path->st.st_mode)); /* not in cache an can't chdir */
#endif
}
#endif /* ATALK_DIRECTORY_H */
netatalk-2.2.2/include/atalk/Makefile.am0000644000175200017500000000076011655731244015031 00000000000000# Makefile.am for include/atalk/
atalkincludedir = $(includedir)/atalk
atalkinclude_HEADERS = \
adouble.h vfs.h aep.h afp.h asp.h atp.h \
cnid.h compat.h ddp.h dsi.h ldapconfig.h list.h logger.h \
nbp.h netddp.h pap.h paths.h queue.h rtmp.h server_child.h \
server_ipc.h tdb.h uam.h unicode.h util.h uuid.h volinfo.h \
zip.h ea.h acl.h unix.h directory.h hash.h volume.h
noinst_HEADERS = cnid_dbd_private.h cnid_private.h bstradd.h bstrlib.h errchk.h ftw.h globals.h fce_api.h standards.h
netatalk-2.2.2/include/atalk/ldapconfig.h0000644000175200017500000000216211655731244015252 00000000000000#ifdef HAVE_LDAP
#ifndef LDAPCONFIG_H
#define LDAPCONFIG_H
/* One function does the whole job */
extern int acl_ldap_readconfig(char *name);
/* These are the prefvalues */
extern char *ldap_server;
extern int ldap_auth_method;
extern char *ldap_auth_dn;
extern char *ldap_auth_pw;
extern char *ldap_userbase;
extern char *ldap_groupbase;
extern char *ldap_uuid_attr;
extern char *ldap_name_attr;
extern char *ldap_group_attr;
extern char *ldap_uid_attr;
struct ldap_pref {
void *pref;
char *name;
int strorint; /* string to just store in char * or convert to int ? */
int intfromarray; /* convert to int, but use string to int mapping array pref_array[] */
int valid; /* -1 = mandatory, 0 = omittable/valid */
};
struct pref_array {
char *pref; /* name of pref from ldap_prefs[] to which this value corresponds */
char *valuestring; /* config string */
int value; /* corresponding value */
};
/* For parsing */
extern struct ldap_pref ldap_prefs[];
extern struct pref_array prefs_array[];
extern int ldap_config_valid;
#endif /* LDAPCONFIG_H */
#endif /* HAVE_LDAP */
netatalk-2.2.2/include/atalk/uam.h0000644000175200017500000000733311655731126013732 00000000000000/* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
*/
#ifndef UAM_H
#define UAM_H 1
#include
#include
#include
#ifdef TRU64
#include
#include
#endif /* TRU64 */
/* just a label for exported bits */
#ifndef UAM_MODULE_EXPORT
#define UAM_MODULE_EXPORT
#endif
/* type of uam */
#define UAM_MODULE_SERVER 1
#define UAM_MODULE_CLIENT 2
/* in case something drastic has to change */
#define UAM_MODULE_VERSION 1
/* things for which we can have uams */
#define UAM_SERVER_LOGIN (1 << 0)
#define UAM_SERVER_CHANGEPW (1 << 1)
#define UAM_SERVER_PRINTAUTH (1 << 2)
#define UAM_SERVER_LOGIN_EXT (1 << 3)
/* options */
#define UAM_OPTION_USERNAME (1 << 0) /* get space for username */
#define UAM_OPTION_GUEST (1 << 1) /* get guest user */
#define UAM_OPTION_PASSWDOPT (1 << 2) /* get the password file */
#define UAM_OPTION_SIGNATURE (1 << 3) /* get server signature */
#define UAM_OPTION_RANDNUM (1 << 4) /* request a random number */
#define UAM_OPTION_HOSTNAME (1 << 5) /* get host name */
#define UAM_OPTION_COOKIE (1 << 6) /* cookie handle */
#define UAM_OPTION_PROTOCOL (1 << 7) /* DSI or ASP */
#define UAM_OPTION_CLIENTNAME (1 << 8) /* get client IP address */
#define UAM_OPTION_KRB5SERVICE (1 << 9) /* service name for krb5 principal */
#define UAM_OPTION_MACCHARSET (1 << 10) /* mac charset handle */
#define UAM_OPTION_UNIXCHARSET (1 << 11) /* unix charset handle */
#define UAM_OPTION_SESSIONINFO (1 << 12) /* unix charset handle */
#define UAM_OPTION_KRB5REALM (1 << 13) /* krb realm */
#define UAM_OPTION_FQDN (1 << 14) /* fully qualified name */
/* some password options. you pass these in the length parameter and
* get back the corresponding option. not all of these are implemented. */
#define UAM_PASSWD_FILENAME (1 << 0)
#define UAM_PASSWD_MINLENGTH (1 << 1)
#define UAM_PASSWD_MAXFAIL (1 << 2) /* not implemented yet. */
#define UAM_PASSWD_EXPIRETIME (1 << 3) /* not implemented yet. */
/* max lenght of username */
#define UAM_USERNAMELEN 255
/* i'm doing things this way because os x server's dynamic linker
* support is braindead. it also allows me to do a little versioning. */
struct uam_export {
int uam_type, uam_version;
int (*uam_setup)(const char *);
void (*uam_cleanup)(void);
};
#define SESSIONKEY_LEN 64
#define SESSIONTOKEN_LEN 8
struct session_info {
void *sessionkey; /* random session key */
size_t sessionkey_len;
void *cryptedkey; /* kerberos/gssapi crypted key */
size_t cryptedkey_len;
void *sessiontoken; /* session token sent to the client on FPGetSessionToken*/
size_t sessiontoken_len;
void *clientid; /* whole buffer cotaining eg idlen, id and boottime */
size_t clientid_len;
};
/* register and unregister uams with these functions */
extern UAM_MODULE_EXPORT int uam_register (const int, const char *, const char *, ...);
extern UAM_MODULE_EXPORT void uam_unregister (const int, const char *);
/* helper functions */
extern UAM_MODULE_EXPORT struct passwd *uam_getname (void*, char *, const int);
extern UAM_MODULE_EXPORT int uam_checkuser (const struct passwd *);
/* afp helper functions */
extern UAM_MODULE_EXPORT int uam_afp_read (void *, char *, size_t *,
int (*)(void *, void *, const int));
extern UAM_MODULE_EXPORT int uam_afpserver_option (void *, const int, void *, size_t *);
#ifdef TRU64
extern void uam_afp_getcmdline (int *, char ***);
extern int uam_sia_validate_user (sia_collect_func_t *, int, char **,
char *, char *, char *, int, char *,
char *);
#endif /* TRU64 */
#endif
netatalk-2.2.2/include/atalk/Makefile.in0000644000175200017500000003511411703521726015037 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for include/atalk/
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = include/atalk
DIST_COMMON = $(atalkinclude_HEADERS) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(atalkincludedir)"
atalkincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(atalkinclude_HEADERS) $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
atalkincludedir = $(includedir)/atalk
atalkinclude_HEADERS = \
adouble.h vfs.h aep.h afp.h asp.h atp.h \
cnid.h compat.h ddp.h dsi.h ldapconfig.h list.h logger.h \
nbp.h netddp.h pap.h paths.h queue.h rtmp.h server_child.h \
server_ipc.h tdb.h uam.h unicode.h util.h uuid.h volinfo.h \
zip.h ea.h acl.h unix.h directory.h hash.h volume.h
noinst_HEADERS = cnid_dbd_private.h cnid_private.h bstradd.h bstrlib.h errchk.h ftw.h globals.h fce_api.h standards.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/atalk/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign include/atalk/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-atalkincludeHEADERS: $(atalkinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(atalkincludedir)" || $(MKDIR_P) "$(DESTDIR)$(atalkincludedir)"
@list='$(atalkinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(atalkincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(atalkincludedir)/$$f'"; \
$(atalkincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(atalkincludedir)/$$f"; \
done
uninstall-atalkincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(atalkinclude_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(atalkincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(atalkincludedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(atalkincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-atalkincludeHEADERS
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-atalkincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am \
install-atalkincludeHEADERS install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am \
uninstall-atalkincludeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/include/atalk/list.h0000644000175200017500000001035611655731126014122 00000000000000/* This code has been stolen from Linux kernel :) */
/* distributed under GNU GPL version 2. */
#ifndef _ATALK_LIST_H
#define _ATALK_LIST_H
/*
* Simple doubly linked list implementation.
*
* Some of the internal functions ("__xxx") are useful when
* manipulating whole lists rather than single entries, as
* sometimes we already know the next/prev entries and we can
* generate better code by using them directly rather than
* using the generic single-entry routines.
*/
struct list_head {
struct list_head *next, *prev;
};
#define ATALK_LIST_HEAD_INIT(name) { &(name), &(name) }
#define ATALK_LIST_HEAD(name) \
struct list_head name = ATALK_LIST_HEAD_INIT(name)
#define ATALK_INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
#ifdef USE_LIST
/*
* Insert a new entry between two known consecutive entries.
*
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static inline void __list_add(struct list_head * new,
struct list_head * prev,
struct list_head * next)
{
next->prev = new;
new->next = next;
new->prev = prev;
prev->next = new;
}
/**
* list_add - add a new entry
* @new: new entry to be added
* @head: list head to add it after
*
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
static inline void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}
/**
* list_add_tail - add a new entry
* @new: new entry to be added
* @head: list head to add it before
*
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
static inline void list_add_tail(struct list_head *new, struct list_head *head)
{
__list_add(new, head->prev, head);
}
/*
* Delete a list entry by making the prev/next entries
* point to each other.
*
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static inline void __list_del(struct list_head * prev,
struct list_head * next)
{
next->prev = prev;
prev->next = next;
}
/**
* list_del - deletes entry from list.
* @entry: the element to delete from the list.
* Note: list_empty on entry does not return true after this, the entry is in an undefined state.
*/
static inline void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
}
/**
* list_del_init - deletes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*/
static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
ATALK_INIT_LIST_HEAD(entry);
}
/**
* list_empty - tests whether a list is empty
* @head: the list to test.
*/
static inline int list_empty(struct list_head *head)
{
return head->next == head;
}
/**
* list_splice - join two lists
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
static inline void list_splice(struct list_head *list, struct list_head *head)
{
struct list_head *first = list->next;
if (first != list) {
struct list_head *last = list->prev;
struct list_head *at = head->next;
first->prev = head;
head->next = first;
last->next = at;
at->prev = last;
}
}
#endif
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop counter.
* @n: another &struct list_head to use as temporary storage
* @head: the head for your list.
*/
#define list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); \
pos = pos->next)
/**
* list_for_each_prev - iterate over a list in reverse order
* @pos: the &struct list_head to use as a loop counter.
* @head: the head for your list.
*/
#define list_for_each_prev(pos, head) \
for (pos = (head)->prev; pos != (head); \
pos = pos->prev)
#endif
netatalk-2.2.2/include/atalk/aep.h0000644000175200017500000000174411655731244013716 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_AEP_H
#define _ATALK_AEP_H 1
#ifndef NO_DDP
#define AEPOP_REQUEST 1
#define AEPOP_REPLY 2
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/compat.h0000644000175200017500000000471111655731126014430 00000000000000/*
* Copyright (c) 1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*
* NOTE: SunOS 4 and ultrix are pretty much the only reason why there
* are checks for EINTR everywhere.
*/
#include
#include
#ifdef __svr4__
/*
* SunOS 5 (solaris) has SA_RESTART, but no SA_INTERRUPT.
*/
#ifndef SA_INTERRUPT
#define SA_INTERRUPT 0
#endif
#include
#include
#include
extern int flock (int, int);
extern int inet_aton (const char *, struct in_addr *);
#else /* __svr4__ */
#ifdef sun
/*
* SunOS 4 has SA_INTERRUPT, but no SA_RESTART.
*/
#ifndef SA_RESTART
#define SA_RESTART 0
#endif
#endif /* sun */
#endif /* __svr4__ */
#ifdef linux
/*
* Linux has SA_RESTART, but no SA_INTERRUPT. Note that the documentation
* seems to be wrong on several counts. First, SA_ONESHOT is not the default,
* and second, SA_RESTART does what you'd expect (the same as svr4) and has
* nothing to do with SA_ONESHOT.
*/
#ifndef SA_INTERRUPT
#define SA_INTERRUPT 0
#endif /* SA_INTERRUPT */
#endif /* linux */
#ifdef ultrix
#include
#include
#include
/*
* Here's the really confusing one... Under Ultrix, sigaction() works just
* like sigvec(), except that SV_INTERRUPT is always set. Hence, there is
* no SA_INTERRUPT flag. Unfortunately, there's also no SA_RESTART, so
* there's no way to suppress the interrupt. Sigh.
*/
#ifndef SA_INTERRUPT
#define SA_INTERRUPT 0
#endif
#ifndef SA_RESTART
#define SA_RESTART 0
#endif
extern char *strdup (const char *);
extern int inet_aton (const char *, struct in_addr *);
#endif /* ultrix */
#ifdef BSD4_4
#ifndef SA_INTERRUPT
#define SA_INTERRUPT 0
#endif
#endif /* BSD4_4 */
#if defined(ultrix) || defined(_IBMR2) || defined(NEED_GETUSERSHELL)
extern char *getusershell (void);
#endif
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include
#include
#endif
#ifndef HAVE_SNPRINTF
int snprintf (char *str,size_t count,const char *fmt,...);
#endif
#ifndef HAVE_VSNPRINTF
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
#endif
/* OpenBSD */
#if defined(__OpenBSD__) && !defined(ENOTSUP)
#define ENOTSUP EOPNOTSUPP
#endif
#if !defined(HAVE_PSELECT) || defined(__OpenBSD__)
extern int pselect(int, fd_set * restrict, fd_set * restrict,
fd_set * restrict, const struct timespec * restrict,
const sigset_t * restrict);
#endif
netatalk-2.2.2/include/atalk/asp.h0000644000175200017500000000610211655731244013725 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_ASP_H
#define _ATALK_ASP_H 1
#ifndef NO_DDP
#include
#include
#include
#include
#include
#include
#include
#define ASP_HDRSIZ 4
#define ASP_CMDSIZ 578
#define ASP_MAXPACKETS 8
#define ASP_CMDMAXSIZ (ASP_CMDSIZ + ASP_HDRSIZ)
#define ASP_DATASIZ (ASP_CMDSIZ*ASP_MAXPACKETS)
#define ASP_DATAMAXSIZ ((ASP_CMDSIZ + ASP_HDRSIZ)*ASP_MAXPACKETS)
typedef struct ASP {
ATP asp_atp;
struct sockaddr_at asp_sat;
u_int8_t asp_wss;
u_int8_t asp_sid;
union {
struct {
char *as_status;
int as_slen;
} asu_status;
u_int16_t asu_seq;
} asp_u;
#define asp_status asp_u.asu_status.as_status
#define asp_slen asp_u.asu_status.as_slen
#define asp_seq asp_u.asu_seq
int asp_flags;
char child, inited, *commands;
char cmdbuf[ASP_CMDMAXSIZ];
char data[ASP_DATAMAXSIZ];
size_t cmdlen, datalen;
off_t read_count, write_count;
} *ASP;
#define ASPFL_SLS 1
#define ASPFL_SSS 2
#define ASPFUNC_CLOSE 1
#define ASPFUNC_CMD 2
#define ASPFUNC_STAT 3
#define ASPFUNC_OPEN 4
#define ASPFUNC_TICKLE 5
#define ASPFUNC_WRITE 6
#define ASPFUNC_WRTCONT 7
#define ASPFUNC_ATTN 8
#define ASPERR_OK 0x0000
#define ASPERR_BADVERS 0xfbd6
#define ASPERR_BUFSMALL 0xfbd5
#define ASPERR_NOSESS 0xfbd4
#define ASPERR_NOSERV 0xfbd3
#define ASPERR_PARM 0xfbd2
#define ASPERR_SERVBUSY 0xfbd1
#define ASPERR_SESSCLOS 0xfbd0
#define ASPERR_SIZERR 0xfbcf
#define ASPERR_TOOMANY 0xfbce
#define ASPERR_NOACK 0xfbcd
extern ASP asp_init (ATP);
extern void asp_setstatus (ASP, char *, const int);
extern ASP asp_getsession (ASP, server_child *, const int);
extern int asp_close (ASP);
extern int asp_shutdown (ASP);
extern int asp_attention (ASP, AFPUserBytes);
extern int asp_getrequest (ASP);
extern int asp_cmdreply (ASP, int);
extern int asp_wrtcont (ASP, char *, size_t *);
#define asp_wrtreply(a,b) asp_cmdreply((a), (b))
extern void asp_kill (int);
extern int asp_tickle (ASP, const u_int8_t, struct sockaddr_at *);
extern void asp_stop_tickle (void);
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/unicode.h0000644000175200017500000001455311655731126014600 00000000000000#ifndef _ATALK_UNICODE_H
#define _ATALK_UNICODE_H 1
#include
#include
#include
#include
#define ucs2_t u_int16_t
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif /* ! MIN */
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif /* ! MIN */
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#ifndef EILSEQ
#define EILSEQ 84 /* Illegal byte sequence. */
#endif
/* generic iconv conversion structure */
typedef struct {
size_t (*direct)(void *cd, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
size_t (*pull)(void *cd, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
size_t (*push)(void *cd, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
void *cd_direct, *cd_pull, *cd_push;
char *from_name, *to_name;
} *atalk_iconv_t;
#define CHARSET_CLIENT 1
#define CHARSET_VOLUME 2
#define CHARSET_PRECOMPOSED 4
#define CHARSET_DECOMPOSED 8
#define CHARSET_MULTIBYTE 16
#define CHARSET_WIDECHAR 32
#define CHARSET_ICONV 64
#define IGNORE_CHAR '_'
/* conversion flags */
#define CONV_IGNORE (1<<0) /* return the first convertable characters. */
#define CONV_ESCAPEHEX (1<<1) /* escape unconvertable chars with :[UCS2HEX], */
/* also escape '/'. Escape ':' if also CONV_ALLOW_COLON, */
/* else ':' raises EILSEQ */
#define CONV_ESCAPEDOTS (1<<2) /* escape leading dots with :2600 */
#define CONV_UNESCAPEHEX (1<<3)
#define CONV_TOUPPER (1<<4) /* convert to UPPERcase */
#define CONV_TOLOWER (1<<5) /* convert to lowercase */
#define CONV_PRECOMPOSE (1<<6) /* precompose */
#define CONV_DECOMPOSE (1<<7) /* precompose */
#define CONV_FORCE (1<<8) /* force convertion */
#define CONV__EILSEQ (1<<9) /* ignore EILSEQ, replace with IGNORE_CHAR (try USC2) */
#define CONV_ALLOW_COLON (1<<10) /* Allow ':' in name. Needed for Extended Attributes */
/* conversion return flags */
#define CONV_REQMANGLE (1<<14) /* mangling of returned name is required */
#define CONV_REQESCAPE (1<<15) /* espace unconvertable chars with :[UCS2HEX] */
/* this defines the charset types used in samba */
typedef enum {CH_UCS2=0, CH_UTF8=1, CH_MAC=2, CH_UNIX=3, CH_UTF8_MAC=4} charset_t;
#define NUM_CHARSETS 5
/*
* for each charset we have a function that pulls from that charset to
* a ucs2 buffer, and a function that pushes to a ucs2 buffer
*/
struct charset_functions {
const char *name;
const long kTextEncoding;
size_t (*pull)(void *, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
size_t (*push)(void *, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
u_int32_t flags;
const char *iname;
struct charset_functions *prev, *next;
};
/* from iconv.c */
extern atalk_iconv_t atalk_iconv_open (const char *, const char *);
extern size_t atalk_iconv (atalk_iconv_t, const char **, size_t *, char **, size_t *);
extern int atalk_iconv_close (atalk_iconv_t);
extern struct charset_functions *find_charset_functions (const char *);
extern int atalk_register_charset (struct charset_functions *);
/* from utf16_case.c */
extern ucs2_t toupper_w (ucs2_t);
extern u_int32_t toupper_sp (u_int32_t);
extern ucs2_t tolower_w (ucs2_t);
extern u_int32_t tolower_sp (u_int32_t);
/* from util_unistr.c */
extern int strupper_w (ucs2_t *);
extern int strlower_w (ucs2_t *);
extern int islower_w (ucs2_t);
extern int isupper_w (ucs2_t);
extern size_t strlen_w (const ucs2_t *);
extern size_t strnlen_w (const ucs2_t *, size_t);
extern ucs2_t* strchr_w (const ucs2_t *, ucs2_t);
extern ucs2_t *strcasechr_w (const ucs2_t *s, ucs2_t c);
extern int strcmp_w (const ucs2_t *, const ucs2_t *);
extern int strncmp_w (const ucs2_t *, const ucs2_t *, size_t);
extern int strcasecmp_w (const ucs2_t *, const ucs2_t *);
extern int strncasecmp_w (const ucs2_t *, const ucs2_t *, size_t);
extern ucs2_t *strstr_w (const ucs2_t *s, const ucs2_t *ins);
extern ucs2_t *strcasestr_w (const ucs2_t *, const ucs2_t *);
extern ucs2_t *strndup_w (const ucs2_t *, size_t);
extern ucs2_t *strdup_w (const ucs2_t *);
extern ucs2_t *strncpy_w (ucs2_t *, const ucs2_t *, const size_t);
extern ucs2_t *strncat_w (ucs2_t *, const ucs2_t *, const size_t);
extern ucs2_t *strcat_w (ucs2_t *, const ucs2_t *);
extern size_t precompose_w (ucs2_t *, size_t, ucs2_t *,size_t *);
extern size_t decompose_w (ucs2_t *, size_t, ucs2_t *,size_t *);
extern size_t utf8_charlen ( char* );
extern size_t utf8_strlen_validate ( char *);
/* from charcnv.c */
extern void init_iconv (void);
extern size_t convert_string (charset_t, charset_t, void const *, size_t, void *, size_t);
extern size_t convert_string_allocate (charset_t, charset_t, void const *, size_t, char **);
extern size_t utf8_strupper (const char *, size_t, char *, size_t);
extern size_t utf8_strlower (const char *, size_t, char *, size_t);
extern size_t unix_strupper (const char *, size_t, char *, size_t);
extern size_t unix_strlower (const char *, size_t, char *, size_t);
extern size_t charset_strupper (charset_t, const char *, size_t, char *, size_t);
extern size_t charset_strlower (charset_t, const char *, size_t, char *, size_t);
extern size_t charset_to_ucs2_allocate (charset_t, ucs2_t **dest, const char *src);
extern size_t charset_to_utf8_allocate (charset_t, char **dest, const char *src);
extern size_t ucs2_to_charset_allocate (charset_t, char **dest, const ucs2_t *src);
extern size_t utf8_to_charset_allocate (charset_t, char **dest, const char *src);
extern size_t ucs2_to_charset (charset_t, const ucs2_t *src, char *dest, size_t);
extern size_t convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, u_int16_t *);
extern size_t charset_precompose ( charset_t, char *, size_t, char *, size_t);
extern size_t charset_decompose ( charset_t, char *, size_t, char *, size_t);
extern size_t utf8_precompose ( char *, size_t, char *, size_t);
extern size_t utf8_decompose ( char *, size_t, char *, size_t);
extern charset_t add_charset (const char* name);
#endif /* _ATALK_UNICODE_H */
netatalk-2.2.2/include/atalk/vfs.h0000644000175200017500000001273111655731126013744 00000000000000/*
Copyright (c) 2004 Didier Gautheron
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
vfs layer for afp
*/
#ifndef ATALK_VFS_H
#define ATALK_VFS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include
#include
#include
#define VFS_FUNC_ARGS_VALIDUPATH const struct vol *vol, const char *name
#define VFS_FUNC_VARS_VALIDUPATH vol, name
#define VFS_FUNC_ARGS_CHOWN const struct vol *vol, const char *path, uid_t uid, gid_t gid
#define VFS_FUNC_VARS_CHOWN vol, path, uid, gid
#define VFS_FUNC_ARGS_RENAMEDIR const struct vol *vol, int dirfd, const char *oldpath, const char *newpath
#define VFS_FUNC_VARS_RENAMEDIR vol, dirfd, oldpath, newpath
#define VFS_FUNC_ARGS_DELETECURDIR const struct vol *vol
#define VFS_FUNC_VARS_DELETECURDIR vol
#define VFS_FUNC_ARGS_SETFILEMODE const struct vol *vol, const char *name, mode_t mode, struct stat *st
#define VFS_FUNC_VARS_SETFILEMODE vol, name, mode, st
#define VFS_FUNC_ARGS_SETDIRMODE const struct vol *vol, const char *name, mode_t mode, struct stat *st
#define VFS_FUNC_VARS_SETDIRMODE vol, name, mode, st
#define VFS_FUNC_ARGS_SETDIRUNIXMODE const struct vol *vol, const char *name, mode_t mode, struct stat *st
#define VFS_FUNC_VARS_SETDIRUNIXMODE vol, name, mode, st
#define VFS_FUNC_ARGS_SETDIROWNER const struct vol *vol, const char *name, uid_t uid, gid_t gid
#define VFS_FUNC_VARS_SETDIROWNER vol, name, uid, gid
#define VFS_FUNC_ARGS_DELETEFILE const struct vol *vol, int dirfd, const char *file
#define VFS_FUNC_VARS_DELETEFILE vol, dirfd, file
#define VFS_FUNC_ARGS_RENAMEFILE const struct vol *vol, int dirfd, const char *src, const char *dst
#define VFS_FUNC_VARS_RENAMEFILE vol, dirfd, src, dst
#define VFS_FUNC_ARGS_COPYFILE const struct vol *vol, int sfd, const char *src, const char *dst
#define VFS_FUNC_VARS_COPYFILE vol, sfd, src, dst
#ifdef HAVE_SOLARIS_ACLS
#define VFS_FUNC_ARGS_ACL const struct vol *vol, const char *path, int cmd, int count, void *aces
#define VFS_FUNC_VARS_ACL vol, path, cmd, count, aces
#endif
#ifdef HAVE_POSIX_ACLS
#define VFS_FUNC_ARGS_ACL const struct vol *vol, const char *path, acl_type_t type, int count, acl_t acl
#define VFS_FUNC_VARS_ACL vol, path, type, count, acl
#endif
#define VFS_FUNC_ARGS_REMOVE_ACL const struct vol *vol, const char *path, int dir
#define VFS_FUNC_VARS_REMOVE_ACL vol, path, dir
#define VFS_FUNC_ARGS_EA_GETSIZE const struct vol * restrict vol, char * restrict rbuf, size_t * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname
#define VFS_FUNC_VARS_EA_GETSIZE vol, rbuf, rbuflen, uname, oflag, attruname
#define VFS_FUNC_ARGS_EA_GETCONTENT const struct vol * restrict vol, char * restrict rbuf, size_t * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname, int maxreply
#define VFS_FUNC_VARS_EA_GETCONTENT vol, rbuf, rbuflen, uname, oflag, attruname, maxreply
#define VFS_FUNC_ARGS_EA_LIST const struct vol * restrict vol, char * restrict attrnamebuf, size_t * restrict buflen, const char * restrict uname, int oflag
#define VFS_FUNC_VARS_EA_LIST vol, attrnamebuf, buflen, uname, oflag
#define VFS_FUNC_ARGS_EA_SET const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, const char * restrict ibuf, size_t attrsize, int oflag
#define VFS_FUNC_VARS_EA_SET vol, uname, attruname, ibuf, attrsize, oflag
#define VFS_FUNC_ARGS_EA_REMOVE const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, int oflag
#define VFS_FUNC_VARS_EA_REMOVE vol, uname, attruname, oflag
/*
* Forward declaration. We need it because of the circular inclusion of
* of vfs.h <-> volume.h.
*/
struct vol;
struct vfs_ops {
int (*vfs_validupath) (VFS_FUNC_ARGS_VALIDUPATH);
int (*vfs_chown) (VFS_FUNC_ARGS_CHOWN);
int (*vfs_renamedir) (VFS_FUNC_ARGS_RENAMEDIR);
int (*vfs_deletecurdir) (VFS_FUNC_ARGS_DELETECURDIR);
int (*vfs_setfilmode) (VFS_FUNC_ARGS_SETFILEMODE);
int (*vfs_setdirmode) (VFS_FUNC_ARGS_SETDIRMODE);
int (*vfs_setdirunixmode)(VFS_FUNC_ARGS_SETDIRUNIXMODE);
int (*vfs_setdirowner) (VFS_FUNC_ARGS_SETDIROWNER);
int (*vfs_deletefile) (VFS_FUNC_ARGS_DELETEFILE);
int (*vfs_renamefile) (VFS_FUNC_ARGS_RENAMEFILE);
int (*vfs_copyfile) (VFS_FUNC_ARGS_COPYFILE);
#ifdef HAVE_ACLS
/* ACLs */
int (*vfs_acl) (VFS_FUNC_ARGS_ACL);
int (*vfs_remove_acl) (VFS_FUNC_ARGS_REMOVE_ACL);
#endif
/* Extended Attributes */
int (*vfs_ea_getsize) (VFS_FUNC_ARGS_EA_GETSIZE);
int (*vfs_ea_getcontent) (VFS_FUNC_ARGS_EA_GETCONTENT);
int (*vfs_ea_list) (VFS_FUNC_ARGS_EA_LIST);
int (*vfs_ea_set) (VFS_FUNC_ARGS_EA_SET);
int (*vfs_ea_remove) (VFS_FUNC_ARGS_EA_REMOVE);
};
extern void initvol_vfs(struct vol * restrict vol);
#endif /* ATALK_VFS_H */
netatalk-2.2.2/include/atalk/pap.h0000644000175200017500000000225111655731244013723 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_PAP_H
#define _ATALK_PAP_H 1
#ifndef NO_DDP
#define PAP_OPEN 1
#define PAP_OPENREPLY 2
#define PAP_READ 3
#define PAP_DATA 4
#define PAP_TICKLE 5
#define PAP_CLOSE 6
#define PAP_CLOSEREPLY 7
#define PAP_SENDSTATUS 8
#define PAP_STATUS 9
#define PAP_MAXDATA 512
#define PAP_MAXQUANTUM 8
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/hash.h0000644000175200017500000001620311655731126014067 00000000000000/*
* Hash Table Data Type
* Copyright (C) 1997 Kaz Kylheku
*
* Free Software License:
*
* All rights are reserved by the author, with the following exceptions:
* Permission is granted to freely reproduce and distribute this software,
* possibly in exchange for a fee, provided that this copyright notice appears
* intact. Permission is also granted to adapt this software to produce
* derivative works, as long as the modified versions carry this copyright
* notice and additional notices stating that the work has been modified.
* This source code may be translated into executable form and incorporated
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
*
* $Id: hash.h,v 1.2 2009-11-19 10:37:44 franklahm Exp $
* $Name: $
*/
#ifndef ATALK_HASH_H
#define ATALK_HASH_H
#include
#include
typedef unsigned long hashcount_t;
#define HASHCOUNT_T_MAX ULONG_MAX
typedef uint32_t hash_val_t;
#define HASH_VAL_T_MAX UINT32_MAX
extern int hash_val_t_bit;
#ifndef HASH_VAL_T_BIT
#define HASH_VAL_T_BIT ((int) hash_val_t_bit)
#endif
/*
* Hash chain node structure.
* Notes:
* 1. This preprocessing directive is for debugging purposes. The effect is
* that if the preprocessor symbol KAZLIB_OPAQUE_DEBUG is defined prior to the
* inclusion of this header, then the structure shall be declared as having
* the single member int __OPAQUE__. This way, any attempts by the
* client code to violate the principles of information hiding (by accessing
* the structure directly) can be diagnosed at translation time. However,
* note the resulting compiled unit is not suitable for linking.
* 2. This is a pointer to the next node in the chain. In the last node of a
* chain, this pointer is null.
* 3. The key is a pointer to some user supplied data that contains a unique
* identifier for each hash node in a given table. The interpretation of
* the data is up to the user. When creating or initializing a hash table,
* the user must supply a pointer to a function for comparing two keys,
* and a pointer to a function for hashing a key into a numeric value.
* 4. The value is a user-supplied pointer to void which may refer to
* any data object. It is not interpreted in any way by the hashing
* module.
* 5. The hashed key is stored in each node so that we don't have to rehash
* each key when the table must grow or shrink.
*/
typedef struct hnode_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG) /* 1 */
struct hnode_t *hash_next; /* 2 */
const void *hash_key; /* 3 */
void *hash_data; /* 4 */
hash_val_t hash_hkey; /* 5 */
#else
int hash_dummy;
#endif
} hnode_t;
/*
* The comparison function pointer type. A comparison function takes two keys
* and produces a value of -1 if the left key is less than the right key, a
* value of 0 if the keys are equal, and a value of 1 if the left key is
* greater than the right key.
*/
typedef int (*hash_comp_t)(const void *, const void *);
/*
* The hashing function performs some computation on a key and produces an
* integral value of type hash_val_t based on that key. For best results, the
* function should have a good randomness properties in *all* significant bits
* over the set of keys that are being inserted into a given hash table. In
* particular, the most significant bits of hash_val_t are most significant to
* the hash module. Only as the hash table expands are less significant bits
* examined. Thus a function that has good distribution in its upper bits but
* not lower is preferrable to one that has poor distribution in the upper bits
* but not the lower ones.
*/
typedef hash_val_t (*hash_fun_t)(const void *);
/*
* allocator functions
*/
typedef hnode_t *(*hnode_alloc_t)(void *);
typedef void (*hnode_free_t)(hnode_t *, void *);
/*
* This is the hash table control structure. It keeps track of information
* about a hash table, as well as the hash table itself.
* Notes:
* 1. Pointer to the hash table proper. The table is an array of pointers to
* hash nodes (of type hnode_t). If the table is empty, every element of
* this table is a null pointer. A non-null entry points to the first
* element of a chain of nodes.
* 2. This member keeps track of the size of the hash table---that is, the
* number of chain pointers.
* 3. The count member maintains the number of elements that are presently
* in the hash table.
* 4. The maximum count is the greatest number of nodes that can populate this
* table. If the table contains this many nodes, no more can be inserted,
* and the hash_isfull() function returns true.
* 5. The high mark is a population threshold, measured as a number of nodes,
* which, if exceeded, will trigger a table expansion. Only dynamic hash
* tables are subject to this expansion.
* 6. The low mark is a minimum population threshold, measured as a number of
* nodes. If the table population drops below this value, a table shrinkage
* will occur. Only dynamic tables are subject to this reduction. No table
* will shrink beneath a certain absolute minimum number of nodes.
* 7. This is the a pointer to the hash table's comparison function. The
* function is set once at initialization or creation time.
* 8. Pointer to the table's hashing function, set once at creation or
* initialization time.
* 9. The current hash table mask. If the size of the hash table is 2^N,
* this value has its low N bits set to 1, and the others clear. It is used
* to select bits from the result of the hashing function to compute an
* index into the table.
* 10. A flag which indicates whether the table is to be dynamically resized. It
* is set to 1 in dynamically allocated tables, 0 in tables that are
* statically allocated.
*/
typedef struct hash_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
struct hnode_t **hash_table; /* 1 */
hashcount_t hash_nchains; /* 2 */
hashcount_t hash_nodecount; /* 3 */
hashcount_t hash_maxcount; /* 4 */
hashcount_t hash_highmark; /* 5 */
hashcount_t hash_lowmark; /* 6 */
hash_comp_t hash_compare; /* 7 */
hash_fun_t hash_function; /* 8 */
hnode_alloc_t hash_allocnode;
hnode_free_t hash_freenode;
void *hash_context;
hash_val_t hash_mask; /* 9 */
int hash_dynamic; /* 10 */
#else
int hash_dummy;
#endif
} hash_t;
/*
* Hash scanner structure, used for traversals of the data structure.
* Notes:
* 1. Pointer to the hash table that is being traversed.
* 2. Reference to the current chain in the table being traversed (the chain
* that contains the next node that shall be retrieved).
* 3. Pointer to the node that will be retrieved by the subsequent call to
* hash_scan_next().
*/
typedef struct hscan_t {
#if defined(HASH_IMPLEMENTATION) || !defined(KAZLIB_OPAQUE_DEBUG)
hash_t *hash_table; /* 1 */
hash_val_t hash_chain; /* 2 */
hnode_t *hash_next; /* 3 */
#else
int hash_dummy;
#endif
} hscan_t;
#endif /* ATALK_HASH_H */
netatalk-2.2.2/include/atalk/tdb.h0000644000175200017500000001133611655731126013717 00000000000000#ifndef __TDB_H__
#define __TDB_H__
/*
Unix SMB/CIFS implementation.
Samba database functions
Copyright (C) Andrew Tridgell 1999
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* flags to tdb_store() */
#define TDB_REPLACE 1
#define TDB_INSERT 2
#define TDB_MODIFY 3
/* flags for tdb_open() */
#define TDB_DEFAULT 0 /* just a readability place holder */
#define TDB_CLEAR_IF_FIRST 1
#define TDB_INTERNAL 2 /* don't store on disk */
#define TDB_NOLOCK 4 /* don't do any locking */
#define TDB_NOMMAP 8 /* don't use mmap */
#define TDB_CONVERT 16 /* convert endian (internal use) */
#define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */
#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
/* error codes */
enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT };
#ifndef u32
#define u32 unsigned
#endif
typedef struct {
char *dptr;
size_t dsize;
} TDB_DATA;
typedef u32 tdb_len;
typedef u32 tdb_off;
/* this is stored at the front of every database */
struct tdb_header {
char magic_food[32]; /* for /etc/magic */
u32 version; /* version of the code */
u32 hash_size; /* number of hash entries */
tdb_off rwlocks;
tdb_off reserved[31];
};
struct tdb_lock_type {
u32 count;
u32 ltype;
};
struct tdb_traverse_lock {
struct tdb_traverse_lock *next;
u32 off;
u32 hash;
};
/* this is the context structure that is returned from a db open */
typedef struct tdb_context {
char *name; /* the name of the database */
void *map_ptr; /* where it is currently mapped */
int fd; /* open file descriptor for the database */
tdb_len map_size; /* how much space has been mapped */
int read_only; /* opened read-only */
struct tdb_lock_type *locked; /* array of chain locks */
enum TDB_ERROR ecode; /* error code for last tdb error */
struct tdb_header header; /* a cached copy of the header */
u32 flags; /* the flags passed to tdb_open */
u32 *lockedkeys; /* array of locked keys: first is #keys */
struct tdb_traverse_lock travlocks; /* current traversal locks */
struct tdb_context *next; /* all tdbs to avoid multiple opens */
dev_t device; /* uniquely identifies this tdb */
ino_t inode; /* uniquely identifies this tdb */
void (*log_fn)(struct tdb_context *tdb, int level, const char *, ...); /* logging function */
int open_flags; /* flags used in the open - needed by reopen */
} TDB_CONTEXT;
typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
typedef void (*tdb_log_func)(TDB_CONTEXT *, int , const char *, ...);
TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode,
tdb_log_func log_fn);
int tdb_reopen(TDB_CONTEXT *tdb);
int tdb_reopen_all(void);
void tdb_logging_function(TDB_CONTEXT *tdb, tdb_log_func);
enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb);
const char *tdb_errorstr(TDB_CONTEXT *tdb);
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
int tdb_append(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA new_dbuf);
int tdb_close(TDB_CONTEXT *tdb);
TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb);
TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state);
int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]);
void tdb_unlockkeys(TDB_CONTEXT *tdb);
int tdb_lockall(TDB_CONTEXT *tdb);
void tdb_unlockall(TDB_CONTEXT *tdb);
/* Low level locking functions: use with care */
void tdb_set_lock_alarm(sig_atomic_t *palarm);
int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
/* Debug functions. Not used in production. */
void tdb_dump_all(TDB_CONTEXT *tdb);
int tdb_printfreelist(TDB_CONTEXT *tdb);
extern TDB_DATA tdb_null;
#ifdef __cplusplus
}
#endif
#endif /* tdb.h */
netatalk-2.2.2/include/atalk/globals.h0000644000175200017500000001237211656511777014603 00000000000000/*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifndef AFPD_GLOBALS_H
#define AFPD_GLOBALS_H 1
#include
#include
#ifdef ADMIN_GRP
#include
#include
#endif /* ADMIN_GRP */
#ifdef HAVE_NETDB_H
#include /* this isn't header-protected under ultrix */
#endif /* HAVE_NETDB_H */
#include
#include
#include
#include
#include
/* #define DOSFILELEN 12 */ /* Type1, DOS-compat*/
#define MACFILELEN 31 /* Type2, HFS-compat */
#define UTF8FILELEN_EARLY 255 /* Type3, early Mac OS X 10.0-10.4.? */
/* #define UTF8FILELEN_NAME_MAX 765 */ /* Type3, 10.4.?- , getconf NAME_MAX */
/* #define UTF8FILELEN_SPEC 0xFFFF */ /* Type3, spec on document */
/* #define HFSPLUSFILELEN 510 */ /* HFS+ spec, 510byte = 255codepoint */
#define MAXUSERLEN 256
#define OPTION_DEBUG (1 << 0)
#define OPTION_USERVOLFIRST (1 << 1)
#define OPTION_NOUSERVOL (1 << 2)
#define OPTION_PROXY (1 << 3)
#define OPTION_CUSTOMICON (1 << 4)
#define OPTION_NOSLP (1 << 5)
#define OPTION_ANNOUNCESSH (1 << 6)
#define OPTION_UUID (1 << 7)
#define OPTION_ACL2MACCESS (1 << 8)
#define OPTION_NOZEROCONF (1 << 9)
#define OPTION_KEEPSESSIONS (1 << 10) /* preserve sessions across master afpd restart with SIGQUIT */
#ifdef FORCE_UIDGID
/* set up a structure for this */
typedef struct uidgidset_t {
uid_t uid;
gid_t gid;
} uidgidset;
#endif /* FORCE_UIDGID */
/* a couple of these options could get stuck in unions to save
* space. */
struct afp_volume_name {
time_t mtime;
char *name;
char *full_name;
int loaded;
};
struct afp_options {
int connections, transports, tickleval, timeout, server_notif, flags, dircachesize;
int sleep; /* Maximum time allowed to sleep (in tickles) */
int disconnected; /* Maximum time in disconnected state (in tickles) */
int fce_fmodwait; /* number of seconds FCE file mod events are put on hold */
unsigned int tcp_sndbuf, tcp_rcvbuf;
unsigned char passwdbits, passwdminlen, loginmaxfail;
u_int32_t server_quantum;
int dsireadbuf; /* scale factor for sizefof(dsi->buffer) = server_quantum * dsireadbuf */
char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *port, *configfile;
#ifndef NO_DDP
struct at_addr ddpaddr;
#endif
char *uampath, *fqdn;
char *pidfile;
char *sigconffile;
char *uuidconf;
struct afp_volume_name defaultvol, systemvol, uservol;
int closevol;
char *guest, *loginmesg, *keyfile, *passwdfile;
char *uamlist;
char *authprintdir;
char *signatureopt;
unsigned char signature[16];
char *k5service, *k5realm, *k5keytab;
char *unixcodepage,*maccodepage;
charset_t maccharset, unixcharset;
mode_t umask;
mode_t save_mask;
#ifdef ADMIN_GRP
gid_t admingid;
#endif /* ADMIN_GRP */
int volnamelen;
/* default value for winbind authentication */
char *ntdomain, *ntseparator;
char *logconfig;
char *mimicmodel;
char *adminauthuser;
};
#define AFPOBJ_TMPSIZ (MAXPATHLEN)
typedef struct _AFPObj {
int proto;
unsigned long servernum;
void *handle; /* either (DSI *) or (ASP *) */
void *config;
struct afp_options options;
char *Obj, *Type, *Zone;
char username[MAXUSERLEN];
void (*logout)(void), (*exit)(int);
int (*reply)(void *, int);
int (*attention)(void *, AFPUserBytes);
/* to prevent confusion, only use these in afp_* calls */
char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
void *uam_cookie; /* cookie for uams */
struct session_info sinfo;
uid_t uid; /* client running user id */
int ipc_fd; /* anonymous PF_UNIX socket for IPC with afpd parent */
#ifdef FORCE_UIDGID
int force_uid;
uidgidset uidgid;
#endif
} AFPObj;
/* typedef for AFP functions handlers */
typedef int (*AFPCmd)(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
/* Global variables */
extern AFPObj *AFPobj;
extern int afp_version;
extern int afp_errno;
extern unsigned char nologin;
extern struct dir *curdir;
extern char getwdbuf[];
extern struct afp_options default_options;
extern const char *Cnid_srv;
extern const char *Cnid_port;
extern int get_afp_errno (const int param);
extern void afp_options_init (struct afp_options *);
extern int afp_options_parse (int, char **, struct afp_options *);
extern int afp_options_parseline (char *, struct afp_options *);
extern void afp_options_free (struct afp_options *,
const struct afp_options *);
extern void setmessage (const char *);
extern void readmessage (AFPObj *);
/* gettok.c */
extern void initline (int, char *);
extern int parseline (int, char *);
/* afp_util.c */
extern const char *AfpNum2name (int );
extern const char *AfpErr2name(int err);
/* directory.c */
extern struct dir rootParent;
#ifndef NO_DDP
extern void afp_over_asp (AFPObj *);
#endif /* NO_DDP */
extern void afp_over_dsi (AFPObj *);
#endif /* globals.h */
netatalk-2.2.2/include/atalk/bstrlib.h0000644000175200017500000003361011655731126014606 00000000000000/*
* This source file is part of the bstring string library. This code was
* written by Paul Hsieh in 2002-2008, and is covered by the BSD open source
* license and the GPL. Refer to the accompanying documentation for details
* on usage and license.
*/
/*!
* @file
* This file is the core module for implementing the bstring functions.
*/
#ifndef BSTRLIB_INCLUDE
#define BSTRLIB_INCLUDE
#ifdef __cplusplus
extern "C" {
#endif
#include
#include
#include
#include
#if !defined (BSTRLIB_VSNP_OK) && !defined (BSTRLIB_NOVSNP)
# if defined (__TURBOC__) && !defined (__BORLANDC__)
# define BSTRLIB_NOVSNP
# endif
#endif
#define BSTR_ERR (-1)
#define BSTR_OK (0)
#define BSTR_BS_BUFF_LENGTH_GET (0)
typedef struct tagbstring * bstring;
typedef const struct tagbstring * const_bstring;
/* Copy functions */
#define cstr2bstr bfromcstr
extern bstring bfromcstr (const char * str);
extern bstring bfromcstralloc (int mlen, const char * str);
extern bstring blk2bstr (const void * blk, int len);
extern char * bstr2cstr (const_bstring s, char z);
extern int bcstrfree (char * s);
extern bstring bstrcpy (const_bstring b1);
extern int bassign (bstring a, const_bstring b);
extern int bassignmidstr (bstring a, const_bstring b, int left, int len);
extern int bassigncstr (bstring a, const char * str);
extern int bassignblk (bstring a, const void * s, int len);
/* Destroy function */
extern int bdestroy (bstring b);
/* Space allocation hinting functions */
extern int balloc (bstring s, int len);
extern int ballocmin (bstring b, int len);
/* Substring extraction */
extern bstring bmidstr (const_bstring b, int left, int len);
/* Various standard manipulations */
extern int bconcat (bstring b0, const_bstring b1);
extern int bconchar (bstring b0, char c);
extern int bcatcstr (bstring b, const char * s);
extern int bcatblk (bstring b, const void * s, int len);
extern int binsert (bstring s1, int pos, const_bstring s2, unsigned char fill);
extern int binsertch (bstring s1, int pos, int len, unsigned char fill);
extern int breplace (bstring b1, int pos, int len, const_bstring b2, unsigned char fill);
extern int bdelete (bstring s1, int pos, int len);
extern int bsetstr (bstring b0, int pos, const_bstring b1, unsigned char fill);
extern int btrunc (bstring b, int n);
/* Scan/search functions */
extern int bstricmp (const_bstring b0, const_bstring b1);
extern int bstrnicmp (const_bstring b0, const_bstring b1, int n);
extern int biseqcaseless (const_bstring b0, const_bstring b1);
extern int bisstemeqcaselessblk (const_bstring b0, const void * blk, int len);
extern int biseq (const_bstring b0, const_bstring b1);
extern int bisstemeqblk (const_bstring b0, const void * blk, int len);
extern int biseqcstr (const_bstring b, const char * s);
extern int biseqcstrcaseless (const_bstring b, const char * s);
extern int bstrcmp (const_bstring b0, const_bstring b1);
extern int bstrncmp (const_bstring b0, const_bstring b1, int n);
extern int binstr (const_bstring s1, int pos, const_bstring s2);
extern int binstrr (const_bstring s1, int pos, const_bstring s2);
extern int binstrcaseless (const_bstring s1, int pos, const_bstring s2);
extern int binstrrcaseless (const_bstring s1, int pos, const_bstring s2);
extern int bstrchrp (const_bstring b, int c, int pos);
extern int bstrrchrp (const_bstring b, int c, int pos);
#define bstrchr(b,c) bstrchrp ((b), (c), 0)
#define bstrrchr(b,c) bstrrchrp ((b), (c), blength(b)-1)
extern int binchr (const_bstring b0, int pos, const_bstring b1);
extern int binchrr (const_bstring b0, int pos, const_bstring b1);
extern int bninchr (const_bstring b0, int pos, const_bstring b1);
extern int bninchrr (const_bstring b0, int pos, const_bstring b1);
extern int bfindreplace (bstring b, const_bstring find, const_bstring repl, int pos);
extern int bfindreplacecaseless (bstring b, const_bstring find, const_bstring repl, int pos);
/* List of string container functions */
struct bstrList {
int qty, mlen;
bstring * entry;
};
extern struct bstrList * bstrListCreate (void);
extern int bstrListDestroy (struct bstrList * sl);
extern int bstrListAlloc (struct bstrList * sl, int msz);
extern int bstrListAllocMin (struct bstrList * sl, int msz);
/* String split and join functions */
extern struct bstrList * bsplit (const_bstring str, unsigned char splitChar);
extern struct bstrList * bsplits (const_bstring str, const_bstring splitStr);
extern struct bstrList * bsplitstr (const_bstring str, const_bstring splitStr);
extern bstring bjoin (const struct bstrList * bl, const_bstring sep);
extern int bsplitcb (const_bstring str, unsigned char splitChar, int pos,
int (* cb) (void * parm, int ofs, int len), void * parm);
extern int bsplitscb (const_bstring str, const_bstring splitStr, int pos,
int (* cb) (void * parm, int ofs, int len), void * parm);
extern int bsplitstrcb (const_bstring str, const_bstring splitStr, int pos,
int (* cb) (void * parm, int ofs, int len), void * parm);
/* Miscellaneous functions */
extern int bpattern (bstring b, int len);
extern int btoupper (bstring b);
extern int btolower (bstring b);
extern int bltrimws (bstring b);
extern int brtrimws (bstring b);
extern int btrimws (bstring b);
#if !defined (BSTRLIB_NOVSNP)
extern bstring bformat (const char * fmt, ...);
extern int bformata (bstring b, const char * fmt, ...);
extern int bassignformat (bstring b, const char * fmt, ...);
extern int bvcformata (bstring b, int count, const char * fmt, va_list arglist);
#define bvformata(ret, b, fmt, lastarg) { \
bstring bstrtmp_b = (b); \
const char * bstrtmp_fmt = (fmt); \
int bstrtmp_r = BSTR_ERR, bstrtmp_sz = 16; \
for (;;) { \
va_list bstrtmp_arglist; \
va_start (bstrtmp_arglist, lastarg); \
bstrtmp_r = bvcformata (bstrtmp_b, bstrtmp_sz, bstrtmp_fmt, bstrtmp_arglist); \
va_end (bstrtmp_arglist); \
if (bstrtmp_r >= 0) { /* Everything went ok */ \
bstrtmp_r = BSTR_OK; \
break; \
} else if (-bstrtmp_r <= bstrtmp_sz) { /* A real error? */ \
bstrtmp_r = BSTR_ERR; \
break; \
} \
bstrtmp_sz = -bstrtmp_r; /* Doubled or target size */ \
} \
ret = bstrtmp_r; \
}
#endif
typedef int (*bNgetc) (void *parm);
typedef size_t (* bNread) (void *buff, size_t elsize, size_t nelem, void *parm);
/* Input functions */
extern bstring bgetstream (bNgetc getcPtr, void * parm, char terminator);
extern bstring bread (bNread readPtr, void * parm);
extern int bgetsa (bstring b, bNgetc getcPtr, void * parm, char terminator);
extern int bassigngets (bstring b, bNgetc getcPtr, void * parm, char terminator);
extern int breada (bstring b, bNread readPtr, void * parm);
/* Stream functions */
extern struct bStream * bsopen (bNread readPtr, void * parm);
extern void * bsclose (struct bStream * s);
extern int bsbufflength (struct bStream * s, int sz);
extern int bsreadln (bstring b, struct bStream * s, char terminator);
extern int bsreadlns (bstring r, struct bStream * s, const_bstring term);
extern int bsread (bstring b, struct bStream * s, int n);
extern int bsreadlna (bstring b, struct bStream * s, char terminator);
extern int bsreadlnsa (bstring r, struct bStream * s, const_bstring term);
extern int bsreada (bstring b, struct bStream * s, int n);
extern int bsunread (struct bStream * s, const_bstring b);
extern int bspeek (bstring r, const struct bStream * s);
extern int bssplitscb (struct bStream * s, const_bstring splitStr,
int (* cb) (void * parm, int ofs, const_bstring entry), void * parm);
extern int bssplitstrcb (struct bStream * s, const_bstring splitStr,
int (* cb) (void * parm, int ofs, const_bstring entry), void * parm);
extern int bseof (const struct bStream * s);
struct tagbstring {
int mlen;
int slen;
unsigned char * data;
};
/* Accessor macros */
#define blengthe(b, e) (((b) == (void *)0 || (b)->slen < 0) ? (int)(e) : ((b)->slen))
#define blength(b) (blengthe ((b), 0))
#define bdataofse(b, o, e) (((b) == (void *)0 || (b)->data == (void*)0) ? (char *)(e) : ((char *)(b)->data) + (o))
#define bdataofs(b, o) (bdataofse ((b), (o), (void *)0))
#define bdatae(b, e) (bdataofse (b, 0, e))
#define bdata(b) (bdataofs (b, 0))
#define bchare(b, p, e) ((((unsigned)(p)) < (unsigned)blength(b)) ? ((b)->data[(p)]) : (e))
#define bchar(b, p) bchare ((b), (p), '\0')
/* Static constant string initialization macro */
#define bsStaticMlen(q,m) {(m), (int) sizeof(q)-1, (unsigned char *) ("" q "")}
#if defined(_MSC_VER)
# define bsStatic(q) bsStaticMlen(q,-32)
#endif
#ifndef bsStatic
# define bsStatic(q) bsStaticMlen(q,-__LINE__)
#endif
/* Static constant block parameter pair */
#define bsStaticBlkParms(q) ((void *)("" q "")), ((int) sizeof(q)-1)
/* Reference building macros */
#define cstr2tbstr btfromcstr
#define btfromcstr(t,s) { \
(t).data = (unsigned char *) (s); \
(t).slen = ((t).data) ? ((int) (strlen) ((char *)(t).data)) : 0; \
(t).mlen = -1; \
}
#define blk2tbstr(t,s,l) { \
(t).data = (unsigned char *) (s); \
(t).slen = l; \
(t).mlen = -1; \
}
#define btfromblk(t,s,l) blk2tbstr(t,s,l)
#define bmid2tbstr(t,b,p,l) { \
const_bstring bstrtmp_s = (b); \
if (bstrtmp_s && bstrtmp_s->data && bstrtmp_s->slen >= 0) { \
int bstrtmp_left = (p); \
int bstrtmp_len = (l); \
if (bstrtmp_left < 0) { \
bstrtmp_len += bstrtmp_left; \
bstrtmp_left = 0; \
} \
if (bstrtmp_len > bstrtmp_s->slen - bstrtmp_left) \
bstrtmp_len = bstrtmp_s->slen - bstrtmp_left; \
if (bstrtmp_len <= 0) { \
(t).data = (unsigned char *)""; \
(t).slen = 0; \
} else { \
(t).data = bstrtmp_s->data + bstrtmp_left; \
(t).slen = bstrtmp_len; \
} \
} else { \
(t).data = (unsigned char *)""; \
(t).slen = 0; \
} \
(t).mlen = -__LINE__; \
}
#define btfromblkltrimws(t,s,l) { \
int bstrtmp_idx = 0, bstrtmp_len = (l); \
unsigned char * bstrtmp_s = (s); \
if (bstrtmp_s && bstrtmp_len >= 0) { \
for (; bstrtmp_idx < bstrtmp_len; bstrtmp_idx++) { \
if (!isspace (bstrtmp_s[bstrtmp_idx])) break; \
} \
} \
(t).data = bstrtmp_s + bstrtmp_idx; \
(t).slen = bstrtmp_len - bstrtmp_idx; \
(t).mlen = -__LINE__; \
}
#define btfromblkrtrimws(t,s,l) { \
int bstrtmp_len = (l) - 1; \
unsigned char * bstrtmp_s = (s); \
if (bstrtmp_s && bstrtmp_len >= 0) { \
for (; bstrtmp_len >= 0; bstrtmp_len--) { \
if (!isspace (bstrtmp_s[bstrtmp_len])) break; \
} \
} \
(t).data = bstrtmp_s; \
(t).slen = bstrtmp_len + 1; \
(t).mlen = -__LINE__; \
}
#define btfromblktrimws(t,s,l) { \
int bstrtmp_idx = 0, bstrtmp_len = (l) - 1; \
unsigned char * bstrtmp_s = (s); \
if (bstrtmp_s && bstrtmp_len >= 0) { \
for (; bstrtmp_idx <= bstrtmp_len; bstrtmp_idx++) { \
if (!isspace (bstrtmp_s[bstrtmp_idx])) break; \
} \
for (; bstrtmp_len >= bstrtmp_idx; bstrtmp_len--) { \
if (!isspace (bstrtmp_s[bstrtmp_len])) break; \
} \
} \
(t).data = bstrtmp_s + bstrtmp_idx; \
(t).slen = bstrtmp_len + 1 - bstrtmp_idx; \
(t).mlen = -__LINE__; \
}
/* Write protection macros */
#define bwriteprotect(t) { if ((t).mlen >= 0) (t).mlen = -1; }
#define bwriteallow(t) { if ((t).mlen == -1) (t).mlen = (t).slen + ((t).slen == 0); }
#define biswriteprotected(t) ((t).mlen <= 0)
#ifdef __cplusplus
}
#endif
#endif
netatalk-2.2.2/include/atalk/nbp.h0000644000175200017500000000510411655731244013722 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_NBP_H
#define _ATALK_NBP_H 1
#ifndef NO_DDP
#define NBP_UNRGSTR_4ARGS 1
#define ATP_OPEN_2ARGS 1
#include
#include
#include
#include
struct nbphdr {
#if BYTE_ORDER == BIG_ENDIAN
unsigned nh_op : 4,
nh_cnt : 4,
#else /* BYTE_ORDER != BIG_ENDIAN */
unsigned nh_cnt : 4,
nh_op : 4,
#endif /* BYTE_ORDER */
nh_id : 8;
};
#define SZ_NBPHDR 2
struct nbptuple {
u_int16_t nt_net;
u_int8_t nt_node;
u_int8_t nt_port;
u_int8_t nt_enum;
};
#define SZ_NBPTUPLE 5
#define NBPSTRLEN 32
/*
* Name Binding Protocol Network Visible Entity
*/
struct nbpnve {
struct sockaddr_at nn_sat;
u_char nn_objlen;
char nn_obj[ NBPSTRLEN ];
u_char nn_typelen;
char nn_type[ NBPSTRLEN ];
u_char nn_zonelen;
char nn_zone[ NBPSTRLEN ];
};
/*
* Note that NBPOP_ERROR is not standard. As Apple adds more NBPOPs,
* we need to check for collisions with our extra values. */
#define NBPOP_BRRQ 0x1
#define NBPOP_LKUP 0x2
#define NBPOP_LKUPREPLY 0x3
#define NBPOP_FWD 0x4
#define NBPOP_RGSTR 0x7
#define NBPOP_UNRGSTR 0x8
#define NBPOP_CONFIRM 0x9
#define NBPOP_OK 0xa /* NBPOP_STATUS_REPLY */
#define NBPOP_CLOSE_NOTE 0xb
#define NBPOP_ERROR 0xf
#define NBPMATCH_NOGLOB (1<<1)
#define NBPMATCH_NOZONE (1<<2)
extern int nbp_name (const char *, char **, char **, char **);
extern int nbp_lookup (const char *, const char *, const char *,
struct nbpnve *, const int,
const struct at_addr *);
extern int nbp_rgstr (struct sockaddr_at *,
const char *, const char *, const char *);
extern int nbp_unrgstr (const char *, const char *, const char *,
const struct at_addr *);
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/queue.h0000644000175200017500000000235411655731126014272 00000000000000/*
Copyright (c) 2010 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ATALK_QUEUE_H
#define ATALK_QUEUE_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
typedef struct qnode {
struct qnode *prev;
struct qnode *next;
void *data;
} qnode_t;
typedef qnode_t q_t;
extern q_t *queue_init(void);
extern void queue_destroy(q_t *q, void (*callback)(void *));
#define queue_free(q) queue_destroy((q), free)
extern qnode_t *enqueue(q_t *q, void *data);
extern qnode_t *prequeue(q_t *q, void *data);
extern void *dequeue(q_t *q);
#endif /* ATALK_QUEUE_H */
netatalk-2.2.2/include/atalk/server_child.h0000644000175200017500000000415011655731126015613 00000000000000/*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved.
*/
#ifndef _ATALK_SERVER_CHILD_H
#define _ATALK_SERVER_CHILD_H 1
#include
#include
#include
/* useful stuff for child processes. most of this is hidden in
* server_child.c to ease changes in implementation */
#define CHILD_NFORKS 2
#define CHILD_ASPFORK 0
#define CHILD_PAPFORK 0
#define CHILD_DSIFORK 1
typedef struct server_child {
void *fork;
int count, nsessions, nforks;
} server_child;
typedef struct server_child_data {
pid_t pid; /* afpd worker process pid (from the worker afpd process )*/
uid_t uid; /* user id of connected client (from the worker afpd process) */
int valid; /* 1 if we have a clientid */
int killed; /* 1 if we already tried to kill the client */
int disasociated; /* 1 if this is not a child, but a child from a previous afpd master */
uint32_t time; /* client boot time (from the mac client) */
uint32_t idlen; /* clientid len (from the Mac client) */
char *clientid; /* clientid (from the Mac client) */
int ipc_fds[2]; /* socketpair for IPC bw */
struct server_child_data **prevp, *next;
} afp_child_t;
extern int parent_or_child;
/* server_child.c */
extern server_child *server_child_alloc (const int, const int);
extern afp_child_t *server_child_add (server_child *, int, pid_t, uint ipc_fds[2]);
extern int server_child_remove (server_child *, const int, const pid_t);
extern void server_child_free (server_child *);
extern void server_child_kill (server_child *, const int, const int);
extern void server_child_kill_one_by_id (server_child *children, const int forkid, const pid_t pid, const uid_t,
const u_int32_t len, char *id, u_int32_t boottime);
extern int server_child_transfer_session(server_child *children, int forkid, pid_t, uid_t, int, uint16_t);
extern void server_child_setup (server_child *, const int, void (*)(const pid_t));
extern void server_child_handler (server_child *);
extern void server_reset_signal (void);
#endif
netatalk-2.2.2/include/atalk/paths.h0000644000175200017500000000457011655731244014270 00000000000000#ifndef ATALK_PATHS_H
#define ATALK_PATHS_H 1
/* we need a way of concatenating strings */
#ifdef __STDC__
#ifdef HAVE_BROKEN_CPP
#define BROKEN_ECHO(a) a
#define ATALKPATHCAT(a,b) BROKEN_ECHO(a)##BROKEN_ECHO(b)
#else
#define ATALKPATHCAT(a,b) a b
#endif
#else
#define ATALKPATHCAT(a,b) a/**/b
#endif
/* lock file path. this should be re-organized a bit. */
#if ! defined (_PATH_LOCKDIR)
# if defined (FHS_COMPATIBILITY) || defined (__NetBSD__) || defined (__OpenBSD__)
# define _PATH_LOCKDIR "/var/run/"
# elif defined (BSD4_4)
# ifdef MACOSX_SERVER
# define _PATH_LOCKDIR "/var/run/"
# else
# define _PATH_LOCKDIR "/var/spool/lock/"
# endif
# elif defined (linux)
# define _PATH_LOCKDIR "/var/lock/"
# else
# define _PATH_LOCKDIR "/var/spool/locks/"
# endif
#endif
/*
* papd paths
*/
#define _PATH_PAPDPRINTCAP "/etc/printcap"
#ifdef ultrix
#define _PATH_PAPDSPOOLDIR "/usr/spool/lpd"
#else /* !ultrix */
#define _PATH_PAPDSPOOLDIR "/var/spool/lpd"
#endif /* ultrix */
#ifdef BSD4_4
#define _PATH_DEVPRINTER "/var/run/printer"
#else /* !BSD4_4 */
#define _PATH_DEVPRINTER "/dev/printer"
#endif /* BSD4_4 */
/*
* atalkd paths
*/
#define _PATH_ATALKDEBUG "/tmp/atalkd.debug"
#define _PATH_ATALKDTMP "atalkd.tmp"
#if defined (FHS_COMPATIBILITY) || defined (__NetBSD__) || defined (__OpenBSD__)
# define _PATH_ATALKDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"atalkd.pid")
#else
# define _PATH_ATALKDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"atalkd")
#endif
/*
* psorder paths
*/
#define _PATH_TMPPAGEORDER "/tmp/psorderXXXXXX"
#if defined (FHS_COMPATIBILITY) || defined (__NetBSD__) || defined (__OpenBSD__)
# define _PATH_PAPDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"papd.pid")
#else
# define _PATH_PAPDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"papd")
#endif
/*
* afpd paths
*/
#define _PATH_AFPTKT "/tmp/AFPtktXXXXXX"
#define _PATH_AFP_IPC ATALKPATHCAT(_PATH_LOCKDIR,"afpd_ipc")
#if defined (FHS_COMPATIBILITY) || defined (__NetBSD__) || defined (__OpenBSD__)
# define _PATH_AFPDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"afpd.pid")
#else
# define _PATH_AFPDLOCK ATALKPATHCAT(_PATH_LOCKDIR,"afpd")
#endif
/*
* cnid_metad paths
*/
#if defined (FHS_COMPATIBILITY) || defined (__NetBSD__) || defined (__OpenBSD__)
# define _PATH_CNID_METAD_LOCK ATALKPATHCAT(_PATH_LOCKDIR,"cnid_metad.pid")
#else
# define _PATH_CNID_METAD_LOCK ATALKPATHCAT(_PATH_LOCKDIR,"cnid_metad")
#endif
#endif /* atalk/paths.h */
netatalk-2.2.2/include/atalk/afp.h0000644000175200017500000002030411655731126013707 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_AFP_H
#define _ATALK_AFP_H 1
#include
#include
typedef u_int16_t AFPUserBytes;
/* protocols */
#define AFPPROTO_ASP 1
#define AFPPROTO_DSI 2
/* actual transports. the DSI ones (tcp right now) need to be
* kept in sync w/ .
* convention: AFPTRANS_* = (1 << DSI_*)
*/
#define AFPTRANS_NONE 0
#define AFPTRANS_DDP (1 << 0)
#define AFPTRANS_TCP (1 << 1)
#define AFPTRANS_ALL (AFPTRANS_DDP | AFPTRANS_TCP)
/* server flags */
#define AFPSRVRINFO_COPY (1<<0) /* supports copyfile */
#define AFPSRVRINFO_PASSWD (1<<1) /* supports change password */
#define AFPSRVRINFO_NOSAVEPASSWD (1<<2) /* don't allow save password */
#define AFPSRVRINFO_SRVMSGS (1<<3) /* supports server messages */
#define AFPSRVRINFO_SRVSIGNATURE (1<<4) /* supports server signature */
#define AFPSRVRINFO_TCPIP (1<<5) /* supports tcpip */
#define AFPSRVRINFO_SRVNOTIFY (1<<6) /* supports server notifications */
#define AFPSRVRINFO_SRVRECONNECT (1<<7) /* supports server reconnect */
#define AFPSRVRINFO_SRVRDIR (1<<8) /* supports directories service */
#define AFPSRVRINFO_SRVUTF8 (1<<9) /* supports UTF8 names AFP 3.1 */
#define AFPSRVRINFO_UUID (1<<10) /* supports UUIDs */
#define AFPSRVRINFO_EXTSLEEP (1<<11) /* supports extended sleep */
#define AFPSRVRINFO_FASTBOZO (1<<15) /* fast copying */
#define AFP_OK 0
#define AFPERR_DID1 -4000 /* not an afp error DID is 1*/
#define AFPERR_ACCESS -5000 /* permission denied */
#define AFPERR_AUTHCONT -5001 /* logincont */
#define AFPERR_BADUAM -5002 /* uam doesn't exist */
#define AFPERR_BADVERS -5003 /* bad afp version number */
#define AFPERR_BITMAP -5004 /* invalid bitmap */
#define AFPERR_CANTMOVE -5005 /* can't move file */
#define AFPERR_DENYCONF -5006 /* file synchronization locks conflict */
#define AFPERR_DIRNEMPT -5007 /* directory not empty */
#define AFPERR_DFULL -5008 /* disk full */
#define AFPERR_EOF -5009 /* end of file -- catsearch and afp_read */
#define AFPERR_BUSY -5010 /* FileBusy */
#define AFPERR_FLATVOL -5011 /* volume doesn't support directories */
#define AFPERR_NOITEM -5012 /* ItemNotFound */
#define AFPERR_LOCK -5013 /* LockErr */
#define AFPERR_MISC -5014 /* misc. err */
#define AFPERR_NLOCK -5015 /* no more locks */
#define AFPERR_NOSRVR -5016 /* no response by server at that address */
#define AFPERR_EXIST -5017 /* object already exists */
#define AFPERR_NOOBJ -5018 /* object not found */
#define AFPERR_PARAM -5019 /* parameter error */
#define AFPERR_NORANGE -5020 /* no range lock */
#define AFPERR_RANGEOVR -5021 /* range overlap */
#define AFPERR_SESSCLOS -5022 /* session closed */
#define AFPERR_NOTAUTH -5023 /* user not authenticated */
#define AFPERR_NOOP -5024 /* command not supported */
#define AFPERR_BADTYPE -5025 /* object is the wrong type */
#define AFPERR_NFILE -5026 /* too many files open */
#define AFPERR_SHUTDOWN -5027 /* server is going down */
#define AFPERR_NORENAME -5028 /* can't rename */
#define AFPERR_NODIR -5029 /* couldn't find directory */
#define AFPERR_ITYPE -5030 /* wrong icon type */
#define AFPERR_VLOCK -5031 /* volume locked */
#define AFPERR_OLOCK -5032 /* object locked */
#define AFPERR_CTNSHRD -5033 /* share point contains a share point */
#define AFPERR_NOID -5034 /* file thread not found */
#define AFPERR_EXISTID -5035 /* file already has an id */
#define AFPERR_DIFFVOL -5036 /* different volume */
#define AFPERR_CATCHNG -5037 /* catalog has changed */
#define AFPERR_SAMEOBJ -5038 /* source file == destination file */
#define AFPERR_BADID -5039 /* non-existent file id */
#define AFPERR_PWDSAME -5040 /* same password/can't change password */
#define AFPERR_PWDSHORT -5041 /* password too short */
#define AFPERR_PWDEXPR -5042 /* password expired */
#define AFPERR_INSHRD -5043 /* folder being shared is inside a
shared folder. may be returned by
afpMoveAndRename. */
#define AFPERR_INTRASH -5044 /* shared folder in trash. */
#define AFPERR_PWDCHNG -5045 /* password needs to be changed */
#define AFPERR_PWDPOLCY -5046 /* password fails policy check */
#define AFPERR_USRLOGIN -5047 /* user already logged on */
/* AFP Attention Codes -- 4 bits */
#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */
#define AFPATTN_CRASH (1 << 14) /* server crashed */
#define AFPATTN_MESG (1 << 13) /* server has message */
#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */
/* server notification */
#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT)
/* extended bitmap -- 12 bits. volchanged is only useful w/ a server
* notification, and time is only useful for shutdown. */
#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */
#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */
typedef enum {
AFPMESG_LOGIN = 0,
AFPMESG_SERVER = 1
} afpmessage_t;
/* extended sleep flag */
#define AFPZZZ_EXT_SLEEP 1
#define AFPZZZ_EXT_WAKEUP 2
/* AFP functions */
#define AFP_BYTELOCK 1
#define AFP_CLOSEVOL 2
#define AFP_CLOSEDIR 3
#define AFP_CLOSEFORK 4
#define AFP_COPYFILE 5
#define AFP_CREATEDIR 6
#define AFP_CREATEFILE 7
#define AFP_DELETE 8
#define AFP_ENUMERATE 9
#define AFP_FLUSH 10
#define AFP_FLUSHFORK 11
#define AFP_GETFORKPARAM 14
#define AFP_GETSRVINFO 15
#define AFP_GETSRVPARAM 16
#define AFP_GETVOLPARAM 17
#define AFP_LOGIN 18
#define AFP_LOGINCONT 19
#define AFP_LOGOUT 20
#define AFP_MAPID 21
#define AFP_MAPNAME 22
#define AFP_MOVE 23
#define AFP_OPENVOL 24
#define AFP_OPENDIR 25
#define AFP_OPENFORK 26
#define AFP_READ 27
#define AFP_RENAME 28
#define AFP_SETDIRPARAM 29
#define AFP_SETFILEPARAM 30
#define AFP_SETFORKPARAM 31
#define AFP_SETVOLPARAM 32
#define AFP_WRITE 33
#define AFP_GETFLDRPARAM 34
#define AFP_SETFLDRPARAM 35
#define AFP_CHANGEPW 36
#define AFP_GETUSERINFO 37
#define AFP_GETSRVRMSG 38
#define AFP_CREATEID 39
#define AFP_DELETEID 40
#define AFP_RESOLVEID 41
#define AFP_EXCHANGEFILE 42
#define AFP_CATSEARCH 43
#define AFP_OPENDT 48
#define AFP_CLOSEDT 49
#define AFP_GETICON 51
#define AFP_GTICNINFO 52
#define AFP_ADDAPPL 53
#define AFP_RMVAPPL 54
#define AFP_GETAPPL 55
#define AFP_ADDCMT 56
#define AFP_RMVCMT 57
#define AFP_GETCMT 58
#define AFP_ADDICON 192
/* version 3.0 */
#define AFP_BYTELOCK_EXT 59
#define AFP_CATSEARCH_EXT 67
#define AFP_ENUMERATE_EXT 66
#define AFP_READ_EXT 60
#define AFP_WRITE_EXT 61
#define AFP_LOGIN_EXT 63
#define AFP_GETSESSTOKEN 64
#define AFP_DISCTOLDSESS 65
/* version 3.1 */
#define AFP_ENUMERATE_EXT2 68
#define AFP_SPOTLIGHT_PRIVATE 76
#define AFP_SYNCDIR 78
#define AFP_SYNCFORK 79
#define AFP_ZZZ 122
/* version 3.2 */
#define AFP_GETEXTATTR 69
#define AFP_SETEXTATTR 70
#define AFP_REMOVEATTR 71
#define AFP_LISTEXTATTR 72
#define AFP_GETACL 73
#define AFP_SETACL 74
#define AFP_ACCESS 75
/* more defines */
#define REPLAYCACHE_SIZE 128
#endif
netatalk-2.2.2/include/atalk/ddp.h0000644000175200017500000000212511655731244013712 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_DDP_H
#define _ATALK_DDP_H 1
#ifndef NO_DDP
#define DDPTYPE_RTMPRD 1
#define DDPTYPE_NBP 2
#define DDPTYPE_ATP 3
#define DDPTYPE_AEP 4
#define DDPTYPE_RTMPR 5
#define DDPTYPE_ZIP 6
#define DDPTYPE_ADSP 7
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/logger.h0000644000175200017500000001642211655731244014427 00000000000000#ifndef _ATALK_LOGGER_H
#define _ATALK_LOGGER_H 1
/*
* logger LOG Macro Usage
* ======================
*
* LOG(, , ""[, args]);
*
*
* logger API Setup
* ================
*
* Standard interface:
* -------------------
*
* setuplog(char *confstring)
* confstring = " []"
*
* Calling without configures basic logging to syslog. Specifying
* configures extended logging to .
*
* You can later disable logging by calling
*
* unsetuplog(char *confstring)
* confstring = " []"
*
* Calling without disables syslog logging, calling with
* disables file logging.
*
* :
* you can setup a default with "Default". Any other logtype used in LOG will then
* use the default if not setup itself. This is probabyl the only thing you may
* want to use.
*
* Example:
* setuplog("default log_debug /var/log/debug.log");
* See also libatalk/util/test/logger_test.c
*
* "Legacy" interface:
* -------------------
*
* Some netatalk daemons (31.3.2009.: e.g. atalkd, papd) may not be converted to
* use the new API and might still call
*
* syslog_setup(int loglevel, enum logtypes logtype, int display_options, int facility);
*
* directly. These daemons are therefore limited to syslog logging. Also their
* loglevel can't be changed at runtime.
*
*
* Note:
* dont get confused by log_init(). It only gets called if your app
* forgets to setup logging before calling LOG.
*/
#include
#include
#include
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* logger is used by pam modules */
#ifndef UAM_MODULE_EXPORT
#define UAM_MODULE_EXPORT
#endif
enum loglevels {
log_none,
log_severe,
log_error,
log_warning,
log_note,
log_info,
log_debug,
log_debug6,
log_debug7,
log_debug8,
log_debug9,
log_maxdebug
};
/* this is the enum specifying all availiable logtypes */
enum logtypes {
logtype_default,
logtype_logger,
logtype_cnid,
logtype_afpd,
logtype_dsi,
logtype_atalkd,
logtype_papd,
logtype_uams,
logtype_end_of_list_marker /* don't put any logtypes after this */
};
/* Display Option flags. */
/* redefine these so they can don't interfeer with syslog */
/* these can be used in standard logging too */
#define logoption_nsrcinfo 0x04 /* don't log source info */
/* the following do not work anymore, they're only provided in order to not
* break existing source code */
#define logoption_pid 0x01 /* log the pid with each message */
#define logoption_cons 0x02 /* log on the console if error logging */
#define logoption_ndelay 0x08 /* don't delay open */
#define logoption_perror 0x20 /* log to stderr as well */
#define logoption_nfile 0x40 /* ignore the file that called the log */
#define logoption_nline 0x80 /* ignore the line that called the log*/
/* facility codes */
/* redefine these so they can don't interfeer with syslog */
#define logfacility_user (1<<3) /* random user-level messages */
#define logfacility_mail (2<<3) /* mail system */
#define logfacility_daemon (3<<3) /* system daemons */
#define logfacility_auth (4<<3) /* security/authorization messages */
#define logfacility_syslog (5<<3) /* messages generated by syslogd */
#define logfacility_lpr (6<<3) /* line printer subsystem */
#define logfacility_authpriv (10<<3) /* security/auth messages (private) */
#define logfacility_ftp (11<<3) /* ftp daemon */
/* =========================================================================
Structure definitions
========================================================================= */
/* Main log config */
typedef struct {
bool inited; /* file log config initialized ? */
bool syslog_opened; /* syslog opened ? */
bool console; /* if logging to console from a cli util */
char processname[16];
int syslog_facility;
int syslog_display_options;
} log_config_t;
/* This stores the config and options for one filelog type (e.g. logger, afpd etc.) */
typedef struct {
bool set; /* set individually ? yes: changing default
* doesnt change it. no: it changes it.*/
bool syslog; /* This type logs to syslog */
int fd; /* logfiles fd */
enum loglevels level; /* Log Level to put in this file */
int display_options;
} logtype_conf_t;
/* =========================================================================
Global variables
========================================================================= */
/* Make config accessible for LOG macro */
extern log_config_t log_config;
extern UAM_MODULE_EXPORT logtype_conf_t type_configs[logtype_end_of_list_marker];
/* =========================================================================
Global function decarations
========================================================================= */
/* */
void log_init(void);
/* Setup the level and type of log that will be logged for file loggging */
void log_setup(const char *filename, enum loglevels loglevel, enum logtypes logtype);
/* Setup the level and type of log that will be logged to syslog. */
void syslog_setup(int loglevel, enum logtypes logtype,
int display_options, int facility);
/* This gets called e.g. from afpd.conf parsing code with a string like: */
/* "default log_maxdebug /var/log/afpd.log" */
void setuplog(const char *logstr);
/* This gets called e.g. from afpd.conf parsing code with a string like: */
/* "default dummyname" */
void unsetuplog(const char *logstr);
/* finish up and close the logs */
void log_close(void);
/* This function sets up the ProcessName */
void set_processname(const char *processname);
/* LOG macro func no.1: log the message to file */
UAM_MODULE_EXPORT void make_log_entry(enum loglevels loglevel, enum logtypes logtype, const char *file, int line, char *message, ...);
/*
* How to write a LOG macro:
* http://c-faq.com/cpp/debugmacs.html
*
* We choose the verbose form in favor of the obfuscated ones, its easier
* to parse for human beings and facilitates expanding the macro for
* inline checks for debug levels.
*
* How to properly enclose multistatement macros:
* http://en.wikipedia.org/wiki/C_macro#Multiple_statements
*/
#define LOG_MAX log_info
#ifdef NO_DEBUG
#define LOG(log_level, type, ...) \
do { \
if (log_level <= LOG_MAX) \
if (log_level <= type_configs[type].level) \
make_log_entry((log_level), (type), __FILE__, __LINE__, __VA_ARGS__); \
} while(0)
#else /* ! NO_DEBUG */
#define LOG(log_level, type, ...) \
do { \
if (log_level <= type_configs[type].level) \
make_log_entry((log_level), (type), __FILE__, __LINE__, __VA_ARGS__); \
} while(0)
#endif /* NO_DEBUG */
#endif /* _ATALK_LOGGER_H */
netatalk-2.2.2/include/atalk/unix.h0000644000175200017500000000311711655731244014130 00000000000000/*
$Id: unix.h,v 1.3 2010-03-12 15:16:49 franklahm Exp $
Copyright (c) 2009 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef ATALK_UNIX_H
#define ATALK_UNIX_H
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#include
/* vfs/unix.c */
extern int netatalk_unlink(const char *name);
extern int netatalk_unlinkat(int dirfd, const char *name);
extern int statat(int dirfd, const char *path, struct stat *st);
extern int lstatat(int dirfd, const char *path, struct stat *st);
extern DIR *opendirat(int dirfd, const char *path);
/* rmdir ENOENT not an error */
extern int netatalk_rmdir(int dirfd, const char *name);
extern int netatalk_rmdir_all_errors(int dirfd, const char *name);
extern int setfilmode(const char *, mode_t, struct stat *, mode_t);
extern int dir_rx_set(mode_t mode);
extern int stickydirmode(const char *name, const mode_t mode, const int dropbox, const mode_t v_umask);
extern int unix_rename(int sfd, const char *oldpath, int dfd, const char *newpath);
extern int copy_file(int sfd, const char *src, const char *dst, mode_t mode);
#endif /* ATALK_UNIX_H */
netatalk-2.2.2/include/atalk/server_ipc.h0000644000175200017500000000073311655731126015306 00000000000000#ifndef ATALK_SERVER_IPC_H
#define ATALK_SERVER_IPC_H
#include
#include
#define IPC_DISCOLDSESSION 0
#define IPC_GETSESSION 1
extern int ipc_server_uds(const char *name);
extern int ipc_client_uds(const char *name);
extern int reconnect_ipc(AFPObj *);
extern int ipc_server_read(server_child *children, int fd);
extern int ipc_child_write(int fd, uint16_t command, int len, void *token);
#endif /* IPC_GETSESSION_LOGIN */
netatalk-2.2.2/include/atalk/errchk.h0000644000175200017500000001652211655751751014434 00000000000000/*
Copyright (c) 2010 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef ERRCHECK_H
#define ERRCHECK_H
#define EC_INIT int ret = 0
#define EC_STATUS(a) ret = (a)
#define EC_FAIL do { ret = -1; goto cleanup; } while (0)
#define EC_CLEANUP cleanup
#define EC_EXIT return ret
/*
* Check out doc/DEVELOPER for more infos.
*
* We have these macros:
* EC_ZERO, EC_ZERO_LOG, EC_ZERO_LOGSTR, EC_ZERO_LOG_ERR, EC_ZERO_CUSTOM
* EC_NEG1, EC_NEG1_LOG, EC_NEG1_LOGSTR, EC_NEG1_LOG_ERR, EC_NEG1_CUSTOM
* EC_NULL, EC_NULL_LOG, EC_NULL_LOGSTR, EC_NULL_LOG_ERR, EC_NULL_CUSTOM
*
* A boileplate function template is:
int func(void)
{
EC_INIT;
...your code here...
EC_STATUS(0);
EC_CLEANUP:
EC_EXIT;
}
*/
/* check for return val 0 which is ok, every other is an error, prints errno */
#define EC_ZERO_LOG(a) \
do { \
if ((a) != 0) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_ZERO_LOGSTR(a, b, ...) \
do { \
if ((a) != 0) { \
LOG(log_error, logtype_default, b, __VA_ARGS__); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_ZERO_LOG_ERR(a, b) \
do { \
if ((a) != 0) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = (b); \
goto cleanup; \
} \
} while (0)
#define EC_ZERO(a) \
do { \
if ((a) != 0) { \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_ZERO_ERR(a,b ) \
do { \
if ((a) != 0) { \
ret = b; \
goto cleanup; \
} \
} while (0)
/* check for return val 0 which is ok, every other is an error, prints errno */
#define EC_NEG1_LOG(a) \
do { \
if ((a) == -1) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_NEG1_LOGSTR(a, b, ...) \
do { \
if ((a) == -1) { \
LOG(log_error, logtype_default, b, __VA_ARGS__); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_NEG1_LOG_ERR(a, b) \
do { \
if ((a) == -1) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = b; \
goto cleanup; \
} \
} while (0)
#define EC_NEG1(a) \
do { \
if ((a) == -1) { \
ret = -1; \
goto cleanup; \
} \
} while (0)
/* check for return val != NULL, prints errno */
#define EC_NULL_LOG(a) \
do { \
if ((a) == NULL) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_NULL_LOGSTR(a, b, ...) \
do { \
if ((a) == NULL) { \
LOG(log_error, logtype_default, b , __VA_ARGS__); \
ret = -1; \
goto cleanup; \
} \
} while (0)
#define EC_NULL_LOG_ERR(a, b) \
do { \
if ((a) == NULL) { \
LOG(log_error, logtype_default, "%s failed: %s", #a, strerror(errno)); \
ret = b; \
goto cleanup; \
} \
} while (0)
#define EC_NULL(a) \
do { \
if ((a) == NULL) { \
ret = -1; \
goto cleanup; \
} \
} while (0)
#endif /* ERRCHECK_H */
netatalk-2.2.2/include/atalk/uuid.h0000644000175200017500000000344611655731245014121 00000000000000/*
Copyright (c) 2008,2009 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef AFP_UUID_H
#define AFP_UUID_H
#define UUID_BINSIZE 16
#define UUID_STRINGSIZE 36
typedef unsigned char *uuidp_t;
typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
typedef enum {UUID_USER = 1,
UUID_GROUP = 2,
UUID_ENOENT = 4} /* used as bit flag */
uuidtype_t;
#define UUIDTYPESTR_MASK 3
extern char *uuidtype[];
/* afp_options.c needs these. defined in libatalk/ldap.c */
extern char *ldap_host;
extern int ldap_auth_method;
extern char *ldap_auth_dn;
extern char *ldap_auth_pw;
extern char *ldap_userbase;
extern char *ldap_groupbase;
extern char *ldap_uuid_attr;
extern char *ldap_name_attr;
extern char *ldap_group_attr;
extern char *ldap_uid_attr;
/********************************************************
* Interface
********************************************************/
extern int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid);
extern int getnamefromuuid( const uuidp_t uuidp, char **name, uuidtype_t *type);
extern void localuuid_from_id(unsigned char *buf, uuidtype_t type, unsigned int id);
extern const char *uuid_bin2string(unsigned char *uuid);
extern void uuid_string2bin( const char *uuidstring, uuidp_t uuid);
extern void uuidcache_dump(void);
#endif /* AFP_UUID_H */
netatalk-2.2.2/include/atalk/cnid.h0000644000175200017500000001275011655731126014064 00000000000000/*
* Copyright (c) 2003 the Netatalk Team
* Copyright (c) 2003 Rafal Lewczuk
* Copyright (c) 2010 Frank Lahm
*
* This program is free software; you can redistribute and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation version 2 of the License or later
* version if explicitly stated by any of above copyright holders.
*
*/
/*
* This file contains all generic CNID related stuff
* declarations. Included:
* - CNID factory, which retrieves (eventually instantiates)
* CNID objects on demand
* - selection of CNID backends (default, detected by volume)
* - full set of CNID operations needed by server core.
*/
#ifndef _ATALK_CNID__H
#define _ATALK_CNID__H 1
#include
#include
/* CNID object flags */
#define CNID_FLAG_PERSISTENT 0x01 /* This backend implements DID persistence */
#define CNID_FLAG_MANGLING 0x02 /* This backend has name mangling feature. */
#define CNID_FLAG_SETUID 0x04 /* Set db owner to parent folder owner. */
#define CNID_FLAG_BLOCK 0x08 /* block signals in update. */
#define CNID_FLAG_NODEV 0x10 /* don't use device number only inode */
#define CNID_FLAG_LAZY_INIT 0x20 /* */
#define CNID_FLAG_MEMORY 0x40 /* this is a memory only db */
#define CNID_FLAG_INODE 0x80 /* in cnid_add the inode is authoritative */
#define CNID_INVALID 0
/* first valid ID */
#define CNID_START 17
#define CNID_ERR_PARAM 0x80000001
#define CNID_ERR_PATH 0x80000002
#define CNID_ERR_DB 0x80000003
#define CNID_ERR_CLOSE 0x80000004 /* the db was not open */
#define CNID_ERR_MAX 0x80000005
/*
* This is instance of CNID database object.
*/
struct _cnid_db {
u_int32_t flags; /* Flags describing some CNID backend aspects. */
char *volpath; /* Volume path this particular CNID db refers to. */
void *_private; /* back-end speficic data */
cnid_t (*cnid_add) (struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
char *name, const size_t, cnid_t hint);
int (*cnid_delete) (struct _cnid_db *cdb, cnid_t id);
cnid_t (*cnid_get) (struct _cnid_db *cdb, const cnid_t did, char *name, const size_t);
cnid_t (*cnid_lookup) (struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
char *name, const size_t);
cnid_t (*cnid_nextid) (struct _cnid_db *cdb);
char * (*cnid_resolve) (struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
int (*cnid_update) (struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
const cnid_t did, char *name, const size_t len);
void (*cnid_close) (struct _cnid_db *cdb);
int (*cnid_getstamp) (struct _cnid_db *cdb, void *buffer, const size_t len);
cnid_t (*cnid_rebuild_add) (struct _cnid_db *, const struct stat *, const cnid_t,
char *, const size_t, cnid_t);
int (*cnid_find) (struct _cnid_db *cdb, char *name, size_t namelen,
void *buffer, size_t buflen);
};
typedef struct _cnid_db cnid_db;
/*
* Consolidation of args passedn from main cnid_open to modules cnid_XXX_open, so
* that it's easier to add aditional args as required.
*/
struct cnid_open_args {
const char *dir;
mode_t mask;
uint32_t flags;
const char *cnidserver; /* for dbd */
const char *cnidport; /* for dbd */
};
/*
* CNID module - represents particular CNID implementation
*/
struct _cnid_module {
char *name;
struct list_head db_list; /* CNID modules are also stored on a bidirectional list. */
struct _cnid_db *(*cnid_open)(struct cnid_open_args *args);
u_int32_t flags; /* Flags describing some CNID backend aspects. */
};
typedef struct _cnid_module cnid_module;
/* Inititalize the CNID backends */
void cnid_init();
/* Registers new CNID backend module */
void cnid_register(struct _cnid_module *module);
/* This function opens a CNID database for selected volume. */
struct _cnid_db *cnid_open(const char *volpath,
mode_t mask,
char *type,
int flags,
const char *cnidsrv,
const char *cnidport);
cnid_t cnid_add (struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
const char *name, const size_t len, cnid_t hint);
int cnid_delete (struct _cnid_db *cdb, cnid_t id);
cnid_t cnid_get (struct _cnid_db *cdb, const cnid_t did, char *name,const size_t len);
int cnid_getstamp (struct _cnid_db *cdb, void *buffer, const size_t len);
cnid_t cnid_lookup (struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
char *name, const size_t len);
char *cnid_resolve (struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
int cnid_update (struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
const cnid_t did, char *name, const size_t len);
cnid_t cnid_rebuild_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
char *name, const size_t len, cnid_t hint);
int cnid_find (struct _cnid_db *cdb, const char *name, size_t namelen,
void *buffer, size_t buflen);
void cnid_close (struct _cnid_db *db);
#endif
netatalk-2.2.2/include/atalk/volume.h0000644000175200017500000002056311664654413014462 00000000000000/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifndef ATALK_VOLUME_H
#define ATALK_VOLUME_H 1
#include
#include
#include
// #include
#include
#include
#include
#include
#define AFPVOL_U8MNAMELEN 255 /* AFP3 sepc */
#define AFPVOL_MACNAMELEN 27 /* AFP2 spec */
typedef uint64_t VolSpace;
struct vol {
struct vol *v_next;
u_int16_t v_vid;
int v_flags;
char *v_path;
struct dir *v_root;
time_t v_mtime;
charset_t v_volcharset;
charset_t v_maccharset;
u_int16_t v_mtou_flags; /* flags for convert_charset in mtoupath */
u_int16_t v_utom_flags;
long v_kTextEncoding; /* mac charset encoding in network order
* FIXME: should be a u_int32_t ? */
size_t max_filename;
char *v_veto;
int v_adouble; /* adouble format: v1, v2, sfm ... */
int v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
char *(*ad_path)(const char *, int);
struct _cnid_db *v_cdb;
char v_stamp[ADEDLEN_PRIVSYN];
VolSpace v_limitsize; /* Size limit, if any, in MiB */
mode_t v_umask;
mode_t v_perm; /* default permission value OR with requested perm*/
mode_t v_dperm; /* default directories permission value OR with requested perm*/
mode_t v_fperm; /* default files permission value OR with requested perm*/
ucs2_t *v_u8mname; /* converted to utf8-mac in ucs2 */
ucs2_t *v_macname; /* mangled to legacy longname in ucs2 */
ucs2_t *v_name; /* either v_u8mname or v_macname */
/* get/set volparams */
time_t v_ctime; /* volume creation date, not unix ctime */
dev_t v_dev; /* Unix volume device, Set but not used */
/* adouble VFS indirection */
struct vfs_ops *vfs; /* pointer to vfs_master_funcs for chaining */
const struct vfs_ops *vfs_modules[4];
int v_vfs_ea; /* The AFPVOL_EA_xx flag */
/* misc */
char *v_gvs;
void *v_nfsclient;
int v_nfs;
VolSpace v_tm_used; /* used bytes on a TM volume */
time_t v_tm_cachetime; /* time at which v_tm_used was calculated last */
VolSpace v_appended; /* amount of data appended to files */
/* only when opening/closing volumes or in error */
int v_casefold;
char *v_localname; /* as defined in AppleVolumes.default */
char *v_volcodepage;
char *v_maccodepage;
char *v_password;
char *v_cnidscheme;
char *v_dbpath;
char *v_cnidserver;
char *v_cnidport;
int v_hide; /* new volume wait until old volume is closed */
int v_new; /* volume deleted but there's a new one with the same name */
int v_deleted; /* volume open but deleted in new config file */
char *v_root_preexec;
char *v_preexec;
char *v_root_postexec;
char *v_postexec;
int v_root_preexec_close;
int v_preexec_close;
char *v_uuid; /* For TimeMachine zeroconf record */
#ifdef FORCE_UIDGID
char *v_forceuid;
char *v_forcegid;
#endif
#ifdef __svr4__
int v_qfd;
#endif /*__svr4__*/
};
#define AFPVOL_OPEN (1<<0)
/* flags for AFS and quota 0xxx0 */
#define AFPVOL_GVSMASK (7<<2)
#define AFPVOL_NONE (0<<2)
#define AFPVOL_AFSGVS (1<<2)
#define AFPVOL_USTATFS (2<<2)
#define AFPVOL_UQUOTA (4<<2)
/*
Flags that alter volume behaviour.
Keep in sync with libatalk/util/volinfo.c
*/
#define AFPVOL_A2VOL (1 << 5) /* prodos volume */
#define AFPVOL_CRLF (1 << 6) /* cr/lf translation */
#define AFPVOL_NOADOUBLE (1 << 7) /* don't create .AppleDouble by default */
#define AFPVOL_RO (1 << 8) /* read-only volume */
#define AFPVOL_MSWINDOWS (1 << 9) /* deal with ms-windows yuckiness.
this is going away. */
#define AFPVOL_NOHEX (1 << 10) /* don't do :hex translation */
#define AFPVOL_USEDOTS (1 << 11) /* use real dots */
#define AFPVOL_LIMITSIZE (1 << 12) /* limit size for older macs */
#define AFPVOL_MAPASCII (1 << 13) /* map the ascii range as well */
#define AFPVOL_DROPBOX (1 << 14) /* dropkludge dropbox support */
#define AFPVOL_NOFILEID (1 << 15) /* don't advertise createid resolveid and deleteid calls */
#define AFPVOL_NOSTAT (1 << 16) /* advertise the volume even if we can't stat() it
* maybe because it will be mounted later in preexec */
#define AFPVOL_UNIX_PRIV (1 << 17) /* support unix privileges */
#define AFPVOL_NODEV (1 << 18) /* always use 0 for device number in cnid calls
* help if device number is notconsistent across reboot
* NOTE symlink to a different device will return an ACCESS error
*/
#define AFPVOL_CASEINSEN (1 << 19) /* volume is case insensitive */
#define AFPVOL_EILSEQ (1 << 20) /* encode illegal sequence 'asis' UCS2, ex "\217-", which is not
a valid SHIFT-JIS char, is encoded as U\217 -*/
#define AFPVOL_CACHE (1 << 21) /* Use adouble v2 CNID caching. Default: yes */
#define AFPVOL_INV_DOTS (1 << 22) /* dots files are invisible */
#define AFPVOL_TM (1 << 23) /* Supports TimeMachine */
#define AFPVOL_ACLS (1 << 24) /* Volume supports ACLS */
#define AFPVOL_SEARCHDB (1 << 25) /* Use fast CNID db search instead of filesystem */
#define AFPVOL_NONETIDS (1 << 26) /* signal the client it shall do privelege mapping */
/* Extended Attributes vfs indirection */
#define AFPVOL_EA_NONE 0 /* No EAs */
#define AFPVOL_EA_AUTO 1 /* try sys, fallback to ad (default) */
#define AFPVOL_EA_SYS 2 /* Store them in native EAs */
#define AFPVOL_EA_AD 3 /* Store them in adouble files */
/* FPGetSrvrParms options */
#define AFPSRVR_CONFIGINFO (1 << 0)
#define AFPSRVR_PASSWD (1 << 7)
/* handle casefolding */
#define AFPVOL_MTOUUPPER (1 << 0)
#define AFPVOL_MTOULOWER (1 << 1)
#define AFPVOL_UTOMUPPER (1 << 2)
#define AFPVOL_UTOMLOWER (1 << 3)
#define AFPVOL_UMLOWER (AFPVOL_MTOULOWER | AFPVOL_UTOMLOWER)
#define AFPVOL_UMUPPER (AFPVOL_MTOUUPPER | AFPVOL_UTOMUPPER)
#define AFPVOL_UUPPERMLOWER (AFPVOL_MTOUUPPER | AFPVOL_UTOMLOWER)
#define AFPVOL_ULOWERMUPPER (AFPVOL_MTOULOWER | AFPVOL_UTOMUPPER)
#define MSWINDOWS_BADCHARS ":\t\\/<>*?|\""
int wincheck(const struct vol *vol, const char *path);
#define AFPVOLSIG_FLAT 0x0001 /* flat fs */
#define AFPVOLSIG_FIX 0x0002 /* fixed ids */
#define AFPVOLSIG_VAR 0x0003 /* variable ids */
#define AFPVOLSIG_DEFAULT AFPVOLSIG_FIX
/* volume attributes */
#define VOLPBIT_ATTR_RO (1 << 0)
#define VOLPBIT_ATTR_PASSWD (1 << 1)
#define VOLPBIT_ATTR_FILEID (1 << 2)
#define VOLPBIT_ATTR_CATSEARCH (1 << 3)
#define VOLPBIT_ATTR_BLANKACCESS (1 << 4)
#define VOLPBIT_ATTR_UNIXPRIV (1 << 5)
#define VOLPBIT_ATTR_UTF8 (1 << 6)
#define VOLPBIT_ATTR_NONETIDS (1 << 7)
#define VOLPBIT_ATTR_EXT_ATTRS (1 << 10)
#define VOLPBIT_ATTR_ACLS (1 << 11)
#define VOLPBIT_ATTR_TM (1 << 13)
#define VOLPBIT_ATTR 0
#define VOLPBIT_SIG 1
#define VOLPBIT_CDATE 2
#define VOLPBIT_MDATE 3
#define VOLPBIT_BDATE 4
#define VOLPBIT_VID 5
#define VOLPBIT_BFREE 6
#define VOLPBIT_BTOTAL 7
#define VOLPBIT_NAME 8
/* handle > 4GB volumes */
#define VOLPBIT_XBFREE 9
#define VOLPBIT_XBTOTAL 10
#define VOLPBIT_BSIZE 11 /* block size */
#define utf8_encoding() (afp_version >= 30)
#define vol_noadouble(vol) (((vol)->v_flags & AFPVOL_NOADOUBLE) ? 1 : 0)
#define vol_nodev(vol) (((vol)->v_flags & AFPVOL_NODEV) ? 1 : 0)
#define vol_unix_priv(vol) (afp_version >= 30 && ((vol)->v_flags & AFPVOL_UNIX_PRIV))
#define vol_inv_dots(vol) (((vol)->v_flags & AFPVOL_INV_DOTS) ? 1 : 0)
#endif
netatalk-2.2.2/include/atalk/dsi.h0000644000175200017500000001625011664176240013725 00000000000000/*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved.
*/
#ifndef _ATALK_DSI_H
#define _ATALK_DSI_H
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* What a DSI packet looks like:
0 32
|-------------------------------|
|flags |command| requestID |
|-------------------------------|
|error code/enclosed data offset|
|-------------------------------|
|total data length |
|-------------------------------|
|reserved field |
|-------------------------------|
CONVENTION: anything with a dsi_ prefix is kept in network byte order.
*/
/* these need to be kept in sync w/ AFPTRANS_* in .
* convention: AFPTRANS_* = (1 << DSI_*) */
typedef enum {
DSI_MIN = 1,
DSI_TCPIP = 1,
DSI_MAX = 1
} dsi_proto;
#define DSI_BLOCKSIZ 16
struct dsi_block {
u_int8_t dsi_flags; /* packet type: request or reply */
u_int8_t dsi_command; /* command */
u_int16_t dsi_requestID; /* request ID */
u_int32_t dsi_code; /* error code or data offset */
u_int32_t dsi_len; /* total data length */
u_int32_t dsi_reserved; /* reserved field */
};
#define DSI_CMDSIZ 8192
#define DSI_DATASIZ 8192
/* child and parent processes might interpret a couple of these
* differently. */
typedef struct DSI {
AFPObj *AFPobj;
dsi_proto protocol;
struct dsi_block header;
struct sockaddr_storage server, client;
struct itimerval timer;
int tickle; /* tickle count */
int in_write; /* in the middle of writing multiple packets,
signal handlers can't write to the socket */
int msg_request; /* pending message to the client */
int down_request; /* pending SIGUSR1 down in 5 mn */
u_int32_t attn_quantum, datasize, server_quantum;
u_int16_t serverID, clientID;
char *status;
u_int8_t commands[DSI_CMDSIZ], data[DSI_DATASIZ];
size_t statuslen;
size_t datalen, cmdlen;
off_t read_count, write_count;
uint32_t flags; /* DSI flags like DSI_SLEEPING, DSI_DISCONNECTED */
const char *program;
int socket, serversock;
/* protocol specific open/close, send/receive
* send/receive fill in the header and use dsi->commands.
* write/read just write/read data */
pid_t (*proto_open)(struct DSI *);
void (*proto_close)(struct DSI *);
/* url registered with slpd */
#ifdef USE_SRVLOC
char srvloc_url[512];
#endif
#ifdef USE_ZEROCONF
char *bonjourname; /* server name as UTF8 maxlen MAXINSTANCENAMELEN */
int zeroconf_registered;
#endif
/* DSI readahead buffer used for buffered reads in dsi_peek */
size_t dsireadbuf; /* size of the DSI readahead buffer used in dsi_peek() */
char *buffer;
char *start;
char *eof;
char *end;
} DSI;
/* DSI flags */
#define DSIFL_REQUEST 0x00
#define DSIFL_REPLY 0x01
#define DSIFL_MAX 0x01
/* DSI session options */
#define DSIOPT_SERVQUANT 0x00 /* server request quantum */
#define DSIOPT_ATTNQUANT 0x01 /* attention quantum */
#define DSIOPT_REPLCSIZE 0x02 /* AFP replaycache size supported by the server (that's us) */
/* DSI Commands */
#define DSIFUNC_CLOSE 1 /* DSICloseSession */
#define DSIFUNC_CMD 2 /* DSICommand */
#define DSIFUNC_STAT 3 /* DSIGetStatus */
#define DSIFUNC_OPEN 4 /* DSIOpenSession */
#define DSIFUNC_TICKLE 5 /* DSITickle */
#define DSIFUNC_WRITE 6 /* DSIWrite */
#define DSIFUNC_ATTN 8 /* DSIAttention */
#define DSIFUNC_MAX 8 /* largest command */
/* DSI Error codes: most of these aren't used. */
#define DSIERR_OK 0x0000
#define DSIERR_BADVERS 0xfbd6
#define DSIERR_BUFSMALL 0xfbd5
#define DSIERR_NOSESS 0xfbd4
#define DSIERR_NOSERV 0xfbd3
#define DSIERR_PARM 0xfbd2
#define DSIERR_SERVBUSY 0xfbd1
#define DSIERR_SESSCLOS 0xfbd0
#define DSIERR_SIZERR 0xfbcf
#define DSIERR_TOOMANY 0xfbce
#define DSIERR_NOACK 0xfbcd
/* server and client quanta */
#define DSI_DEFQUANT 2 /* default attention quantum size */
#define DSI_SERVQUANT_MAX 0xffffffff /* server quantum */
#define DSI_SERVQUANT_MIN 32000 /* minimum server quantum */
#define DSI_SERVQUANT_DEF 0x0004A2E0L /* default server quantum */
/* default port number */
#define DSI_AFPOVERTCP_PORT 548
/* DSI session State flags */
#define DSI_DATA (1 << 0) /* we have received a DSI command */
#define DSI_RUNNING (1 << 1) /* we have received a AFP command */
#define DSI_SLEEPING (1 << 2) /* we're sleeping after FPZzz */
#define DSI_EXTSLEEP (1 << 3) /* we're sleeping after FPZzz */
#define DSI_DISCONNECTED (1 << 4) /* we're in diconnected state after a socket error */
#define DSI_DIE (1 << 5) /* SIGUSR1, going down in 5 minutes */
#define DSI_NOREPLY (1 << 6) /* in dsi_write we generate our own replies */
#define DSI_RECONSOCKET (1 << 7) /* we have a new socket from primary reconnect */
#define DSI_RECONINPROG (1 << 8) /* used in the new session in reconnect */
#define DSI_AFP_LOGGED_OUT (1 << 9) /* client called afp_logout, quit on next EOF from socket */
#if 0
#define DSI_GOT_ECONNRESET (1 << 10) /* got ECONNRESET from client => exit */
#endif
/* basic initialization: dsi_init.c */
extern DSI *dsi_init (const dsi_proto /*protocol*/,
const char * /*program*/,
const char * /*host*/, const char * /*address*/,
const char * /*port*/, const int /*proxy*/,
const u_int32_t /* server quantum */);
extern void dsi_setstatus (DSI *, char *, const size_t);
/* in dsi_getsess.c */
extern afp_child_t *dsi_getsession (DSI *, server_child *, const int);
extern void dsi_kill (int);
/* DSI Commands: individual files */
extern void dsi_opensession (DSI *);
extern int dsi_attention (DSI *, AFPUserBytes);
extern int dsi_cmdreply (DSI *, const int);
extern int dsi_tickle (DSI *);
extern void dsi_getstatus (DSI *);
extern void dsi_close (DSI *);
#define DSI_NOWAIT 1
/* low-level stream commands -- in dsi_stream.c */
extern ssize_t dsi_stream_write (DSI *, void *, const size_t, const int mode);
extern size_t dsi_stream_read (DSI *, void *, const size_t);
extern int dsi_stream_send (DSI *, void *, size_t);
extern int dsi_stream_receive (DSI *);
extern int dsi_disconnect(DSI *dsi);
#ifdef WITH_SENDFILE
extern ssize_t dsi_stream_read_file(DSI *, int, off_t off, const size_t len);
#endif
/* client writes -- dsi_write.c */
extern size_t dsi_writeinit (DSI *, void *, const size_t);
extern size_t dsi_write (DSI *, void *, const size_t);
extern void dsi_writeflush (DSI *);
#define dsi_wrtreply(a,b) dsi_cmdreply(a,b)
/* client reads -- dsi_read.c */
extern ssize_t dsi_readinit (DSI *, void *, const size_t, const size_t,
const int);
extern ssize_t dsi_read (DSI *, void *, const size_t);
extern void dsi_readdone (DSI *);
/* some useful macros */
#define dsi_serverID(x) ((x)->serverID++)
#define dsi_send(x) do { \
(x)->header.dsi_len = htonl((x)->cmdlen); \
dsi_stream_send((x), (x)->commands, (x)->cmdlen); \
} while (0)
#endif /* atalk/dsi.h */
netatalk-2.2.2/include/atalk/acl.h0000644000175200017500000000302211655731244013677 00000000000000/*
Copyright (c) 2009 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef ATALK_ACL_H
#define ATALK_ACL_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_ACLS
#ifdef HAVE_SOLARIS_ACLS
#include
#define chmod_acl nfsv4_chmod
extern int get_nfsv4_acl(const char *name, ace_t **retAces);
extern int strip_trivial_aces(ace_t **saces, int sacecount);
extern int strip_nontrivial_aces(ace_t **saces, int sacecount);
extern ace_t *concat_aces(ace_t *aces1, int ace1count, ace_t *aces2, int ace2count);
extern int nfsv4_chmod(char *name, mode_t mode);
#endif /* HAVE_SOLARIS_ACLS */
#ifdef HAVE_POSIX_ACLS
#include
#include
#include
#define chmod_acl posix_chmod
#define fchmod_acl posix_fchmod
extern int posix_chmod(const char *name, mode_t mode);
extern int posix_fchmod(int fd, mode_t mode);
#endif /* HAVE_POSIX_ACLS */
extern int remove_acl_vfs(const char *name);
#else /* HAVE_ACLS=no */
#define chmod_acl chmod
#endif /* HAVE_ACLS */
#endif /* ATALK_ACL_H */
netatalk-2.2.2/include/atalk/cnid_private.h0000644000175200017500000000416311655731126015615 00000000000000/*
* Common defines for cnid
*/
#ifndef _ATALK_CNID_PRIVATE_H
#define _ATALK_CNID_PRIVATE_H 1
#define CNID_DB_MAGIC 0x434E4944U /* CNID */
#define CNID_DATA_MAGIC 0x434E4945U /* CNIE */
#define CNID_OFS 0
#define CNID_LEN 4
#define CNID_DEV_OFS CNID_LEN
#define CNID_DEV_LEN 8
#define CNID_INO_OFS (CNID_DEV_OFS + CNID_DEV_LEN)
#define CNID_INO_LEN 8
#define CNID_DEVINO_OFS CNID_LEN
#define CNID_DEVINO_LEN (CNID_DEV_LEN + CNID_INO_LEN)
#define CNID_TYPE_OFS (CNID_DEVINO_OFS + CNID_DEVINO_LEN)
#define CNID_TYPE_LEN 4
#define CNID_DID_OFS (CNID_TYPE_OFS + CNID_TYPE_LEN)
#define CNID_DID_LEN CNID_LEN
#define CNID_NAME_OFS (CNID_DID_OFS + CNID_DID_LEN)
#define CNID_HEADER_LEN (CNID_NAME_OFS)
#define CNIDFLAG_ROOTINFO_RO (1 << 0)
#define CNIDFLAG_DB_RO (1 << 1)
/* special key/data pair we use to store current cnid and database stamp in cnid2.db */
#define ROOTINFO_KEY "\0\0\0\0"
#define ROOTINFO_KEYLEN 4
/*
Rootinfo data, fields as they are used by normal entries for CNIDs (for reference):
4 bytes: CNID
8 bytes: dev
8 bytes: inode
4 bytes: is a file/directory (type)
4 bytes: DID
x bytes: name
Contents in Rootinfo entry:
4 bytes: 0
8 bytes: db stamp: struct stat.st_ctime of database file
8 bytes: unused
4 bytes: last used CNID
4 bytes: version as htonl(uint32_t)
9 bytes: name "RootInfo"
*/
#define ROOTINFO_DATA "\0\0\0\0" \
"\0\0\0\0\0\0\0\0" \
"\0\0\0\0\0\0\0\0" \
"\0\0\0\0" \
"\0\0\0\0" \
"RootInfo"
#define ROOTINFO_DATALEN (3*4 + 2*8 + 9)
/*
* CNID version history:
* 0: up to Netatalk 2.1.x
* 1: starting with 2.2, additional name index, used in cnid_find
*/
#define CNID_VERSION_0 0
#define CNID_VERSION_1 1
#define CNID_VERSION_UNINTIALIZED_DB UINT32_MAX
/* Current CNID version */
#define CNID_VERSION CNID_VERSION_1
#endif
netatalk-2.2.2/include/atalk/zip.h0000644000175200017500000000300711655731245013746 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_ZIP_H
#define _ATALK_ZIP_H 1
#ifndef NO_DDP
#include
struct ziphdr {
u_int8_t zh_op;
u_int8_t zh_cnt;
#define zh_count zh_cnt
#define zh_zero zh_cnt
#define zh_flags zh_cnt
};
struct zipreplent {
u_int16_t zre_net;
u_int8_t zre_zonelen;
};
#define ZIPOP_QUERY 1
#define ZIPOP_REPLY 2
#define ZIPOP_TAKEDOWN 3 /* XXX */
#define ZIPOP_BRINGUP 4 /* XXX */
#define ZIPOP_GNI 5
#define ZIPOP_GNIREPLY 6
#define ZIPOP_NOTIFY 7
#define ZIPOP_EREPLY 8
#define ZIPOP_GETMYZONE 7
#define ZIPOP_GETZONELIST 8
#define ZIPOP_GETLOCALZONES 9
#define ZIPGNI_INVALID 0x80
#define ZIPGNI_ONEZONE 0x20
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/ftw.h0000644000175200017500000000675511655731126013757 00000000000000/* Copyright (C) 1992,1996-1999,2003,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* X/Open Portability Guide 4.2: ftw.h
*/
#ifndef _ATALK_FTW_H
#define _ATALK_FTW_H 1
#include
#include
/* Values for the FLAG argument to the user function passed to `ftw'
and 'nftw'. */
enum
{
FTW_F, /* Regular file. */
#define FTW_F FTW_F
FTW_D, /* Directory. */
#define FTW_D FTW_D
FTW_DNR, /* Unreadable directory. */
#define FTW_DNR FTW_DNR
FTW_NS, /* Unstatable file. */
#define FTW_NS FTW_NS
FTW_SL, /* Symbolic link. */
# define FTW_SL FTW_SL
/* These flags are only passed from the `nftw' function. */
FTW_DP, /* Directory, all subdirs have been visited. */
# define FTW_DP FTW_DP
FTW_SLN /* Symbolic link naming non-existing file. */
# define FTW_SLN FTW_SLN
};
/* Flags for fourth argument of `nftw'. */
enum
{
FTW_PHYS = 1, /* Perform physical walk, ignore symlinks. */
# define FTW_PHYS FTW_PHYS
FTW_MOUNT = 2, /* Report only files on same file system as the
argument. */
# define FTW_MOUNT FTW_MOUNT
FTW_CHDIR = 4, /* Change to current directory while processing it. */
# define FTW_CHDIR FTW_CHDIR
FTW_DEPTH = 8, /* Report files in directory before directory itself.*/
# define FTW_DEPTH FTW_DEPTH
FTW_ACTIONRETVAL = 16 /* Assume callback to return FTW_* values instead of
zero to continue and non-zero to terminate. */
# define FTW_ACTIONRETVAL FTW_ACTIONRETVAL
};
/* Return values from callback functions. */
enum
{
FTW_CONTINUE = 0, /* Continue with next sibling or for FTW_D with the
first child. */
# define FTW_CONTINUE FTW_CONTINUE
FTW_STOP = 1, /* Return from `ftw' or `nftw' with FTW_STOP as return
value. */
# define FTW_STOP FTW_STOP
FTW_SKIP_SUBTREE = 2, /* Only meaningful for FTW_D: Don't walk through the
subtree, instead just continue with its next
sibling. */
# define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE
FTW_SKIP_SIBLINGS = 3,/* Continue with FTW_DP callback for current directory
(if FTW_DEPTH) and then its siblings. */
# define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS
};
/* Structure used for fourth argument to callback function for `nftw'. */
struct FTW
{
int base;
int level;
};
/* Convenient types for callback functions. */
typedef int (*nftw_func_t) (const char *filename,
const struct stat *status,
int flag,
struct FTW *info);
#define NFTW_FUNC_T nftw_func_t
typedef void (*dir_notification_func_t) (void);
extern int nftw(const char *dir,
nftw_func_t func,
dir_notification_func_t up,
int descriptors,
int flag);
#endif /* ATALK_FTW_H */
netatalk-2.2.2/include/atalk/netddp.h0000644000175200017500000000223111655731244014417 00000000000000/*
* $Id: netddp.h,v 1.4 2009-10-13 22:55:37 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
*
* this provides a generic interface to the ddp layer. with this, we
* should be able to interact with any appletalk stack that allows
* direct access to the ddp layer. right now, only os x server's ddp
* layer and the generic socket based interfaces are understood.
*/
#ifndef _ATALK_NETDDP_H
#define _ATALK_NETDDP_H 1
#ifndef NO_DDP
#include
#include
#include
#include
extern int netddp_open (struct sockaddr_at *, struct sockaddr_at *);
#if !defined(NO_DDP) && defined(MACOSX_SERVER)
extern int netddp_sendto (int, void *, size_t, unsigned int,
const struct sockaddr *, unsigned int);
extern int netddp_recvfrom (int, void *, int, unsigned int,
struct sockaddr *, unsigned int *);
#define netddp_close(a) ddp_close(a)
#else
#include
#include
#define netddp_close(a) close(a)
#define netddp_sendto sendto
#define netddp_recvfrom recvfrom
#endif
#endif /* NO_DDP */
#endif /* netddp.h */
netatalk-2.2.2/include/atalk/volinfo.h0000644000175200017500000000253111655731126014617 00000000000000#ifndef _ATALK_VOLINFO_H
#define _ATALK_VOLINFO_H 1
#include
#include
/* volinfo for shell utilities */
#define VOLINFODIR ".AppleDesktop"
#define VOLINFOFILE ".volinfo"
typedef struct {
const u_int32_t option;
const char *name;
} vol_opt_name_t;
struct volinfo {
int retaincount;
int malloced;
char *v_name;
char *v_path;
int v_flags;
int v_casefold;
char *v_cnidscheme;
char *v_dbpath;
char *v_volcodepage;
charset_t v_volcharset;
char *v_maccodepage;
charset_t v_maccharset;
int v_adouble; /* default adouble format */
int v_ad_options;
int v_vfs_ea;
char *(*ad_path)(const char *, int);
char *v_dbd_host;
char *v_dbd_port;
};
struct volinfo *allocvolinfo(char *path);
extern int loadvolinfo(char *path, struct volinfo *vol);
extern void retainvolinfo(struct volinfo *vol);
extern int closevolinfo(struct volinfo *vol);
extern int savevolinfo(const struct vol *vol, const char *Cnid_srv, const char *Cnid_port);
extern int vol_load_charsets(struct volinfo *vol);
#endif
netatalk-2.2.2/include/atalk/standards.h0000644000175200017500000000154411655731244015132 00000000000000/*
Copyright (c) 2011, Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef ATALK_STANDARDS_H
#define ATALK_STANDARDS_H 1
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
# ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
# endif
# ifndef __EXTENSIONS__
# define __EXTENSIONS__
# endif
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
#endif
#endif /* ATALK_STANDARDS_H */
netatalk-2.2.2/include/atalk/rtmp.h0000644000175200017500000000232111655731244014123 00000000000000/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_RTMP_H
#define _ATALK_RTMP_H 1
#ifndef NO_DDP
#include
#define RTMPROP_REQUEST 1
struct rtmpent {
u_int16_t re_net;
u_int8_t re_hops;
};
#define RTMPHOPS_MAX 15
#define RTMPHOPS_POISON 31
struct rtmprdhdr {
u_int16_t rrdh_snet;
u_int8_t rrdh_idlen;
u_int8_t rrdh_id;
};
#endif /* NO_DDP */
#endif
netatalk-2.2.2/include/atalk/cnid_dbd_private.h0000644000175200017500000000351511655731126016426 00000000000000/*
* Interface to the cnid_dbd daemon that stores/retrieves CNIDs from a database.
*/
#ifndef _ATALK_CNID_DBD_PRIVATE_H
#define _ATALK_CNID_DBD_PRIVATE_H 1
#include
#include
#include
#include
#define CNID_DBD_OP_OPEN 0x01
#define CNID_DBD_OP_CLOSE 0x02
#define CNID_DBD_OP_ADD 0x03
#define CNID_DBD_OP_GET 0x04
#define CNID_DBD_OP_RESOLVE 0x05
#define CNID_DBD_OP_LOOKUP 0x06
#define CNID_DBD_OP_UPDATE 0x07
#define CNID_DBD_OP_DELETE 0x08
#define CNID_DBD_OP_MANGLE_ADD 0x09
#define CNID_DBD_OP_MANGLE_GET 0x0a
#define CNID_DBD_OP_GETSTAMP 0x0b
#define CNID_DBD_OP_REBUILD_ADD 0x0c
#define CNID_DBD_OP_SEARCH 0x0d
#define CNID_DBD_RES_OK 0x00
#define CNID_DBD_RES_NOTFOUND 0x01
#define CNID_DBD_RES_ERR_DB 0x02
#define CNID_DBD_RES_ERR_MAX 0x03
#define CNID_DBD_RES_ERR_DUPLCNID 0x04
#define CNID_DBD_RES_SRCH_CNT 0x05
#define CNID_DBD_RES_SRCH_DONE 0x06
#define DBD_MAX_SRCH_RSLTS 100
struct cnid_dbd_rqst {
int op;
cnid_t cnid;
dev_t dev;
ino_t ino;
uint32_t type;
cnid_t did;
char *name;
size_t namelen;
};
struct cnid_dbd_rply {
int result;
cnid_t cnid;
cnid_t did;
char *name;
size_t namelen;
};
typedef struct CNID_private {
u_int32_t magic;
char db_dir[MAXPATHLEN + 1]; /* Database directory without /.AppleDB appended */
char *cnidserver;
char *cnidport;
int fd; /* File descriptor to cnid_dbd */
char stamp[ADEDLEN_PRIVSYN]; /* db timestamp */
char *client_stamp;
size_t stamp_size;
int notfirst; /* already open before */
int changed; /* stamp differ */
} CNID_private;
#endif /* include/atalk/cnid_dbd.h */
netatalk-2.2.2/include/atalk/ea.h0000644000175200017500000001364411655731126013537 00000000000000/*
$Id: ea.h,v 1.11 2010-03-12 15:16:49 franklahm Exp $
Copyright (c) 2009 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef ATALK_EA_H
#define ATALK_EA_H
#ifdef HAVE_CONFIG_H
#include
#endif
#ifdef HAVE_SOLARIS_ACLS
#include
#endif
#include
/*
* This seems to be the current limit fo HFS+, we arbitrarily force that
* which also safes us from buffer overflows
*/
#define MAX_EA_SIZE 3802
/*
* At time of writing the 10.5.6 client adds 8 bytes to the
* length of the EA that we send him
*/
#define MAX_REPLY_EXTRA_BYTES 8
/*
* Library user must provide a static buffer of size ATTRNAMEBUFSIZ.
* It's used when listing EAs as intermediate buffer. For afpd it's
* defined in extattrs.c.
*/
#define ATTRNAMEBUFSIZ 4096
enum {
kXAttrNoFollow = 0x1,
kXAttrCreate = 0x2,
kXAttrReplace = 0x4
};
#if !defined(HAVE_SETXATTR)
#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
#endif
/****************************************************************************************
* Stuff for our implementation of storing EAs in files in .AppleDouble dirs
****************************************************************************************/
#define EA_INITED 0xea494e54 /* ea"INT", for interfacing ea_open w. ea_close */
#define EA_MAGIC 0x61644541 /* "adEA" */
#define EA_VERSION1 0x01
#define EA_VERSION EA_VERSION1
typedef enum {
/* ea_open flags */
EA_CREATE = (1<<1), /* create if not existing on ea_open */
EA_RDONLY = (1<<2), /* open read only */
EA_RDWR = (1<<3), /* open read/write */
/* ea_open internal flags */
EA_DIR = (1<<4) /* ea header file is for a dir, ea_open adds it as appropiate */
} eaflags_t;
#define EA_MAGIC_OFF 0
#define EA_MAGIC_LEN 4
#define EA_VERSION_OFF (EA_MAGIC_OFF + EA_MAGIC_LEN)
#define EA_VERSION_LEN 2
#define EA_COUNT_OFF (EA_VERSION_OFF + EA_VERSION_LEN)
#define EA_COUNT_LEN 2
#define EA_HEADER_SIZE (EA_MAGIC_LEN + EA_VERSION_LEN + EA_COUNT_LEN)
/*
* structs describing the layout of the Extended Attributes bookkeeping file.
* This isn't really an AppleDouble structure, it's just a binary blob that
* lives in our .AppleDouble directory too.
*/
struct ea_entry {
size_t ea_namelen; /* len of ea_name without terminating 0 ie. strlen(ea_name)*/
size_t ea_size; /* size of EA*/
char *ea_name; /* name of the EA */
};
/* We read the on-disk data into *ea_data and parse it into this*/
struct ea {
uint32_t ea_inited; /* needed for interfacing ea_open w. ea_close */
const struct vol *vol; /* vol handle, ea_close needs it */
int dirfd; /* for *at (cf openat) semantics, -1 means ignore */
char *filename; /* name of file, needed by ea_close too */
unsigned int ea_count; /* number of EAs in ea_entries array */
struct ea_entry (*ea_entries)[]; /* malloced and realloced as needed by ea_count*/
int ea_fd; /* open fd for ea_data */
eaflags_t ea_flags; /* flags */
size_t ea_size; /* size of header file = size of ea_data buffer */
char *ea_data; /* pointer to buffer into that we actually *
* read the disc file into */
};
/* On-disk format, just for reference ! */
#if 0
struct ea_entry_ondisk {
uint32_t ea_size;
char ea_name[]; /* zero terminated string */
};
struct ea_ondisk {
u_int32_t ea_magic;
u_int16_t ea_version;
u_int16_t ea_count;
struct ea_entry_ondisk ea_entries[ea_count];
};
#endif /* 0 */
/* VFS inderected funcs ... : */
/* Default adouble EAs */
extern int get_easize(VFS_FUNC_ARGS_EA_GETSIZE);
extern int get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT);
extern int list_eas(VFS_FUNC_ARGS_EA_LIST);
extern int set_ea(VFS_FUNC_ARGS_EA_SET);
extern int remove_ea(VFS_FUNC_ARGS_EA_REMOVE);
/* ... EA VFS funcs that deal with file/dir cp/mv/rm */
extern int ea_deletefile(VFS_FUNC_ARGS_DELETEFILE);
extern int ea_renamefile(VFS_FUNC_ARGS_RENAMEFILE);
extern int ea_copyfile(VFS_FUNC_ARGS_COPYFILE);
extern int ea_chown(VFS_FUNC_ARGS_CHOWN);
extern int ea_chmod_file(VFS_FUNC_ARGS_SETFILEMODE);
extern int ea_chmod_dir(VFS_FUNC_ARGS_SETDIRUNIXMODE);
/* native EAs */
extern int sys_get_easize(VFS_FUNC_ARGS_EA_GETSIZE);
extern int sys_get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT);
extern int sys_list_eas(VFS_FUNC_ARGS_EA_LIST);
extern int sys_set_ea(VFS_FUNC_ARGS_EA_SET);
extern int sys_remove_ea(VFS_FUNC_ARGS_EA_REMOVE);
/* native EA VFSfile/dir cp/mv/rm */
extern int sys_ea_copyfile(VFS_FUNC_ARGS_COPYFILE);
/* dbd needs access to these */
extern int ea_open(const struct vol * restrict vol,
const char * restrict uname,
eaflags_t eaflags,
struct ea * restrict ea);
extern int ea_openat(const struct vol * restrict vol,
int dirfd,
const char * restrict uname,
eaflags_t eaflags,
struct ea * restrict ea);
extern int ea_close(struct ea * restrict ea);
extern char *ea_path(const struct ea * restrict ea, const char * restrict eaname, int macname);
#endif /* ATALK_EA_H */
netatalk-2.2.2/include/atalk/adouble.h0000644000175200017500000004636611667700415014574 00000000000000/*
* $Id: adouble.h,v 1.55 2010-03-30 12:55:26 franklahm Exp $
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
/*!
* @file
* @brief Part of Netatalk's AppleDouble implementatation
*/
#ifndef _ATALK_ADOUBLE_H
#define _ATALK_ADOUBLE_H
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#include
#include
#ifdef HAVE_UNISTD_H
#undef __USE_MISC
#define __USE_MISC
#include
#endif
#include
#ifdef HAVE_FCNTL_H
#include
#endif
#include
#ifdef HAVE_SYS_TIME_H
#include
#endif
#include
/* version info */
#define AD_VERSION1 0x00010000
#define SFM_VERSION AD_VERSION1
#define AD_VERSION2 0x00020000
#define AD_VERSION2_OSX 0x00020001
/*
#define AD_VERSION1_ADS 0x00010002
*/
#define AD_VERSION1_SFM 0x00010003
#define AD_VERSION AD_VERSION2
/*
* AppleDouble entry IDs.
*/
#define ADEID_DFORK 1
#define ADEID_RFORK 2
#define ADEID_NAME 3 /* Note: starting with Netatalk 2.1 we do NOT alway set the name */
#define ADEID_COMMENT 4
#define ADEID_ICONBW 5
#define ADEID_ICONCOL 6
#define ADEID_FILEI 7 /* v1, replaced by: */
#define ADEID_FILEDATESI 8 /* this */
#define ADEID_FINDERI 9
#define ADEID_MACFILEI 10 /* we don't use this */
#define ADEID_PRODOSFILEI 11 /* we store prodos info here */
#define ADEID_MSDOSFILEI 12 /* we don't use this */
#define ADEID_SHORTNAME 13
#define ADEID_AFPFILEI 14 /* where the rest of the FILEI info goes */
#define ADEID_DID 15
#if AD_VERSION == AD_VERSION1
#define ADEID_MAX 16
#else
/* netatalk private note fileid reused DID */
#define ADEID_PRIVDEV 16
#define ADEID_PRIVINO 17
#define ADEID_PRIVSYN 18 /* in synch with database */
#define ADEID_PRIVID 19
#define ADEID_SFMRESERVE1 20
#define ADEID_SFMRESERVE2 21
#define AD_DEV 0x80444556
#define AD_INO 0x80494E4F
#define AD_SYN 0x8053594E
#define AD_ID 0x8053567E
#define ADEID_MAX 22
#endif
/* magic */
#define AD_APPLESINGLE_MAGIC 0x00051600
#define AD_APPLEDOUBLE_MAGIC 0x00051607
#define AD_MAGIC AD_APPLEDOUBLE_MAGIC
#define SFM_MAGIC 0x00504641
/* sizes of relevant entry bits */
#define ADEDLEN_MAGIC 4
#define ADEDLEN_VERSION 4
#define ADEDLEN_FILLER 16
#define ADEDLEN_NENTRIES 2
/* 26 */
#define AD_HEADER_LEN (ADEDLEN_MAGIC + ADEDLEN_VERSION + \
ADEDLEN_FILLER + ADEDLEN_NENTRIES)
#define AD_ENTRY_LEN 12 /* size of a single entry header */
/* v1 field widths */
#define ADEDLEN_NAME 255
#define ADEDLEN_COMMENT 200
#define ADEDLEN_FILEI 16
#define ADEDLEN_FINDERI 32
/* v2 field widths */
#define ADEDLEN_FILEDATESI 16
#define ADEDLEN_SHORTNAME 12 /* length up to 8.3 */
#define ADEDLEN_AFPFILEI 4
#define ADEDLEN_MACFILEI 4
#define ADEDLEN_PRODOSFILEI 8
#define ADEDLEN_MSDOSFILEI 2
#define ADEDLEN_DID 4
#define ADEDLEN_PRIVDEV 8
#define ADEDLEN_PRIVINO 8
#define ADEDLEN_PRIVSYN 8
#define ADEDLEN_PRIVID 4
#define ADEID_NUM_V1 5
#define ADEID_NUM_V2 13
// #define ADEID_NUM_SFM 5
/* sizeof SFM meta data */
#define AD_SFM_LEN 60
/* 589 */
#define AD_DATASZ1 (AD_HEADER_LEN + ADEDLEN_NAME + ADEDLEN_COMMENT + ADEDLEN_FILEI + ADEDLEN_FINDERI + \
(ADEID_NUM_V1 * AD_ENTRY_LEN))
#if AD_DATASZ1 != 589
#error bad size for AD_DATASZ1
#endif
#define AD_NEWSZ2 (ADEDLEN_DID + ADEDLEN_AFPFILEI + ADEDLEN_SHORTNAME + ADEDLEN_PRODOSFILEI \
+ ADEDLEN_PRIVDEV + ADEDLEN_PRIVINO + ADEDLEN_PRIVSYN + ADEDLEN_PRIVID)
/* 725 */
#define AD_DATASZ2 (AD_DATASZ1 + AD_NEWSZ2 + ((ADEID_NUM_V2 - ADEID_NUM_V1) * AD_ENTRY_LEN))
#if AD_DATASZ2 != 741
#error bad size for AD_DATASZ2
#endif
#define AD_DATASZ_MAX 1024
#if AD_VERSION == AD_VERSION1
#define AD_DATASZ AD_DATASZ1 /* hold enough for the entries */
#elif AD_VERSION == AD_VERSION2
#define AD_DATASZ AD_DATASZ2
#endif
/*
* some legacy defines from netatalk-990130
* (to keep from breaking certain packages)
*
*/
#define ADEDOFF_RFORK 589
#define ADEDOFF_NAME 86
#define ADEDOFF_COMMENT 341
#define ADEDOFF_FINDERI 557
#ifndef ADEDOFF_FILEI
#define ADEDOFF_FILEI 541
#endif
typedef u_int32_t cnid_t;
/*
* The header of the AppleDouble Header File looks like this:
*
* NAME SIZE
* ==== ====
* Magic 4
* Version 4
* Home File System 16 (this becomes filler in ad v2)
* Number of Entries 2
* Entry Descriptors for each entry:
* Entry ID 4
* Offset 4
* Length 4
*/
struct ad_entry {
off_t ade_off;
ssize_t ade_len;
};
typedef struct adf_lock_t {
struct flock lock;
int user;
int *refcount; /* handle read locks with multiple users */
} adf_lock_t;
struct ad_fd {
int adf_fd; /* -1: invalid, -2: symlink */
#ifndef HAVE_PREAD
off_t adf_off;
#endif
char *adf_syml;
int adf_flags;
int adf_excl;
adf_lock_t *adf_lock;
int adf_refcount, adf_lockcount, adf_lockmax;
};
/* some header protection */
#define AD_INITED 0xad494e54 /* ad"INT" */
struct adouble_fops;
struct adouble {
u_int32_t ad_magic;
u_int32_t ad_version;
char ad_filler[ 16 ];
struct ad_entry ad_eid[ ADEID_MAX ];
struct ad_fd ad_data_fork, ad_resource_fork, ad_metadata_fork;
struct ad_fd *ad_md; /* either ad_resource or ad_metadata */
int ad_flags; /* This really stores version info too (AD_VERSION*) */
int ad_adflags; /* ad_open flags adflags like ADFLAGS_DIR */
unsigned int ad_inited;
int ad_options;
int ad_fileordir;
int ad_refcount; /* used in afpd/ofork.c */
off_t ad_rlen; /* ressource fork len with AFP 3.0
the header parameter size is too small.
*/
char *ad_m_name; /* mac name for open fork */
int ad_m_namelen;
struct adouble_fops *ad_ops;
u_int16_t ad_open_forks; /* open forks (by others) */
#ifdef USE_MMAPPED_HEADERS
char *ad_data;
#else
char ad_data[AD_DATASZ_MAX];
#endif
};
struct adouble_fops {
char *(*ad_path)(const char *, int);
int (*ad_mkrf)(char *);
int (*ad_rebuild_header)(struct adouble *);
int (*ad_check_header)(struct adouble *, struct stat *);
int (*ad_header_read)(struct adouble *, struct stat *);
int (*ad_header_upgrade)(struct adouble *, char *);
};
#define ADFLAGS_DF (1<<0)
#define ADFLAGS_HF (1<<1)
#define ADFLAGS_DIR (1<<2)
/*
#define ADFLAGS_NOADOUBLE (1<<3)
*/
#define ADFLAGS_V1COMPAT (1<<4)
#define ADFLAGS_NOHF (1<<5) /* not an error if no ressource fork */
#define ADFLAGS_RDONLY (1<<6) /* don't try readwrite */
#define ADFLAGS_OPENFORKS (1<<7) /* check for open fork in ad_metadata function */
#define ADFLAGS_RF (1<<8)
#define ADFLAGS_MD ADFLAGS_HF /* (1<<9) */
#define ADFLAGS_CREATE (1<<9)
/* adouble v2 cnid cache */
#define ADVOL_NODEV (1 << 0)
#define ADVOL_CACHE (1 << 1)
#define ADVOL_UNIXPRIV (1 << 2) /* adouble unix priv */
#define ADVOL_INVDOTS (1 << 3) /* dot files (.DS_Store) are invisible) */
#define ADVOL_NOADOUBLE (1 << 4)
/* lock flags */
#define ADLOCK_CLR (0)
#define ADLOCK_RD (1<<0)
#define ADLOCK_WR (1<<1)
#define ADLOCK_MASK (ADLOCK_RD | ADLOCK_WR)
#define ADLOCK_UPGRADE (1<<2)
#define ADLOCK_FILELOCK (1<<3)
/* we use this so that we can use the same mechanism for both byte
* locks and file synchronization locks. i do this by co-opting either
* first bits on 32-bit machines or shifting above the last bit on
* 64-bit machines. this only matters for the data fork. */
#if defined(TRY_64BITOFF_T) && (~0UL > 0xFFFFFFFFU)
/* synchronization locks */
#define AD_FILELOCK_BASE (0x80000000)
#else
#if _FILE_OFFSET_BITS == 64
#define AD_FILELOCK_BASE (0x7FFFFFFFFFFFFFFFULL - 9)
#else
#define AD_FILELOCK_BASE (0x7FFFFFFF -9)
#endif
#endif
/* FIXME:
* AD_FILELOCK_BASE case
*/
#if _FILE_OFFSET_BITS == 64
#define BYTELOCK_MAX (0x7FFFFFFFFFFFFFFFULL)
#else
/* Tru64 is an always-64-bit OS; version 4.0 does not set _FILE_OFFSET_BITS */
#if defined(TRU64)
#define BYTELOCK_MAX (0x7FFFFFFFFFFFFFFFULL)
#else
#define BYTELOCK_MAX (0x7FFFFFFFU)
#endif
#endif
#define AD_FILELOCK_OPEN_WR (AD_FILELOCK_BASE + 0)
#define AD_FILELOCK_OPEN_RD (AD_FILELOCK_BASE + 1)
#define AD_FILELOCK_DENY_WR (AD_FILELOCK_BASE + 2)
#define AD_FILELOCK_DENY_RD (AD_FILELOCK_BASE + 3)
#define AD_FILELOCK_OPEN_NONE (AD_FILELOCK_BASE + 4)
/* time stuff. we overload the bits a little. */
#define AD_DATE_CREATE 0
#define AD_DATE_MODIFY 4
#define AD_DATE_BACKUP 8
#define AD_DATE_ACCESS 12
#define AD_DATE_MASK (AD_DATE_CREATE | AD_DATE_MODIFY | \
AD_DATE_BACKUP | AD_DATE_ACCESS)
#define AD_DATE_UNIX (1 << 10)
#define AD_DATE_START htonl(0x80000000)
#define AD_DATE_DELTA 946684800
#define AD_DATE_FROM_UNIX(x) htonl((x) - AD_DATE_DELTA)
#define AD_DATE_TO_UNIX(x) (ntohl(x) + AD_DATE_DELTA)
/* various finder offset and info bits */
#define FINDERINFO_FRTYPEOFF 0
#define FINDERINFO_FRCREATOFF 4
#define FINDERINFO_FRFLAGOFF 8
/* FinderInfo Flags, char in `ad ls`, valid for files|dirs */
#define FINDERINFO_ISONDESK (1) /* "d", fd */
#define FINDERINFO_COLOR (0x0e)
#define FINDERINFO_HIDEEXT (1<<4) /* "e", fd */
#define FINDERINFO_ISHARED (1<<6) /* "m", f */
#define FINDERINFO_HASNOINITS (1<<7) /* "n", f */
#define FINDERINFO_HASBEENINITED (1<<8) /* "i", fd */
#define FINDERINFO_HASCUSTOMICON (1<<10) /* "c", fd */
#define FINDERINFO_ISSTATIONNERY (1<<11) /* "t", f */
#define FINDERINFO_NAMELOCKED (1<<12) /* "s", fd */
#define FINDERINFO_HASBUNDLE (1<<13) /* "b", fd */
#define FINDERINFO_INVISIBLE (1<<14) /* "v", fd */
#define FINDERINFO_ISALIAS (1<<15) /* "a", fd */
#define FINDERINFO_FRVIEWOFF 14
#define FINDERINFO_CUSTOMICON 0x4
#define FINDERINFO_CLOSEDVIEW 0x100
/*
The "shared" and "invisible" attributes are opaque and stored and
retrieved from the FinderFlags. This fixes Bug #2802236:
*/
/* AFP attributes, char in `ad ls`, valid for files|dirs */
#define ATTRBIT_INVISIBLE (1<<0) /* opaque from FinderInfo */
#define ATTRBIT_MULTIUSER (1<<1) /* file: opaque, dir: see below */
#define ATTRBIT_SYSTEM (1<<2) /* "y", fd */
#define ATTRBIT_DOPEN (1<<3) /* data fork already open. Not stored, computed on the fly */
#define ATTRBIT_ROPEN (1<<4) /* resource fork already open. Not stored, computed on the fly */
#define ATTRBIT_NOWRITE (1<<5) /* "w", f, write inhibit(v2)/read-only(v1) bit */
#define ATTRBIT_BACKUP (1<<6) /* "p", fd */
#define ATTRBIT_NORENAME (1<<7) /* "r", fd */
#define ATTRBIT_NODELETE (1<<8) /* "l", fd */
#define ATTRBIT_NOCOPY (1<<10) /* "o", f */
#define ATTRBIT_SETCLR (1<<15) /* set/clear bit (d) */
/* AFP attributes for dirs. These should probably be computed on the fly.
* We don't do that, nor does e.g. OS S X 10.5 Server */
#define ATTRBIT_EXPFLDR (1<<1) /* Folder is a sharepoint */
#define ATTRBIT_MOUNTED (1<<3) /* Directory is mounted by a user */
#define ATTRBIT_SHARED (1<<4) /* Shared area, called IsExpFolder in spec */
/* private AFPFileInfo bits */
#define AD_AFPFILEI_OWNER (1 << 0) /* any owner */
#define AD_AFPFILEI_GROUP (1 << 1) /* ignore group */
#define AD_AFPFILEI_BLANKACCESS (1 << 2) /* blank access permissions */
#define ad_data_fileno(ad) ((ad)->ad_data_fork.adf_fd)
#define ad_reso_fileno(ad) ((ad)->ad_resource_fork.adf_fd)
#define ad_meta_fileno(ad) ((ad)->ad_md->adf_fd)
#define ad_getversion(ad) ((ad)->ad_version)
#define ad_getentrylen(ad,eid) ((ad)->ad_eid[(eid)].ade_len)
#define ad_setentrylen(ad,eid,len) ((ad)->ad_eid[(eid)].ade_len = (len))
#define ad_getentryoff(ad,eid) ((ad)->ad_eid[(eid)].ade_off)
#define ad_entry(ad,eid) ((caddr_t)(ad)->ad_data + (ad)->ad_eid[(eid)].ade_off)
#define ad_get_HF_flags(ad) ((ad)->ad_resource_fork.adf_flags)
#define ad_get_MD_flags(ad) ((ad)->ad_md->adf_flags)
/* ad_flush.c */
extern int ad_rebuild_adouble_header (struct adouble *);
extern int ad_rebuild_sfm_header (struct adouble *);
extern int ad_copy_header (struct adouble *, struct adouble *);
extern int ad_flush (struct adouble *);
extern int ad_close (struct adouble *, int);
/* ad_lock.c */
extern int ad_fcntl_lock (struct adouble *, const u_int32_t /*eid*/,
const int /*type*/, const off_t /*offset*/,
const off_t /*len*/, const int /*user*/);
extern void ad_fcntl_unlock (struct adouble *, const int /*user*/);
extern int ad_fcntl_tmplock (struct adouble *, const u_int32_t /*eid*/,
const int /*type*/, const off_t /*offset*/,
const off_t /*len*/, const int /*user*/);
extern int ad_testlock (struct adouble * /*adp*/, int /*eid*/, off_t /*off*/);
extern u_int16_t ad_openforks (struct adouble * /*adp*/, u_int16_t);
extern int ad_excl_lock (struct adouble * /*adp*/, const u_int32_t /*eid*/);
#define ad_lock ad_fcntl_lock
#define ad_tmplock ad_fcntl_tmplock
#define ad_unlock ad_fcntl_unlock
/* ad_open.c */
extern int ad_setfuid (const uid_t );
extern uid_t ad_getfuid (void );
extern char *ad_dir (const char *);
extern char *ad_path (const char *, int);
extern char *ad_path_osx (const char *, int);
extern char *ad_path_ads (const char *, int);
extern char *ad_path_sfm (const char *, int);
extern int ad_mode (const char *, int);
extern int ad_mkdir (const char *, int);
extern void ad_init (struct adouble *, int, int );
extern int ad_open (const char *, int, int, int, struct adouble *);
extern int ad_openat (int dirfd, const char *, int, int, int, struct adouble *);
extern int ad_refresh (struct adouble *);
extern int ad_stat (const char *, struct stat *);
extern int ad_metadata (const char *, int, struct adouble *);
extern int ad_metadataat (int, const char *, int, struct adouble *);
#define ad_open_metadata(name, flags, mode, adp)\
ad_open(name, ADFLAGS_MD|(flags), O_RDWR |(mode), 0666, (adp))
#define ad_close_metadata(adp) ad_close( (adp), ADFLAGS_MD)
/* build a resource fork mode from the data fork mode:
* remove X mode and extend header to RW if R or W (W if R for locking),
*/
static inline mode_t ad_hf_mode (mode_t mode)
{
mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
/* fnctl lock need write access */
if ((mode & S_IRUSR))
mode |= S_IWUSR;
if ((mode & S_IRGRP))
mode |= S_IWGRP;
if ((mode & S_IROTH))
mode |= S_IWOTH;
/* if write mode set add read mode */
if ((mode & S_IWUSR))
mode |= S_IRUSR;
if ((mode & S_IWGRP))
mode |= S_IRGRP;
if ((mode & S_IWOTH))
mode |= S_IROTH;
return mode;
}
/* ad_ea.c */
ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t size);
ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
ssize_t sys_listxattr (const char *path, char *list, size_t size);
ssize_t sys_llistxattr (const char *path, char *list, size_t size);
ssize_t sys_flistxattr (int filedes, char *list, size_t size);
int sys_removexattr (const char *path, const char *name);
int sys_lremovexattr (const char *path, const char *name);
int sys_fremovexattr (int filedes, const char *name);
int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
int sys_lsetxattr (const char *path, const char *name, const void *value, size_t size, int flags);
int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
int sys_copyxattr (const char *src, const char *dst);
/* ad_read.c/ad_write.c */
extern int sys_ftruncate(int fd, off_t length);
extern ssize_t ad_read (struct adouble *, const u_int32_t,
const off_t, char *, const size_t);
extern ssize_t ad_pread (struct ad_fd *, void *, size_t, off_t);
extern ssize_t ad_write (struct adouble *, const u_int32_t, off_t,
const int, const char *, const size_t);
extern ssize_t adf_pread (struct ad_fd *, void *, size_t, off_t);
extern ssize_t adf_pwrite (struct ad_fd *, const void *, size_t, off_t);
extern int ad_dtruncate (struct adouble *, const off_t);
extern int ad_rtruncate (struct adouble *, const off_t);
/* ad_size.c */
extern off_t ad_size (const struct adouble *, const u_int32_t );
/* ad_mmap.c */
extern void *ad_mmapread (struct adouble *, const u_int32_t,
const off_t, const size_t);
extern void *ad_mmapwrite (struct adouble *, const u_int32_t,
const off_t, const int, const size_t);
#define ad_munmap(buf, len) (munmap((buf), (len)))
/* ad_date.c */
extern int ad_setdate (struct adouble *, unsigned int, u_int32_t);
extern int ad_getdate (const struct adouble *, unsigned int, u_int32_t *);
/* ad_attr.c */
extern int ad_setattr (const struct adouble *, const u_int16_t);
extern int ad_getattr (const struct adouble *, u_int16_t *);
/* Note: starting with Netatalk 2.1 we do NOT alway set the name */
extern int ad_setname (struct adouble *, const char *);
#if AD_VERSION == AD_VERSION2
extern int ad_setid (struct adouble *, const dev_t dev,const ino_t ino, const u_int32_t, const u_int32_t, const void *);
extern u_int32_t ad_getid (struct adouble *, const dev_t, const ino_t, const cnid_t, const void *);
extern u_int32_t ad_forcegetid (struct adouble *adp);
#else
#define ad_setid(a, b, c)
#endif
#ifdef WITH_SENDFILE
extern int ad_readfile_init(const struct adouble *ad,
const int eid, off_t *off,
const int end);
#endif
#if 0
#ifdef HAVE_SENDFILE_WRITE
extern ssize_t ad_writefile (struct adouble *, const int,
const int, off_t, const int, const size_t);
#endif /* HAVE_SENDFILE_WRITE */
#endif /* 0 */
#endif /* _ATALK_ADOUBLE_H */
netatalk-2.2.2/include/atalk/util.h0000644000175200017500000001532111657220543014117 00000000000000/*!
* @file
* Netatalk utility functions
*
* Utility functions for these areas: \n
* * sockets \n
* * locking \n
* * misc UNIX function wrappers, eg for getcwd
*/
#ifndef _ATALK_UTIL_H
#define _ATALK_UTIL_H 1
#include
#include
#ifdef HAVE_UNISTD_H
#include
#endif /* HAVE_UNISTD_H */
#include
#include
#include
#include
/* exit error codes */
#define EXITERR_CLNT 1 /* client related error */
#define EXITERR_CONF 2 /* error in config files/cmd line parameters */
#define EXITERR_SYS 3 /* local system error */
/* Print a SBT and exit */
#define AFP_PANIC(why) \
do { \
netatalk_panic(why); \
abort(); \
} while(0);
/* LOG assert errors */
#ifndef NDEBUG
#define AFP_ASSERT(b) \
do { \
if (!(b)) { \
AFP_PANIC(#b); \
} \
} while(0);
#else
#define AFP_ASSERT(b)
#endif /* NDEBUG */
#define STRCMP(a,b,c) (strcmp(a,c) b 0)
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? a : b)
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? a : b)
#endif
#if BYTE_ORDER == BIG_ENDIAN
#define hton64(x) (x)
#define ntoh64(x) (x)
#else /* BYTE_ORDER == BIG_ENDIAN */
#define hton64(x) ((uint64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
(uint64_t) ((htonl(x) & 0xffffffffLL) << 32))
#define ntoh64(x) (hton64(x))
#endif /* BYTE_ORDER == BIG_ENDIAN */
#ifdef WITH_SENDFILE
extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);
#endif
extern const int _diacasemap[], _dialowermap[];
extern char **getifacelist(void);
extern void freeifacelist(char **);
#define diatolower(x) _dialowermap[(unsigned char) (x)]
#define diatoupper(x) _diacasemap[(unsigned char) (x)]
#ifndef NO_DDP
extern int atalk_aton (char *, struct at_addr *);
#endif
extern void bprint (char *, int);
extern int strdiacasecmp (const char *, const char *);
extern int strndiacasecmp (const char *, const char *, size_t);
extern pid_t server_lock (char * /*program*/, char * /*file*/, int /*debug*/);
extern int check_lockfile (const char *program, const char *pidfile);
extern int create_lockfile(const char *program, const char *pidfile);
extern void fault_setup (void (*fn)(void *));
extern void netatalk_panic(const char *why);
#define server_unlock(x) (unlink(x))
/* strlcpy and strlcat are used by pam modules */
#ifndef UAM_MODULE_EXPORT
#define UAM_MODULE_EXPORT
#endif
#ifndef HAVE_STRLCPY
UAM_MODULE_EXPORT size_t strlcpy (char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCAT
UAM_MODULE_EXPORT size_t strlcat (char *, const char *, size_t);
#endif
#ifndef HAVE_DLFCN_H
extern void *mod_open (const char *);
extern void *mod_symbol (void *, const char *);
extern void mod_close (void *);
#define mod_error() ""
#else /* ! HAVE_DLFCN_H */
#include
#ifndef RTLD_NOW
#define RTLD_NOW 1
#endif /* ! RTLD_NOW */
/* NetBSD doesn't like RTLD_NOW for dlopen (it fails). Use RTLD_LAZY.
* OpenBSD currently does not use the second arg for dlopen(). For
* future compatibility we define DL_LAZY */
#ifdef __NetBSD__
#define mod_open(a) dlopen(a, RTLD_LAZY)
#elif defined(__OpenBSD__)
#define mod_open(a) dlopen(a, DL_LAZY)
#else /* ! __NetBSD__ && ! __OpenBSD__ */
#define mod_open(a) dlopen(a, RTLD_NOW)
#endif /* __NetBSD__ */
#ifndef DLSYM_PREPEND_UNDERSCORE
#define mod_symbol(a, b) dlsym(a, b)
#else /* ! DLSYM_PREPEND_UNDERSCORE */
extern void *mod_symbol (void *, const char *);
#endif /* ! DLSYM_PREPEND_UNDERSCORE */
#define mod_error() dlerror()
#define mod_close(a) dlclose(a)
#endif /* ! HAVE_DLFCN_H */
/******************************************************************
* locking.c
******************************************************************/
extern int lock_reg(int fd, int cmd, int type, off_t offest, int whence, off_t len);
#define read_lock(fd, offset, whence, len) \
lock_reg((fd), F_SETLK, F_RDLCK, (offset), (whence), (len))
#define write_lock(fd, offset, whence, len) \
lock_reg((fd), F_SETLK, F_WRLCK, (offset), (whence), (len))
#define unlock(fd, offset, whence, len) \
lock_reg((fd), F_SETLK, F_UNLCK, (offset), (whence), (len))
/******************************************************************
* socket.c
******************************************************************/
extern int setnonblock(int fd, int cmd);
extern ssize_t readt(int socket, void *data, const size_t length, int setnonblocking, int timeout);
extern ssize_t writet(int socket, void *data, const size_t length, int setnonblocking, int timeout);
extern const char *getip_string(const struct sockaddr *sa);
extern unsigned int getip_port(const struct sockaddr *sa);
extern void apply_ip_mask(struct sockaddr *ai, int maskbits);
extern int compare_ip(const struct sockaddr *sa1, const struct sockaddr *sa2);
/* Structures and functions dealing with dynamic pollfd arrays */
enum fdtype {IPC_FD, LISTEN_FD, DISASOCIATED_IPC_FD};
struct polldata {
enum fdtype fdtype; /* IPC fd or listening socket fd */
void *data; /* pointer to AFPconfig for listening socket and *
* pointer to afp_child_t for IPC fd */
};
extern void fdset_add_fd(int maxconns,
struct pollfd **fdsetp,
struct polldata **polldatap,
int *fdset_usedp,
int *fdset_sizep,
int fd,
enum fdtype fdtype,
void *data);
extern void fdset_del_fd(struct pollfd **fdsetp,
struct polldata **polldatap,
int *fdset_usedp,
int *fdset_sizep,
int fd);
extern int send_fd(int socket, int fd);
extern int recv_fd(int fd, int nonblocking);
/******************************************************************
* unix.c
*****************************************************************/
extern const char *getcwdpath(void);
extern const char *fullpathname(const char *);
extern char *stripped_slashes_basename(char *p);
extern int lchdir(const char *dir);
extern void randombytes(void *buf, int n);
extern int daemonize(int nochdir, int noclose);
/******************************************************************
* cnid.c
*****************************************************************/
extern bstring rel_path_in_vol(const char *path, const char *volpath);
#endif /* _ATALK_UTIL_H */
netatalk-2.2.2/include/atalk/fce_api.h0000755000175200017500000000306511655731244014540 00000000000000/*
* File: fce_api.h
* Author: mw
*
* Created on 1. Oktober 2010, 21:35
*
* API calls for file change event api
*/
#ifndef _FCE_API_H
#define _FCE_API_H
#include
/* fce_packet.mode */
#define FCE_FILE_MODIFY 1
#define FCE_FILE_DELETE 2
#define FCE_DIR_DELETE 3
#define FCE_FILE_CREATE 4
#define FCE_DIR_CREATE 5
#define FCE_TM_SIZE 6
#define FCE_CONN_START 42
#define FCE_CONN_BROKEN 99
/* fce_packet.fce_magic */
#define FCE_PACKET_MAGIC "at_fcapi"
/* This packet goes over the network, so we want to
* be shure about datastructs and type sizes between platforms.
* Format is network byte order.
*/
#define FCE_PACKET_HEADER_SIZE 8+1+1+4+2
struct fce_packet
{
char magic[8];
unsigned char version;
unsigned char mode;
uint32_t event_id;
uint16_t datalen;
char data[MAXPATHLEN];
};
struct path;
struct ofork;
void fce_pending_events(AFPObj *obj);
int fce_register_delete_file( struct path *path );
int fce_register_delete_dir( char *name );
int fce_register_new_dir( struct path *path );
int fce_register_new_file( struct path *path );
int fce_register_file_modification( struct ofork *ofork );
int fce_register_tm_size(const char *vol, size_t used);
int fce_add_udp_socket(const char *target ); // IP or IP:Port
int fce_set_coalesce( char *coalesce_opt ); // all|delete|create
int fce_set_events(const char *events); /* fmod,fdel,ddel,fcre,dcre,tmsz (default is all except tmsz) */
#define FCE_DEFAULT_PORT 12250
#define FCE_DEFAULT_PORT_STRING "12250"
#endif /* _FCE_API_H */
netatalk-2.2.2/include/atalk/bstradd.h0000644000175200017500000000264411655731126014573 00000000000000/*
Copyright (c) 2010 Frank Lahm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
/*!
* @file
* Additional functions for bstrlib.
*/
#ifndef ATALK_BSTRADD_H
#define ATALK_BSTRADD_H
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#define cfrombstr(b) ((char *)((b)->data))
/* strip slashes from end of a bstring */
#define BSTRING_STRIP_SLASH(a) \
do { \
while (bchar((a), blength(a) - 1) == '/') \
bdelete((a), blength(a) - 1, 1); \
} while (0);
typedef struct tagbstring static_bstring;
extern bstring brefcstr(const char *str);
extern int bunrefcstr(bstring b);
extern struct bstrList *bstrListCreateMin(int min);
extern int bstrListPush(struct bstrList *sl, bstring bs);
extern bstring bstrListPop(struct bstrList *sl);
extern bstring bjoinInv(const struct bstrList * bl, const_bstring sep);
#endif /* ATALK_BSTRADD_H */
netatalk-2.2.2/include/atalk/atp.h0000644000175200017500000001353211655731244013733 00000000000000/*
* $Id: atp.h,v 1.5 2009-10-13 22:55:37 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifndef _ATALK_ATP_H
#define _ATALK_ATP_H 1
#ifndef NO_DDP
#include
#include
#include
#include
#include
/* ATP packet format
|----------------|
| link header |
| ... |
|----------------|
| DDP header |
| ... |
| type = 3 |
|----------------|
| control info | --> bits 7,6: function code
|----------------| 5: XO bit
| bitmap/seq no. | 4: EOM bit
|----------------| 3: STS bit
| TID (MSB) | 2,1,0: release timer code (ignored under phase I)
|----------------|
| TID (LSB) |
|----------------|
| user bytes (4) |
|----------------|
| data (0-578) |
| ... |
|----------------|
*/
struct atphdr {
u_int8_t atphd_ctrlinfo; /* control information */
u_int8_t atphd_bitmap; /* bitmap or sequence number */
u_int16_t atphd_tid; /* transaction id. */
};
/* ATP protocol parameters
*/
#define ATP_MAXDATA (578+4) /* maximum ATP data size */
#define ATP_BUFSIZ 587 /* maximum packet size */
#define ATP_HDRSIZE 5 /* includes DDP type field */
#define ATP_TRELMASK 0x07 /* mask all but TREL */
#define ATP_RELTIME 30 /* base release timer (in secs) */
#define ATP_TREL30 0x0 /* release time codes */
#define ATP_TREL1M 0x1 /* these are passed in flags of */
#define ATP_TREL2M 0x2 /* atp_sreq call, and set in the */
#define ATP_TREL4M 0x3 /* packet control info. */
#define ATP_TREL8M 0x4
#define ATP_TRIES_INFINITE -1 /* for atp_sreq, etc */
struct atpxobuf {
u_int16_t atpxo_tid;
struct timeval atpxo_tv;
int atpxo_reltime;
struct atpbuf *atpxo_packet[8];
};
struct atpbuf {
struct atpbuf *atpbuf_next; /* next buffer in chain */
size_t atpbuf_dlen; /* data length <= ATP_BUFSIZ */
struct sockaddr_at atpbuf_addr; /* net address sent/recvd */
union {
char atpbuf_data[ ATP_BUFSIZ ]; /* the data */
struct atpxobuf atpbuf_xo; /* for XO requests */
} atpbuf_info;
};
struct atp_handle {
int atph_socket; /* ddp socket */
struct sockaddr_at atph_saddr; /* address */
u_int16_t atph_tid; /* last tid used */
u_int16_t atph_rtid; /* last received (rreq) */
u_int8_t atph_rxo; /* XO flag from last rreq */
int atph_rreltime; /* release time (secs) */
struct atpbuf *atph_sent; /* packets we send (XO) */
struct atpbuf *atph_queue; /* queue of pending packets */
int atph_reqtries; /* retry count for request */
int atph_reqto; /* retry timeout for request */
int atph_rrespcount; /* expected # of responses */
u_int8_t atph_rbitmap; /* bitmap for request */
struct atpbuf *atph_reqpkt; /* last request packet */
struct timeval atph_reqtv; /* when we last sent request */
struct atpbuf *atph_resppkt[8]; /* response to request */
};
typedef struct atp_handle *ATP;
#define atp_sockaddr( h ) (&(h)->atph_saddr)
#define atp_fileno(x) ((x)->atph_socket)
struct sreq_st {
char *atpd_data; /* request data */
int atpd_dlen;
int atpd_tries; /* max. retry count */
int atpd_to; /* retry interval */
};
struct rres_st {
struct iovec *atpd_iov; /* for response */
int atpd_iovcnt;
};
struct rreq_st {
char *atpd_data; /* request data */
int atpd_dlen;
};
struct sres_st {
struct iovec *atpd_iov; /* for response */
int atpd_iovcnt;
};
struct atp_block {
struct sockaddr_at *atp_saddr; /* from/to address */
union {
struct sreq_st sreqdata;
#define atp_sreqdata atp_data.sreqdata.atpd_data
#define atp_sreqdlen atp_data.sreqdata.atpd_dlen
#define atp_sreqtries atp_data.sreqdata.atpd_tries
#define atp_sreqto atp_data.sreqdata.atpd_to
struct rres_st rresdata;
#define atp_rresiov atp_data.rresdata.atpd_iov
#define atp_rresiovcnt atp_data.rresdata.atpd_iovcnt
struct rreq_st rreqdata;
#define atp_rreqdata atp_data.rreqdata.atpd_data
#define atp_rreqdlen atp_data.rreqdata.atpd_dlen
struct sres_st sresdata;
#define atp_sresiov atp_data.sresdata.atpd_iov
#define atp_sresiovcnt atp_data.sresdata.atpd_iovcnt
} atp_data;
u_int8_t atp_bitmap; /* response buffer bitmap */
};
/* flags for ATP options (and control byte)
*/
#define ATP_STS (1<<3) /* Send Transaction Status */
#define ATP_EOM (1<<4) /* End Of Message */
#define ATP_XO (1<<5) /* eXactly Once mode */
/* function codes
*/
#define ATP_FUNCMASK (3<<6) /* mask all but function */
#define ATP_TREQ (1<<6) /* Trans. REQuest */
#define ATP_TRESP (2<<6) /* Trans. RESPonse */
#define ATP_TREL (3<<6) /* Trans. RELease */
extern ATP atp_open (u_int8_t,
const struct at_addr *);
extern int atp_close (ATP);
extern int atp_sreq (ATP, struct atp_block *, int,
u_int8_t);
extern int atp_rresp (ATP, struct atp_block *);
extern int atp_rsel (ATP, struct sockaddr_at *, int);
extern int atp_rreq (ATP, struct atp_block *);
extern int atp_sresp (ATP, struct atp_block *);
#endif /* NO_DDP */
#endif
netatalk-2.2.2/Makefile.in0000644000175200017500000005445011703521732012321 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for top level of netatalk package
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure $(top_srcdir)/sys/solaris/Makefile.in \
AUTHORS COPYING NEWS compile config.guess config.sub depcomp \
install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = sys/solaris/Makefile
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = libatalk bin config etc man contrib distrib include sys doc macros test
EXTRA_DIST = CONTRIBUTORS COPYRIGHT COPYING NEWS VERSION services.atalk
ACLOCAL_AMFLAGS = -I macros
AUTOMAKE_OPTIONS = foreign
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
sys/solaris/Makefile: $(top_builddir)/config.status $(top_srcdir)/sys/solaris/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d $(distdir) || mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/install-sh0000755000175200017500000003246411661232404012257 00000000000000#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-12-25.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
netatalk-2.2.2/configure.ac0000644000175200017500000012275611670074205012550 00000000000000dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
NETATALK_VERSION=`cat $srcdir/VERSION`
AC_SUBST(NETATALK_VERSION)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE([enable])
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PROG_PERL
AC_PROG_GREP
AC_PROG_PS
AM_PROG_CC_C_O
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h time.h sys/param.h sys/fcntl.h sys/file.h sys/ioctl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h syslog.h unistd.h termios.h sys/termios.h netdb.h sgtty.h ufs/quota.h mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h sys/uio.h langinfo.h locale.h sys/filio.h)
AC_CHECK_HEADER(sys/cdefs.h,,
AC_MSG_RESULT([enabling generic cdefs.h from tree])
CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
)
AC_CHECK_HEADERS([sys/mount.h], , ,
[#ifdef HAVE_SYS_PARAM_H
#include
#endif
])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_RDEV
AC_HEADER_TIME
AC_STRUCT_TM
dnl --------------------------------------------------------------------------
dnl check if dlsym needs to add an underscore, uses libtool macros
dnl --------------------------------------------------------------------------
AC_LTDL_DLLIB
AC_CHECK_FUNCS(dlopen dlsym dlclose)
AC_LTDL_DLSYM_USCORE
if test x"$libltdl_cv_need_uscore" = xyes; then
AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro])
fi
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_HEADER_MAJOR
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL
AC_FUNC_WAIT3
AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul strchr memcpy)
AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect access pread pwrite)
AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
ac_neta_haveatfuncs=yes
AC_CHECK_FUNCS(openat renameat fstatat unlinkat, , ac_neta_haveatfuncs=no)
if test x"$ac_neta_haveatfuncs" = x"yes" ; then
AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)
AC_DEFINE([HAVE_ATFUNCS], 1, whether at funcs are available)
fi
AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include ])
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
dnl search for necessary libs for libpthread stuff
AC_SEARCH_LIBS(pthread_sigmask, pthread,,
[AC_MSG_ERROR([cannot find pthread_sigmask in libc or libpthread])])
if test x"$ac_cv_search_pthread_sigmask" != x"none required" ; then
PTHREAD_LIBS=$ac_cv_search_pthread_sigmask
fi
AC_SUBST(PTHREAD_LIBS)
AC_CACHE_SAVE
dnl Checks for (v)snprintf
NETATALK_SNPRINTF_CHECK
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 specific configuration comes in here:
dnl --------------------------------------------------------------------------
netatalk_cv_admin_group=yes
AC_MSG_CHECKING([for administrative group support])
AC_ARG_ENABLE(admin-group,
[ --disable-admin-group disable admin group],[
if test x"$enableval" = x"no"; then
AC_DEFINE(ADMIN_GRP, 0, [Define if the admin group should be enabled])
netatalk_cv_admin_group=no
AC_MSG_RESULT([no])
else
AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
AC_MSG_RESULT([yes])
fi],[
AC_DEFINE(ADMIN_GRP, 1, [Define if the admin group should be enabled])
AC_MSG_RESULT([yes])
]
)
NETATALK_AFS_CHECK
NETATALK_CONFIG_DIRS
netatalk_cv_with_cracklib=no
AC_ARG_WITH(cracklib,
[ --with-cracklib=DICT enable/set location of cracklib dictionary],[
if test "x$withval" != "xno" ; then
cracklib="$withval"
AC_CHECK_LIB(crack, main, [
AC_DEFINE(USE_CRACKLIB, 1, [Define if cracklib should be used])
LIBS="$LIBS -lcrack"
if test "$cracklib" = "yes"; then
cracklib="/usr/$atalk_libname/cracklib_dict"
fi
AC_DEFINE_UNQUOTED(_PATH_CRACKLIB, "$cracklib",
[path to cracklib dictionary])
AC_MSG_RESULT([setting cracklib dictionary to $cracklib])
netatalk_cv_with_cracklib=yes
],[
AC_MSG_ERROR([cracklib not found!])
]
)
fi
]
)
AC_MSG_CHECKING([for cracklib support])
AC_MSG_RESULT([$netatalk_cv_with_cracklib])
netatalk_cv_ddp_enabled=no
AC_MSG_CHECKING([whether to enable DDP])
AC_ARG_ENABLE(ddp,
[ --enable-ddp enable DDP (AppleTalk)],[
if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
netatalk_cv_ddp_enabled=yes
else
AC_MSG_RESULT([yes])
AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
fi
],[
AC_MSG_RESULT([no])
AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
]
)
AC_MSG_CHECKING([whether to enable debug code])
AC_ARG_ENABLE(debug1,
[ --enable-debug1 enable debug code],[
if test "$enableval" != "no"; then
if test "$enableval" = "yes"; then
AC_DEFINE(DEBUG1, 1, [Define if debugging information should be included])
else
AC_DEFINE_UNQUOTED(DEBUG1, $enableval, [Define if debugging information should be included])
fi
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([whether to enable verbose debug code])
AC_ARG_ENABLE(debug,
[ --enable-debug enable verbose debug code],[
if test "$enableval" != "no"; then
if test "$enableval" = "yes"; then
AC_DEFINE(DEBUG, 1, [Define if verbose debugging information should be included])
else
AC_DEFINE_UNQUOTED(DEBUG, $enableval, [Define if verbose debugging information should be included])
fi
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_DEFINE(NDEBUG, 1, [Disable assertions])
fi
],[
AC_MSG_RESULT([no])
AC_DEFINE(NDEBUG, 1, [Disable assertions])
]
)
AC_MSG_CHECKING([whether to enable debugging with debuggers])
AC_ARG_ENABLE(debugging,
[ --enable-debugging disable SIGALRM timers and DSI tickles (eg for debugging with gdb/dbx/...)],[
if test "$enableval" != "no"; then
if test "$enableval" = "yes"; then
AC_DEFINE(DEBUGGING, 1, [Define if you want to disable SIGALRM timers and DSI tickles])
else
AC_DEFINE_UNQUOTED(DEBUGGING, $enableval, [Define if you want to disable SIGALRM timers and DSI tickles])
fi
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
AC_SYS_LARGEFILE([], AC_MSG_ERROR([AFP 3.x support requires Large File Support.]))
AC_CHECK_ICONV
dnl ----------- A NOTE ABOUT DROPKLUDGE
dnl The trouble with this fix is that if you know what the file is called, it
dnl can be read from the Unix side. That's okay for most academic institutions
dnl since the students don't have telnet access to the Mac servers. There is
dnl currently no one working on further development/fixes of DROPKLUDGE.
dnl -----------
netatalk_cv_dropkludge=no
AC_MSG_CHECKING([whether to enable experimental dropbox support])
AC_ARG_ENABLE(dropkludge,
[ --enable-dropkludge enable the experimental dropbox fix (INSECURE!) ],[
if test "$enableval" = "yes"; then
AC_DEFINE(DROPKLUDGE, 1, [Define if you want to use the experimental dropkludge support])
AC_MSG_RESULT([yes])
netatalk_cv_dropkludge=yes
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
netatalk_cv_force_uidgid=no
AC_MSG_CHECKING([whether to enable forcing of uid/gid per volume])
AC_ARG_ENABLE(force-uidgid,
[ --enable-force-uidgid allow forcing of uid/gid per volume (BROKEN) ],[
if test "$enableval" = "yes"; then
AC_DEFINE(FORCE_UIDGID, 1, [Define if you want forcing of uid/gid per volume])
AC_MSG_RESULT([enabling forcing of uid/gid per volume])
AC_MSG_RESULT([yes])
netatalk_cv_force_uidgid=yes
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
dnl Check for CNID database backends
bdb_required=no
AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no])
dnl Check for quota support
AC_CHECK_QUOTA
dnl Check for optional server location protocol support (used by MacOS X)
NETATALK_SRVLOC
dnl Check for optional Zeroconf support
NETATALK_ZEROCONF
dnl Check for PAM libs
netatalk_cv_use_pam=no
AC_PATH_PAM([
use_pam_so=yes
compile_pam=yes
netatalk_cv_use_pam=yes
AC_DEFINE(USE_PAM, 1, [Define to enable PAM support])
])
netatalk_cv_use_shadowpw=no
AC_ARG_WITH(shadow,
[ --with-shadow enable shadow password support [[auto]]],
[netatalk_cv_use_shadowpw="$withval"],
[netatalk_cv_use_shadowpw=auto]
)
if test "x$netatalk_cv_use_shadowpw" != "xno"; then
AC_CHECK_HEADER([shadow.h])
if test x"$ac_cv_header_shadow_h" = x"yes"; then
netatalk_cv_use_shadowpw=yes
AC_DEFINE(SHADOWPW, 1, [Define if shadow passwords should be used])
else
if test "x$shadowpw" = "xyes"; then
AC_MSG_ERROR([shadow support not available])
else
netatalk_cv_use_shadowpw=no
fi
fi
fi
AC_MSG_CHECKING([whether shadow support should be enabled])
if test "x$netatalk_cv_use_shadowpw" = "xyes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
netatalk_cv_use_shellcheck=yes
AC_MSG_CHECKING([whether checking for a valid shell should be enabled])
AC_ARG_ENABLE(shell-check,
[ --disable-shell-check disable checking for a valid shell],[
if test "$enableval" = "no"; then
AC_DEFINE(DISABLE_SHELLCHECK, 1, [Define if shell check should be disabled])
AC_MSG_RESULT([no])
netatalk_cv_use_shellcheck=no
else
AC_MSG_RESULT([yes])
fi
],[
AC_MSG_RESULT([yes])
]
)
NETATALK_TCP_WRAPPERS
AC_MSG_CHECKING([whether system (fcntl) locking should be disabled])
AC_ARG_ENABLE(locking,
[ --disable-locking disable system locking],[
if test "$enableval" = "no"; then
AC_DEFINE(DISABLE_LOCKING, 1, [Define if system (fcntl) locking should be disabled])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
AC_ARG_ENABLE(redhat,
[ --enable-redhat obsoleted ],[
echo "ERROR: --enable-redhat is obsoleted. Use --enable-redhat-sysv or --enable-redhat-systemd."
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
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 obsoleted ],[
echo "ERROR: --enable-suse is obsoleted. Use --enable-suse-sysv or --enable-suse-systemd."
exit 1
]
)
AC_ARG_ENABLE(suse-sysv,
[ --enable-suse-sysv use suse-style sysv configuration ],[
if test "$enableval" = "yes"; then
sysv_style=suse-sysv
fi
AC_MSG_RESULT([enabling suse-style sysv support])
]
)
AC_ARG_ENABLE(suse-systemd,
[ --enable-suse-systemd use suse-style systemd (>=openSUSE12.1) configuration ],[
if test "$enableval" = "yes"; then
sysv_style=suse-systemd
fi
AC_MSG_RESULT([enabling suse-style systemd support])
]
)
AC_ARG_ENABLE(gentoo,
[ --enable-gentoo use gentoo-style sysv configuration ],[
if test "$enableval" = "yes"; then
sysv_style=gentoo
fi
AC_MSG_RESULT([enabling gentoo-style sysv support])
]
)
AC_ARG_ENABLE(netbsd,
[ --enable-netbsd use NetBSD-style rc.d configuration ],
if test "x$enableval" = "xyes"; then
sysv_style=netbsd
fi
AC_MSG_RESULT([enabling NetBSD-style rc.d support])
)
AC_ARG_ENABLE(debian,
[ --enable-debian use debian-style sysv configuration ],[
if test "$enableval" = "yes"; then
sysv_style=debian
fi
AC_MSG_RESULT([enabling debian-style sysv support])
]
)
AC_ARG_ENABLE(systemd,
[ --enable-systemd use general systemd configuration],[
if test "$enableval" = "yes"; then
sysv_style=systemd
fi
AC_MSG_RESULT([enabling general systemd support])
]
)
dnl ----- timelord compilation (disabled by default)
AC_MSG_CHECKING([whether timelord should be compiled])
compile_timelord=no
AC_ARG_ENABLE(timelord,
[ --enable-timelord enable compilation of timelord server],
[compile_timelord="$enableval"],
[compile_timelord="no"]
)
AC_MSG_RESULT([$compile_timelord])
dnl ----- a2boot compilation (disabled by default)
AC_MSG_CHECKING([whether a2boot should be compiled])
compile_a2boot=no
AC_ARG_ENABLE(a2boot,
[ --enable-a2boot enable compilation of Apple2 boot server],
[compile_a2boot="$enableval"],
[compile_a2boot="no"]
)
AC_MSG_RESULT([$compile_a2boot])
AC_ARG_WITH(uams-path,
[ --with-uams-path=PATH path to UAMs [[PKGCONF/uams]]],[
uams_path="$withval"
],[
uams_path="${PKGCONFDIR}/uams"
]
)
NETATALK_AC_CUPS
dnl check if we can use attribute unused (gcc only) from ethereal
AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
if test x$GCC != x ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"
AC_MSG_RESULT(no)
fi
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])
]
)
dnl --------------------------------------------------------------------------
dnl post-FHS substitutions, etc
dnl --------------------------------------------------------------------------
dnl ***** UAMS_PATH
dnl AC_DEFINE_UNQUOTED(UAMS_PATH, "${uams_path}",
dnl [path to UAMs [default=PKGCONF/uams]])
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 $CFLAGS -I\$(top_srcdir)/sys"
AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
dnl --------------------------------------------------------------------------
dnl specific configuration comes in here:
dnl --------------------------------------------------------------------------
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 ;;
*linux*) this_os=linux ;;
*osx*) this_os=macosx ;;
*darwin*) this_os=macosx ;;
*netbsd*) this_os=netbsd ;;
*openbsd*) this_os=openbsd ;;
*osf*) this_os=tru64 ;;
*solaris*) this_os=solaris ;;
esac
case "$host_cpu" in
i386|i486|i586|i686|k7) this_cpu=x86 ;;
alpha) this_cpu=alpha ;;
mips) this_cpu=mips ;;
powerpc|ppc) this_cpu=ppc ;;
esac
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])
;;
esac
dnl --------------------- operating system specific flags (port from sys/*)
dnl ----- AIX specific -----
if test x"$this_os" = "xaix"; then
AC_MSG_RESULT([ * AIX specific configuration])
AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
dnl This is probably a lie; AIX 4.3 supports a 64-bit long
dnl compilation environment. It's enough to get things defined
dnl right in endian.h provided that long long is supported, though.
AC_DEFINE(HAVE_32BIT_LONGS, 1, [Define if the data type long has 32 bit])
fi
dnl ----- FreeBSD specific -----
if test x"$this_os" = "xfreebsd"; then
AC_MSG_RESULT([ * FreeBSD specific configuration])
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
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(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])
AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
fi
dnl ----- IRIX specific -----
if test x"$this_os" = "xirix"; then
AC_MSG_RESULT([ * IRIX specific configuration])
AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
fi
dnl ----- Linux specific -----
if test x"$this_os" = "xlinux"; then
AC_MSG_RESULT([ * Linux specific configuration])
dnl ----- kernel 2.6 changed struct at_addr to atalk_addr
AC_MSG_CHECKING([for struct atalk_addr])
dnl AC_COMPILE_IFELSE([
AC_TRY_COMPILE([
#include
#include
#include
struct atalk_addr foo;
],
[ ], [
ac_have_atalk_addr=yes
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
if test "x$ac_have_atalk_addr" = "xyes"; then
AC_DEFINE(HAVE_ATALK_ADDR, 1, [set if struct at_addr is called atalk_addr])
fi
dnl ----- check if we need the quotactl wrapper
# AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
# AC_CHECK_FUNC(quotactl,,
# AC_DEFINE(NEED_QUOTACTL_WRAPPER, 1, [Define if the quotactl wrapper is needed])
# AC_MSG_RESULT([enabling quotactl wrapper])
# )
# For quotas on Linux XFS filesystems
# For linux > 2.5.56
AC_CHECK_HEADERS(linux/dqblk_xfs.h,,
[AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h)
AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h)]
)
dnl ----- as far as I can tell, dbtob always does the wrong thing
dnl ----- on every single version of linux I've ever played with.
dnl ----- see etc/afpd/quota.c
AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken])
dnl ----- Linux/alpha specific -----
if test x"$this_cpu" = "xalpha"; then
AC_MSG_RESULT([enabling gcc memcpy bug workaround])
AC_DEFINE(HAVE_GCC_MEMCPY_BUG, 1, [Define if memcpy is buggy])
fi
need_dash_r=no
fi
dnl ----- Mac OSX specific -----
if test x"$this_os" = "xmacosx"; then
AC_MSG_RESULT([ * Mac OSX specific configuration])
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
AC_DEFINE(HAVE_2ARG_DBTOB, 1, [Define if dbtob takes two arguments])
dnl AC_DEFINE(NO_DLFCN_H)
AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
AC_DEFINE(NO_QUOTA_SUPPORT, 1, [Define if Quota support should be disabled])
AC_DEFINE(MACOSX_SERVER, 1, [Define if compiling for MacOS X Server])
fi
dnl ----- NetBSD specific -----
if test x"$this_os" = "xnetbsd"; then
AC_MSG_RESULT([ * NetBSD specific configuration])
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
AC_DEFINE(NETBSD, 1, [Define if OS is NetBSD])
AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EFTYPE, errno returned by open with O_NOFOLLOW)
CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS"
need_dash_r=yes
dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
fi
dnl ----- OpenBSD specific -----
if test x"$this_os" = "xopenbsd"; then
AC_MSG_RESULT([ * OpenBSD specific configuration])
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
dnl ----- OpenBSD does not have crypt.h, uses unistd.h -----
AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled])
AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
fi
dnl ----- Solaris specific -----
if test x"$this_os" = "xsolaris"; then
AC_MSG_RESULT([ * Solaris specific configuration])
AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
AC_DEFINE(_XOPEN_SOURCE, 600, [Solaris compilation environment])
AC_DEFINE(__EXTENSIONS__, 1, [Solaris compilation environment])
CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
need_dash_r=yes
sysv_style=solaris
solaris_module=no
AC_MSG_CHECKING([if we can build Solaris kernel module])
if test -x /usr/ccs/bin/ld && test x"$netatalk_cv_ddp_enabled" = x"yes" ; then
solaris_module=yes
fi
AC_MSG_RESULT([$solaris_module])
COMPILE_64BIT_KMODULE=no
KCFLAGS=""
KLDFLAGS=""
COMPILE_KERNEL_GCC=no
if test "$solaris_module" = "yes"; then
dnl Solaris kernel module stuff
AC_MSG_CHECKING([if we have to build a 64bit kernel module])
# check for isainfo, if not found it has to be a 32 bit kernel (<=2.6)
if test -x /usr/bin/isainfo; then
# check for 64 bit platform
if isainfo -kv | grep '^64-bit'; then
COMPILE_64BIT_KMODULE=yes
fi
fi
AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
if test "${GCC}" = yes; then
COMPILE_KERNEL_GCC=yes
if test "$COMPILE_64BIT_KMODULE" = yes; then
AC_MSG_CHECKING([if we can build a 64bit kernel module])
case `$CC --version 2>/dev/null` in
[[12]].* | 3.0.*)
COMPILE_64BIT_KMODULE=no
COMPILE_KERNEL_GCC=no
solaris_module=no;;
*)
# use for 64 bit
KCFLAGS="-m64"
#KLDFLAGS="-melf64_sparc"
KLDFLAGS="-64";;
esac
AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
else
KCFLAGS=""
KLDFLAGS=""
fi
KCFLAGS="$KCFLAGS -D_KERNEL -Wall -Wstrict-prototypes"
else
if test "$COMPILE_64BIT_KMODULE" = yes; then
# use Sun CC (for a 64-bit kernel, uncomment " -xarch=v9 -xregs=no%appl ")
KCFLAGS="-xarch=v9 -xregs=no%appl"
KLDFLAGS="-64"
else
KCFLAGS=""
KLDFLAGS=""
fi
KCFLAGS="-D_KERNEL $KCFLAGS -mno-app-regs -munaligned-doubles -fpcc-struct-return"
fi
AC_CACHE_CHECK([for timeout_id_t],netatalk_cv_HAVE_TIMEOUT_ID_T,[
AC_TRY_LINK([\
#include
#include ],
[\
timeout_id_t dummy;
],
netatalk_cv_HAVE_TIMEOUT_ID_T=yes,netatalk_cv_HAVE_TIMEOUT_ID_T=no,netatalk_cv_HAVE_TIMEOUT_ID_T=cross)])
AC_DEFINE(HAVE_TIMEOUT_ID_T, test x"$netatalk_cv_HAVE_TIMEOUT_ID" = x"yes", [define for timeout_id_t])
fi
AC_SUBST(COMPILE_KERNEL_GCC)
AC_SUBST(COMPILE_64BIT_KMODULE)
AC_SUBST(KCFLAGS)
AC_SUBST(KLDFLAGS)
fi
dnl ----- Tru64 specific -----
if test x"$this_os" = "xtru64"; then
AC_MSG_RESULT([ * Tru64 specific configuration])
AC_DEFINE(NO_DDP, 1, [Define if DDP should be disabled])
AC_DEFINE(HAVE_64BIT_LONGS, 1, [Define if the data type long has 64 bit])
dnl AC_DEFINE(USE_MOUNT_H)
AC_DEFINE(USE_OLD_RQUOTA, 1, [Define to use old rquota])
dnl AC_DEFINE(USE_UFS_QUOTA_H)
AC_DEFINE(TRU64, 1, [Define on Tru64 platforms])
AC_DEFINE(_OSF_SOURCE, 1, [Define if the *passwd UAMs should be used])
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Define for Berkeley DB 4])
AC_CHECK_LIB(security,set_auth_parameters)
CFLAGS="-I\$(top_srcdir)/sys/tru64 $CFLAGS"
need_dash_r=no
sysv_style=tru64
fi
dnl ------ Check for sendfile() --------
netatalk_cv_search_sendfile=yes
AC_ARG_ENABLE(sendfile,
[ --disable-sendfile disable sendfile syscall],
[if test x"$enableval" = x"no"; then
netatalk_cv_search_sendfile=no
fi]
)
if test x"$netatalk_cv_search_sendfile" = x"yes"; then
case "$host_os" in
*linux*)
AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available])
AC_CHECK_FUNC([sendfile], [netatalk_cv_HAVE_SENDFILE=yes])
;;
*solaris*)
AC_DEFINE(SENDFILE_FLAVOR_SOLARIS, 1, [Solaris sendfile()])
AC_SEARCH_LIBS(sendfile, sendfile)
AC_CHECK_FUNC([sendfile], [netatalk_cv_HAVE_SENDFILE=yes])
;;
*freebsd*)
AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
AC_CHECK_FUNC([sendfile], [netatalk_cv_HAVE_SENDFILE=yes])
;;
*)
;;
esac
if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then
AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used])
fi
fi
dnl -- check for libgcrypt, if found enables DHX UAM
AM_PATH_LIBGCRYPT([1:1.2.3],[neta_cv_compile_dhx2=yes
neta_cv_have_libgcrypt=yes
AC_MSG_NOTICE([Enabling DHX2 UAM])
AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if the DHX2 modules should be built with libgcrypt])
AC_DEFINE(UAM_DHX2, 1, [Define if the DHX2 UAM modules should be compiled])
])
dnl -- look for openssl, if found enables DHX UAM and Randnum UAM
AC_PATH_SSL
dnl Check for Berkeley DB library
if test "x$bdb_required" = "xyes"; then
AC_PATH_BDB(, [
AC_MSG_RESULT([])
AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.])
AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.])
AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure])
AC_MSG_RESULT([your linker is configured to check for libraries there.])
AC_MSG_ERROR([Berkeley DB library required but not found!])
])
fi
dnl -- check for crypt
AC_CRYPT
dnl --------------------- check for building PGP UAM module
AC_MSG_CHECKING([whether the PGP UAM should be build])
AC_ARG_ENABLE(pgp-uam,
[ --enable-pgp-uam enable build of PGP UAM module],[
if test "$enableval" = "yes"; then
if test "x$neta_cv_have_openssl" = "xyes"; then
AC_DEFINE(UAM_PGP, 1, [Define if the PGP UAM module should be compiled])
compile_pgp=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
],[
AC_MSG_RESULT([no])
]
)
dnl --------------------- check for building Kerberos v4 UAM module
AC_MSG_CHECKING([whether the Kerberos IV UAM should be build])
AC_ARG_ENABLE(krb4-uam,
[ --enable-krb4-uam enable build of Kerberos v4 UAM module],[
if test "$enableval" = "yes"; then
AC_DEFINE(UAM_KRB4, 1, [Define if the Kerberos 4 UAM module should be compiled])
compile_kerberos=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
],[
AC_MSG_RESULT([no])
]
)
dnl --------------------- check for building Kerberos V UAM module
netatalk_cv_build_krb5_uam=no
AC_ARG_ENABLE(krbV-uam,
[ --enable-krbV-uam enable build of Kerberos V UAM module],
[
if test x"$enableval" = x"yes"; then
NETATALK_GSSAPI_CHECK([
netatalk_cv_build_krb5_uam=yes
],[
AC_MSG_ERROR([need GSSAPI to build Kerberos V UAM])
])
fi
]
)
AC_MSG_CHECKING([whether Kerberos V UAM should be build])
if test x"$netatalk_cv_build_krb5_uam" = x"yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AM_CONDITIONAL(USE_GSSAPI, test x"$netatalk_cv_build_krb5_uam" = x"yes")
dnl --------------------- overwrite the config files . . . or not.
AC_MSG_CHECKING([whether configuration files should be overwritten])
AC_ARG_ENABLE(overwrite,
[ --enable-overwrite overwrite configuration files during installation],
[OVERWRITE_CONFIG="${enable_overwrite}"],
[OVERWRITE_CONFIG="no"]
)
AC_MSG_RESULT([$OVERWRITE_CONFIG])
dnl --------------------- check for LDAP support, for client-side ACL visibility
AC_MSG_CHECKING(for LDAP (necessary for client-side ACL visibility))
AC_ARG_WITH(ldap,
[AS_HELP_STRING([--with-ldap],
[LDAP support (default=auto)])],
[ case "$withval" in
yes|no)
with_ldap="$withval"
;;
*)
with_ldap=auto
;;
esac ])
AC_MSG_RESULT($with_ldap)
if test x"$with_ldap" != x"no" ; then
AC_CHECK_HEADER([ldap.h], with_ldap=yes,
[ if test x"$with_ldap" = x"yes" ; then
AC_MSG_ERROR([Missing LDAP headers])
fi
with_ldap=no
])
AC_CHECK_LIB(ldap, ldap_init, with_ldap=yes,
[ if test x"$with_ldap" = x"yes" ; then
AC_MSG_ERROR([Missing LDAP library])
fi
with_ldap=no
])
fi
if test x"$with_ldap" = x"yes"; then
AC_DEFINE(HAVE_LDAP,1,[Whether LDAP is available])
fi
dnl --------------------- check for ACL support
AC_MSG_CHECKING(whether to support ACLs)
AC_ARG_WITH(acls,
[AS_HELP_STRING([--with-acls],
[Include ACL support (default=auto)])],
[ case "$withval" in
yes|no)
with_acl_support="$withval"
;;
*)
with_acl_support=auto
;;
esac ],
[with_acl_support=auto])
AC_MSG_RESULT($with_acl_support)
if test x"$with_acl_support" = x"no"; then
AC_MSG_RESULT(Disabling ACL support)
AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in])
else
with_acl_support=yes
fi
if test x"$with_acl_support" = x"yes" ; then
AC_MSG_NOTICE(checking whether ACL support is available:)
case "$host_os" in
*sysv5*)
AC_MSG_NOTICE(Using UnixWare ACLs)
AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available])
;;
*solaris*)
AC_MSG_NOTICE(Using solaris ACLs)
AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available])
ACL_LIBS="$ACL_LIBS -lsec"
;;
*hpux*)
AC_MSG_NOTICE(Using HPUX ACLs)
AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available])
;;
*irix*)
AC_MSG_NOTICE(Using IRIX ACLs)
AC_DEFINE(HAVE_IRIX_ACLS,1,[Whether IRIX ACLs are available])
;;
*aix*)
AC_MSG_NOTICE(Using AIX ACLs)
AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available])
;;
*osf*)
AC_MSG_NOTICE(Using Tru64 ACLs)
AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available])
ACL_LIBS="$ACL_LIBS -lpacl"
;;
*darwin*)
AC_MSG_NOTICE(ACLs on Darwin currently not supported)
AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
;;
*)
AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
case "$host_os" in
*linux*)
AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
;;
esac
AC_CACHE_CHECK([for POSIX ACL support],netatalk_cv_HAVE_POSIX_ACLS,[
acl_LIBS=$LIBS
LIBS="$LIBS $ACL_LIBS"
AC_TRY_LINK([
#include
#include
],[
acl_t acl;
int entry_id;
acl_entry_t *entry_p;
return acl_get_entry(acl, entry_id, entry_p);
],
[netatalk_cv_HAVE_POSIX_ACLS=yes],
[netatalk_cv_HAVE_POSIX_ACLS=no
with_acl_support=no])
LIBS=$acl_LIBS
])
if test x"$netatalk_cv_HAVE_POSIX_ACLS" = x"yes"; then
AC_MSG_NOTICE(Using POSIX ACLs)
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
AC_CACHE_CHECK([for acl_get_perm_np],netatalk_cv_HAVE_ACL_GET_PERM_NP,[
acl_LIBS=$LIBS
LIBS="$LIBS $ACL_LIBS"
AC_TRY_LINK([
#include
#include
],[
acl_permset_t permset_d;
acl_perm_t perm;
return acl_get_perm_np(permset_d, perm);
],
[netatalk_cv_HAVE_ACL_GET_PERM_NP=yes],
[netatalk_cv_HAVE_ACL_GET_PERM_NP=no])
LIBS=$acl_LIBS
])
if test x"$netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
fi
AC_CACHE_CHECK([for acl_from_mode], netatalk_cv_HAVE_ACL_FROM_MODE,[
acl_LIBS=$LIBS
LIBS="$LIBS $ACL_LIBS"
AC_CHECK_FUNCS(acl_from_mode,
[netatalk_cv_HAVE_ACL_FROM_MODE=yes],
[netatalk_cv_HAVE_ACL_FROM_MODE=no])
LIBS=$acl_LIBS
])
if test x"netatalk_cv_HAVE_ACL_FROM_MODE" = x"yes"; then
AC_DEFINE(HAVE_ACL_FROM_MODE,1,[Whether acl_from_mode() is available])
fi
else
AC_MSG_NOTICE(ACL support is not avaliable)
AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
fi
;;
esac
fi
if test x"$with_acl_support" = x"yes" ; then
AC_CHECK_HEADERS([acl/libacl.h])
AC_DEFINE(HAVE_ACLS,1,[Whether ACLs support is available])
AC_SUBST(ACL_LIBS)
fi
dnl --------------------- check for Extended Attributes support
neta_cv_eas="ad"
neta_cv_eas_sys_found=no
neta_cv_eas_sys_not_found=no
AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h sys/ea.h)
case "$this_os" in
*osf*)
AC_SEARCH_LIBS(getproplist, [proplist])
AC_CHECK_FUNCS([getproplist fgetproplist setproplist fsetproplist],
[neta_cv_eas_sys_found=yes],
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([delproplist fdelproplist add_proplist_entry get_proplist_entry],,
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([sizeof_proplist_entry],,
[neta_cv_eas_sys_not_found=yes])
;;
*solaris*)
AC_CHECK_FUNCS([attropen],
[neta_cv_eas_sys_found=yes],
[neta_cv_eas_sys_not_found=yes])
;;
'freebsd')
AC_CHECK_FUNCS([extattr_delete_fd extattr_delete_file extattr_delete_link],
[neta_cv_eas_sys_found=yes],
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([extattr_get_fd extattr_get_file extattr_get_link],,
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([extattr_list_fd extattr_list_file extattr_list_link],,
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([extattr_set_fd extattr_set_file extattr_set_link],,
[neta_cv_eas_sys_not_found=yes])
;;
*freebsd4* | *dragonfly* )
AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
;;
*)
AC_SEARCH_LIBS(getxattr, [attr])
if test "x$neta_cv_eas_sys_found" != "xyes" ; then
AC_CHECK_FUNCS([getxattr lgetxattr fgetxattr listxattr llistxattr],
[neta_cv_eas_sys_found=yes],
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([flistxattr removexattr lremovexattr fremovexattr],,
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([setxattr lsetxattr fsetxattr],,
[neta_cv_eas_sys_not_found=yes])
fi
if test "x$neta_cv_eas_sys_found" != "xyes" ; then
AC_CHECK_FUNCS([getea fgetea lgetea listea flistea llistea],
[neta_cv_eas_sys_found=yes],
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([removeea fremoveea lremoveea setea fsetea lsetea],,
[neta_cv_eas_sys_not_found=yes])
fi
if test "x$neta_cv_eas_sys_found" != "xyes" ; then
AC_CHECK_FUNCS([attr_get attr_list attr_set attr_remove],,
[neta_cv_eas_sys_not_found=yes])
AC_CHECK_FUNCS([attr_getf attr_listf attr_setf attr_removef],,
[neta_cv_eas_sys_not_found=yes])
fi
;;
esac
# Do xattr functions take additional options like on Darwin?
if test x"$ac_cv_func_getxattr" = x"yes" ; then
AC_CACHE_CHECK([whether xattr interface takes additional options], smb_attr_cv_xattr_add_opt, [
old_LIBS=$LIBS
LIBS="$LIBS $ACL_LIBS"
AC_TRY_COMPILE([
#include
#if HAVE_ATTR_XATTR_H
#include
#elif HAVE_SYS_XATTR_H
#include
#endif
],[
getxattr(0, 0, 0, 0, 0, 0);
],
[smb_attr_cv_xattr_add_opt=yes],
[smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS])
])
if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
AC_DEFINE(XATTR_ADD_OPT, 1, [xattr functions have additional options])
fi
fi
if test "x$neta_cv_eas_sys_found" = "xyes" ; then
if test "x$neta_cv_eas_sys_not_found" != "xyes" ; then
neta_cv_eas="$neta_cv_eas | sys"
fi
fi
AC_DEFINE_UNQUOTED(EA_MODULES,["$neta_cv_eas"],[Available Extended Attributes modules])
dnl --------------------- Check if realpath() takes NULL
AC_CACHE_CHECK([if the realpath function allows a NULL argument],
neta_cv_REALPATH_TAKES_NULL, [
AC_TRY_RUN([
#include
#include
#include
void exit_on_core(int ignored) {
exit(1);
}
main() {
char *newpath;
signal(SIGSEGV, exit_on_core);
newpath = realpath("/tmp", NULL);
exit((newpath != NULL) ? 0 : 1);
}],
neta_cv_REALPATH_TAKES_NULL=yes,
neta_cv_REALPATH_TAKES_NULL=no,
neta_cv_REALPATH_TAKES_NULL=cross
)
]
)
if test x"$neta_cv_REALPATH_TAKES_NULL" = x"yes"; then
AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL])
fi
dnl --------------------- Netatalk Webmin
NETATALK_WEBMIN
dnl --------------------- last minute substitutions
AC_SUBST(LIBS)
AC_SUBST(CFLAGS)
AC_SUBST(OVERWRITE_CONFIG)
AM_CONDITIONAL(SOLARIS_MODULE, test x$solaris_module = xyes)
AM_CONDITIONAL(COMPILE_TIMELORD, test x$compile_timelord = xyes)
AM_CONDITIONAL(COMPILE_A2BOOT, test x$compile_a2boot = xyes)
AM_CONDITIONAL(HAVE_LIBGCRYPT, test x$neta_cv_have_libgcrypt = xyes)
AM_CONDITIONAL(HAVE_OPENSSL, test x$neta_cv_have_openssl = xyes)
AM_CONDITIONAL(HAVE_ACLS, test x"$with_acl_support" = x"yes")
AM_CONDITIONAL(HAVE_LDAP, test x"$with_ldap" = x"yes")
AM_CONDITIONAL(USE_DHX, test x$neta_cv_compile_dhx = xyes)
AM_CONDITIONAL(USE_DHX2, test x$neta_cv_compile_dhx2 = xyes)
AM_CONDITIONAL(USE_RANDNUM, test x$neta_cv_have_openssl = xyes)
AM_CONDITIONAL(USE_KERBEROS, test x$compile_kerberos = xyes)
AM_CONDITIONAL(USE_PAM_SO, test x$use_pam_so = xyes)
AM_CONDITIONAL(USE_PAM, test x$netatalk_cv_install_pam = xyes)
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_SYSV, test x$sysv_style = xredhat-sysv)
AM_CONDITIONAL(USE_SUSE_SYSV, test x$sysv_style = xsuse-sysv)
AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
AM_CONDITIONAL(USE_SOLARIS, test x$sysv_style = xsolaris)
AM_CONDITIONAL(USE_GENTOO, test x$sysv_style = xgentoo)
AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian)
AM_CONDITIONAL(USE_SYSTEMD, test x$sysv_style = xsystemd || test x$sysv_style = xredhat-systemd || test x$sysv_style = xsuse-systemd)
AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = x)
AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes)
AM_CONDITIONAL(USE_APPLETALK, test x$netatalk_cv_ddp_enabled = xyes)
AM_CONDITIONAL(HAVE_ATFUNCS, test x"$ac_neta_haveatfuncs" = x"yes")
dnl --------------------- generate files
AC_OUTPUT([Makefile
bin/Makefile
bin/ad/Makefile
bin/adv1tov2/Makefile
bin/aecho/Makefile
bin/afppasswd/Makefile
bin/cnid/Makefile
bin/cnid/cnid2_create
bin/getzones/Makefile
bin/megatron/Makefile
bin/misc/Makefile
bin/nbp/Makefile
bin/pap/Makefile
bin/psorder/Makefile
bin/uniconv/Makefile
config/Makefile
config/pam/Makefile
contrib/Makefile
contrib/macusers/Makefile
contrib/macusers/macusers
contrib/misc/Makefile
contrib/printing/Makefile
contrib/shell_utils/Makefile
contrib/shell_utils/apple_dump
contrib/shell_utils/asip-status.pl
contrib/timelord/Makefile
contrib/a2boot/Makefile
distrib/Makefile
distrib/config/Makefile
distrib/config/netatalk-config
distrib/initscripts/Makefile
distrib/m4/Makefile
distrib/systemd/Makefile
doc/Makefile
etc/Makefile
etc/afpd/Makefile
etc/atalkd/Makefile
etc/cnid_dbd/Makefile
etc/uams/Makefile
etc/uams/uams_krb4/Makefile
etc/papd/Makefile
etc/psf/Makefile
include/Makefile
include/atalk/Makefile
libatalk/Makefile
libatalk/acl/Makefile
libatalk/adouble/Makefile
libatalk/asp/Makefile
libatalk/atp/Makefile
libatalk/bstring/Makefile
libatalk/cnid/Makefile
libatalk/cnid/cdb/Makefile
libatalk/cnid/last/Makefile
libatalk/cnid/dbd/Makefile
libatalk/cnid/tdb/Makefile
libatalk/compat/Makefile
libatalk/dsi/Makefile
libatalk/nbp/Makefile
libatalk/netddp/Makefile
libatalk/util/Makefile
libatalk/tdb/Makefile
libatalk/unicode/Makefile
libatalk/unicode/charsets/Makefile
libatalk/vfs/Makefile
macros/Makefile
man/Makefile
man/man1/Makefile
man/man3/Makefile
man/man4/Makefile
man/man5/Makefile
man/man8/Makefile
sys/Makefile
sys/generic/Makefile
sys/generic/sys/Makefile
sys/netatalk/Makefile
sys/netbsd/Makefile
sys/netbsd/netatalk/Makefile
sys/solaris/Makefile
sys/sunos/Makefile
sys/ultrix/Makefile
test/Makefile
test/afpd/Makefile
],
[chmod a+x distrib/config/netatalk-config contrib/shell_utils/apple_*]
)
AC_NETATALK_LIBS_SUMMARY
AC_NETATALK_CONFIG_SUMMARY
netatalk-2.2.2/ltmain.sh0000644000175200017500000060646710752724413012113 00000000000000# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
# 2007, 2008 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
basename="s,^.*/,,g"
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
# the _XPG environment variable is not equal to 1 (one), the special
# positional parameter $0, within a function call, is the name of the
# function.
progpath="$0"
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
modename="$progname"
# Global variables:
EXIT_SUCCESS=0
EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION="1.5.26 Debian 1.5.26-1ubuntu1"
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
else
# Restart under the correct shell, and then maybe $echo will work.
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat <&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit $EXIT_FAILURE
fi
# Global variables.
mode=$default_mode
nonopt=
prev=
prevopt=
run=
show="$echo"
show_help=
execute_dlfiles=
duplicate_deps=no
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0
#####################################
# Shell function definitions:
# This seems to be the best place for them
# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible. If
# given, STRING is the basename for that directory.
func_mktempdir ()
{
my_template="${TMPDIR-/tmp}/${1-$progname}"
if test "$run" = ":"; then
# Return a directory name, but don't create it in dry-run mode
my_tmpdir="${my_template}-$$"
else
# If mktemp works, use that first and foremost
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
if test ! -d "$my_tmpdir"; then
# Failing that, at least try and use $RANDOM to avoid a race
my_tmpdir="${my_template}-${RANDOM-0}$$"
save_mktempdir_umask=`umask`
umask 0077
$mkdir "$my_tmpdir"
umask $save_mktempdir_umask
fi
# If we're not in dry-run mode, bomb out on failure
test -d "$my_tmpdir" || {
$echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
exit $EXIT_FAILURE
}
fi
$echo "X$my_tmpdir" | $Xsed
}
# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
func_win32_libid ()
{
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
*ar\ archive\ import\ library*) # definitely import
win32_libid_type="x86 archive import"
;;
*ar\ archive*) # could be an import, or static
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
$SED -n -e '1,100{
/ I /{
s,.*,import,
p
q
}
}'`
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
esac
fi
;;
*DLL*)
win32_libid_type="x86 DLL"
;;
*executable*) # but shell scripts are "executable" too...
case $win32_fileres in
*MS\ Windows\ PE\ Intel*)
win32_libid_type="x86 DLL"
;;
esac
;;
esac
$echo $win32_libid_type
}
# func_infer_tag arg
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
CC_quoted="$CC_quoted $arg"
done
case $@ in
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when configure was run.
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
# Blanks at the start of $base_compile will cause this to fail
# if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
CC_quoted="$CC_quoted $arg"
done
case "$@ " in
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
$echo "$modename: unable to infer tagged configuration"
$echo "$modename: specify a tag with \`--tag'" 1>&2
exit $EXIT_FAILURE
# else
# $echo "$modename: using $tagname tagged configuration"
fi
;;
esac
fi
}
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
fi
}
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
my_xlib=""
my_xabs=""
my_xdir=""
my_status=""
$show "${rm}r $my_gentop"
$run ${rm}r "$my_gentop"
$show "$mkdir $my_gentop"
$run $mkdir "$my_gentop"
my_status=$?
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
exit $my_status
fi
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xlib_u=$my_xlib
while :; do
case " $extracted_archives " in
*" $my_xlib_u "*)
extracted_serial=`expr $extracted_serial + 1`
my_xlib_u=lt$extracted_serial-$my_xlib ;;
*) break ;;
esac
done
extracted_archives="$extracted_archives $my_xlib_u"
my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
exit_status=$?
if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
exit $exit_status
fi
case $host in
*-darwin*)
$show "Extracting $my_xabs"
# Do not bother doing anything if just a dry run
if test -z "$run"; then
darwin_orig_dir=`pwd`
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
$show "$darwin_base_archive has multiple architectures $darwin_arches"
for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
cd "$darwin_curdir"
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist
${rm}r unfat-$$
cd "$darwin_orig_dir"
else
cd "$darwin_orig_dir"
func_extract_an_archive "$my_xdir" "$my_xabs"
fi # $darwin_arches
fi # $run
;;
*)
func_extract_an_archive "$my_xdir" "$my_xabs"
;;
esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives_result="$my_oldobjs"
}
# End of Shell function definitions
#####################################
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
disable_libs=no
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
arg="$1"
shift
case $arg in
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
execute_dlfiles)
execute_dlfiles="$execute_dlfiles $arg"
;;
tag)
tagname="$arg"
preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters
case $tagname in
*[!-_A-Za-z0-9,/]*)
$echo "$progname: invalid tag name: $tagname" 1>&2
exit $EXIT_FAILURE
;;
esac
case $tagname in
CC)
# Don't test for the "default" C tag, as we know, it's there, but
# not specially marked.
;;
*)
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
taglist="$taglist $tagname"
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
else
$echo "$progname: ignoring unknown tag $tagname" 1>&2
fi
;;
esac
;;
*)
eval "$prev=\$arg"
;;
esac
prev=
prevopt=
continue
fi
# Have we seen a non-optional argument yet?
case $arg in
--help)
show_help=yes
;;
--version)
echo "\
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
--config)
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
# Now print the configurations for the tags.
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
exit $?
;;
--debug)
$echo "$progname: enabling shell trace mode"
set -x
preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
run=:
;;
--features)
$echo "host: $host"
if test "$build_libtool_libs" = yes; then
$echo "enable shared libraries"
else
$echo "disable shared libraries"
fi
if test "$build_old_libs" = yes; then
$echo "enable static libraries"
else
$echo "disable static libraries"
fi
exit $?
;;
--finish) mode="finish" ;;
--mode) prevopt="--mode" prev=mode ;;
--mode=*) mode="$optarg" ;;
--preserve-dup-deps) duplicate_deps="yes" ;;
--quiet | --silent)
show=:
preserve_args="$preserve_args $arg"
;;
--tag)
prevopt="--tag"
prev=tag
preserve_args="$preserve_args --tag"
;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
prev=tag
preserve_args="$preserve_args --tag"
;;
-dlopen)
prevopt="-dlopen"
prev=execute_dlfiles
;;
-*)
$echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
;;
*)
nonopt="$arg"
break
;;
esac
done
if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
case $disable_libs in
no)
;;
shared)
build_libtool_libs=no
build_old_libs=yes
;;
static)
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
;;
esac
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
exec_cmd=
if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
for arg
do
case $arg in
-c)
mode=compile
break
;;
esac
done
;;
*db | *dbx | *strace | *truss)
mode=execute
;;
*install*|cp|mv)
mode=install
;;
*rm)
mode=uninstall
;;
*)
# If we have no mode, but dlfiles were specified, then do execute mode.
test -n "$execute_dlfiles" && mode=execute
# Just use the default operation mode.
if test -z "$mode"; then
if test -n "$nonopt"; then
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
else
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
fi
fi
;;
esac
fi
# Only execute mode is allowed to have -dlopen flags.
if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
generic_help="$help"
help="Try \`$modename --help --mode=$mode' for more information."
# These modes are in order of execution frequency so that they run quickly.
case $mode in
# libtool compile mode
compile)
modename="$modename: compile"
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
later=
for arg
do
case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
lastarg="$arg"
arg_mode=normal
;;
target )
libobj="$arg"
arg_mode=normal
continue
;;
normal )
# Accept any command-line options.
case $arg in
-o)
if test -n "$libobj" ; then
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
exit $EXIT_FAILURE
fi
arg_mode=target
continue
;;
-static | -prefer-pic | -prefer-non-pic)
later="$later $arg"
continue
;;
-no-suppress)
suppress_opt=no
continue
;;
-Xcompiler)
arg_mode=arg # the next one goes into the "base_compile" arg list
continue # The current "srcfile" will either be retained or
;; # replaced later. I would guess that would be a bug.
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
lastarg=
save_ifs="$IFS"; IFS=','
for arg in $args; do
IFS="$save_ifs"
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
lastarg="$lastarg $arg"
done
IFS="$save_ifs"
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
# Add the arguments to base_compile.
base_compile="$base_compile $lastarg"
continue
;;
* )
# Accept the current argument as the source file.
# The previous "srcfile" becomes the current argument.
#
lastarg="$srcfile"
srcfile="$arg"
;;
esac # case $arg
;;
esac # case $arg_mode
# Aesthetically quote the previous argument.
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, and some SunOS ksh mistreat backslash-escaping
# in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
base_compile="$base_compile $lastarg"
done # for arg
case $arg_mode in
arg)
$echo "$modename: you must specify an argument for -Xcompile"
exit $EXIT_FAILURE
;;
target)
$echo "$modename: you must specify a target with \`-o'" 1>&2
exit $EXIT_FAILURE
;;
*)
# Get the name of the library object.
[ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
xform='[cCFSifmso]'
case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
*.ads) xform=ads ;;
*.asm) xform=asm ;;
*.c++) xform=c++ ;;
*.cc) xform=cc ;;
*.ii) xform=ii ;;
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
*.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
*.obj) xform=obj ;;
*.sx) xform=sx ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
case $libobj in
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit $EXIT_FAILURE
;;
esac
func_infer_tag $base_compile
for arg in $later; do
case $arg in
-static)
build_old_libs=yes
continue
;;
-prefer-pic)
pic_mode=yes
continue
;;
-prefer-non-pic)
pic_mode=no
continue
;;
esac
done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qlibobj="\"$qlibobj\"" ;;
esac
test "X$libobj" != "X$qlibobj" \
&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
xdir=
else
xdir=$xdir/
fi
lobj=${xdir}$objdir/$objname
if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
removelist="$obj $lobj $libobj ${libobj}T"
else
removelist="$lobj $libobj ${libobj}T"
fi
$run $rm $removelist
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
cygwin* | mingw* | pw32* | os2*)
pic_mode=default
;;
esac
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
# Calculate the filename of the output object if compiler does
# not support -o with -c
if test "$compiler_c_o" = no; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else
output_obj=
need_locks=no
lockfile=
fi
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
until $run ln "$progpath" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
$echo "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
$echo "$srcfile" > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T"
# Create a libtool object file (analogous to a ".la" file),
# but don't create it if we're doing a dry run.
test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then
$echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
but it should contain:
$srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
$show "$mv $output_obj $lobj"
if $run $mv $output_obj $lobj; then :
else
error=$?
$run $rm $removelist
exit $error
fi
fi
# Append the name of the PIC object to the libtool object file.
test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then
$echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
but it should contain:
$srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
# Just move the object if needed
if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
$show "$mv $output_obj $obj"
if $run $mv $output_obj $obj; then :
else
error=$?
$run $rm $removelist
exit $error
fi
fi
# Append the name of the non-PIC object the libtool object file.
# Only append if the libtool object file exists.
test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
;;
-static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
;;
-static-libtool-libs)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
;;
esac
build_libtool_libs=no
build_old_libs=yes
break
;;
esac
done
# See if our shared archives depend on static archives.
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
while test "$#" -gt 0; do
arg="$1"
shift
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
*) qarg=$arg ;;
esac
libtool_args="$libtool_args $qarg"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
output)
compile_command="$compile_command @OUTPUT@"
finalize_command="$finalize_command @OUTPUT@"
;;
esac
case $prev in
dlfiles|dlprefiles)
if test "$preload" = no; then
# Add the symbol object into the linking commands.
compile_command="$compile_command @SYMFILE@"
finalize_command="$finalize_command @SYMFILE@"
preload=yes
fi
case $arg in
*.la | *.lo) ;; # We handle these cases below.
force)
if test "$dlself" = no; then
dlself=needless
export_dynamic=yes
fi
prev=
continue
;;
self)
if test "$prev" = dlprefiles; then
dlself=yes
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
dlself=yes
else
dlself=needless
export_dynamic=yes
fi
prev=
continue
;;
*)
if test "$prev" = dlfiles; then
dlfiles="$dlfiles $arg"
else
dlprefiles="$dlprefiles $arg"
fi
prev=
continue
;;
esac
;;
expsyms)
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
exit $EXIT_FAILURE
fi
prev=
continue
;;
expsyms_regex)
export_symbols_regex="$arg"
prev=
continue
;;
inst_prefix)
inst_prefix_dir="$arg"
prev=
continue
;;
precious_regex)
precious_files_regex="$arg"
prev=
continue
;;
release)
release="-$arg"
prev=
continue
;;
objectlist)
if test -f "$arg"; then
save_arg=$arg
moreargs=
for fil in `cat $save_arg`
do
# moreargs="$moreargs $fil"
arg=$fil
# A libtool-controlled object.
# Check to see that this really is a libtool object.
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
pic_object=
non_pic_object=
# Read the .lo file
# If there is no directory component, then add one.
case $arg in
*/* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
if test -z "$pic_object" || \
test -z "$non_pic_object" ||
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit $EXIT_FAILURE
fi
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
pic_object="$xdir$pic_object"
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
dlfiles="$dlfiles $pic_object"
prev=
continue
else
# If libtool objects are unsupported, then we need to preload.
prev=dlprefiles
fi
fi
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
dlprefiles="$dlprefiles $pic_object"
prev=
fi
# A PIC object.
libobjs="$libobjs $pic_object"
arg="$pic_object"
fi
# Non-PIC object.
if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
non_pic_objects="$non_pic_objects $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
non_pic_object="$pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit $EXIT_FAILURE
else
# Dry-run case.
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
libobjs="$libobjs $pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
fi
done
else
$echo "$modename: link input file \`$save_arg' does not exist"
exit $EXIT_FAILURE
fi
arg=$save_arg
prev=
continue
;;
rpath | xrpath)
# We need an absolute path.
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit $EXIT_FAILURE
;;
esac
if test "$prev" = rpath; then
case "$rpath " in
*" $arg "*) ;;
*) rpath="$rpath $arg" ;;
esac
else
case "$xrpath " in
*" $arg "*) ;;
*) xrpath="$xrpath $arg" ;;
esac
fi
prev=
continue
;;
xcompiler)
compiler_flags="$compiler_flags $qarg"
prev=
compile_command="$compile_command $qarg"
finalize_command="$finalize_command $qarg"
continue
;;
xlinker)
linker_flags="$linker_flags $qarg"
compiler_flags="$compiler_flags $wl$qarg"
prev=
compile_command="$compile_command $wl$qarg"
finalize_command="$finalize_command $wl$qarg"
continue
;;
xcclinker)
linker_flags="$linker_flags $qarg"
compiler_flags="$compiler_flags $qarg"
prev=
compile_command="$compile_command $qarg"
finalize_command="$finalize_command $qarg"
continue
;;
shrext)
shrext_cmds="$arg"
prev=
continue
;;
darwin_framework|darwin_framework_skip)
test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
*)
eval "$prev=\"\$arg\""
prev=
continue
;;
esac
fi # test -n "$prev"
prevarg="$arg"
case $arg in
-all-static)
if test -n "$link_static_flag"; then
compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
fi
continue
;;
-allow-undefined)
# FIXME: remove this flag sometime in the future.
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
continue
;;
-avoid-version)
avoid_version=yes
continue
;;
-dlopen)
prev=dlfiles
continue
;;
-dlpreopen)
prev=dlprefiles
continue
;;
-export-dynamic)
export_dynamic=yes
continue
;;
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: more than one -exported-symbols argument is not allowed"
exit $EXIT_FAILURE
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
else
prev=expsyms_regex
fi
continue
;;
-framework|-arch|-isysroot)
case " $CC " in
*" ${arg} ${1} "* | *" ${arg} ${1} "*)
prev=darwin_framework_skip ;;
*) compiler_flags="$compiler_flags $arg"
prev=darwin_framework ;;
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-inst-prefix-dir)
prev=inst_prefix
continue
;;
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
no/*-*-irix* | /*-*-irix*)
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
;;
esac
continue
;;
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
absdir="$dir"
notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
esac
case "$deplibs " in
*" -L$dir "*) ;;
*)
deplibs="$deplibs -L$dir"
lib_search_path="$lib_search_path $dir"
;;
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
case :$dllsearchpath: in
*":$testbindir:"*) ;;
*) dllsearchpath="$dllsearchpath:$testbindir";;
esac
;;
esac
continue
;;
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
*-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
test "X$arg" = "X-lc" && continue
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
test "X$arg" = "X-lc" && continue
;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
esac
fi
deplibs="$deplibs $arg"
continue
;;
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
-model)
compile_command="$compile_command $arg"
compiler_flags="$compiler_flags $arg"
finalize_command="$finalize_command $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-multi_module)
single_module="${wl}-multi_module"
continue
;;
-module)
module=yes
continue
;;
# -64, -mips[0-9] enable 64-bit mode on the SGI compiler
# -r[0-9][0-9]* specifies the processor on the SGI compiler
# -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
# -m*, -t[45]*, -txscale* pass through architecture-specific
# compiler args for GCC
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
# -F/path gives path to uninstalled frameworks, gcc on darwin
# @file GCC response files
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
compiler_flags="$compiler_flags $arg"
continue
;;
-shrext)
prev=shrext
continue
;;
-no-fast-install)
fast_install=no
continue
;;
-no-install)
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
*) no_install=yes ;;
esac
continue
;;
-no-undefined)
allow_undefined=no
continue
;;
-objectlist)
prev=objectlist
continue
;;
-o) prev=output ;;
-precious-files-regex)
prev=precious_regex
continue
;;
-release)
prev=release
continue
;;
-rpath)
prev=rpath
continue
;;
-R)
prev=xrpath
continue
;;
-R*)
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit $EXIT_FAILURE
;;
esac
case "$xrpath " in
*" $dir "*) ;;
*) xrpath="$xrpath $dir" ;;
esac
continue
;;
-static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
# would be equivalent was wrong. It would break on at least
# Digital Unix and AIX.
continue
;;
-thread-safe)
thread_safe=yes
continue
;;
-version-info)
prev=vinfo
continue
;;
-version-number)
prev=vinfo
vinfo_number=yes
continue
;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
arg=
save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
arg="$arg $wl$flag"
compiler_flags="$compiler_flags $flag"
done
IFS="$save_ifs"
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
-Wl,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
arg=
save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
arg="$arg $wl$flag"
compiler_flags="$compiler_flags $wl$flag"
linker_flags="$linker_flags $flag"
done
IFS="$save_ifs"
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
-Xcompiler)
prev=xcompiler
continue
;;
-Xlinker)
prev=xlinker
continue
;;
-XCClinker)
prev=xcclinker
continue
;;
# Some other compiler flag.
-* | +*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
;;
*.$objext)
# A standard object.
objs="$objs $arg"
;;
*.lo)
# A libtool-controlled object.
# Check to see that this really is a libtool object.
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
pic_object=
non_pic_object=
# Read the .lo file
# If there is no directory component, then add one.
case $arg in
*/* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
if test -z "$pic_object" || \
test -z "$non_pic_object" ||
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit $EXIT_FAILURE
fi
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
pic_object="$xdir$pic_object"
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
dlfiles="$dlfiles $pic_object"
prev=
continue
else
# If libtool objects are unsupported, then we need to preload.
prev=dlprefiles
fi
fi
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
dlprefiles="$dlprefiles $pic_object"
prev=
fi
# A PIC object.
libobjs="$libobjs $pic_object"
arg="$pic_object"
fi
# Non-PIC object.
if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
non_pic_objects="$non_pic_objects $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
non_pic_object="$pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit $EXIT_FAILURE
else
# Dry-run case.
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
libobjs="$libobjs $pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
fi
;;
*.$libext)
# An archive.
deplibs="$deplibs $arg"
old_deplibs="$old_deplibs $arg"
continue
;;
*.la)
# A libtool-controlled library.
if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
dlfiles="$dlfiles $arg"
prev=
elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
dlprefiles="$dlprefiles $arg"
prev=
else
deplibs="$deplibs $arg"
fi
continue
;;
# Some other compiler argument.
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
;;
esac # arg
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
done # argument parsing loop
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
else
shlib_search_path=
fi
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
if test "X$output_objdir" = "X$output"; then
output_objdir="$objdir"
else
output_objdir="$output_objdir/$objdir"
fi
# Create the object directory.
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
exit_status=$?
if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
exit $exit_status
fi
fi
# Determine the type of output
case $output in
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
*.la) linkmode=lib ;;
*) linkmode=prog ;; # Anything else should be a program.
esac
case $host in
*cygwin* | *mingw* | *pw32*)
# don't eliminate duplications in $postdeps and $predeps
duplicate_compiler_generated_deps=yes
;;
*)
duplicate_compiler_generated_deps=$duplicate_deps
;;
esac
specialdeplibs=
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
if test "X$duplicate_deps" = "Xyes" ; then
case "$libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
libs="$libs $deplib"
done
if test "$linkmode" = lib; then
libs="$predeps $libs $compiler_lib_search_path $postdeps"
# Compute libraries that are listed more than once in $predeps
# $postdeps and mark them as special (i.e., whose duplicates are
# not to be eliminated).
pre_post_deps=
if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
for pre_post_dep in $predeps $postdeps; do
case "$pre_post_deps " in
*" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
esac
pre_post_deps="$pre_post_deps $pre_post_dep"
done
fi
pre_post_deps=
fi
deplibs=
newdependency_libs=
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
for file in $dlfiles $dlprefiles; do
case $file in
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
exit $EXIT_FAILURE
;;
esac
done
;;
prog)
compile_deplibs=
finalize_deplibs=
alldeplibs=no
newdlfiles=
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
;;
*) passes="conv"
;;
esac
for pass in $passes; do
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"
deplibs=
fi
if test "$linkmode" = prog; then
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
link)
libs="$deplibs %DEPLIBS%"
test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
;;
esac
fi
if test "$pass" = dlopen; then
# Collect dlpreopened libraries
save_deplibs="$deplibs"
deplibs=
fi
for deplib in $libs; do
lib=
found=no
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
compiler_flags="$compiler_flags $deplib"
fi
continue
;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
if test "$linkmode" = lib; then
searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
else
searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
fi
for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
if test -f "$lib"; then
if test "$search_ext" = ".la"; then
found=yes
else
found=no
fi
break 2
fi
done
done
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
else # deplib is a libtool library
# If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
# We need to do some special things here, and not later.
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $deplib "*)
if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
library_names=
old_library=
case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
for l in $old_library $library_names; do
ll="$l"
done
if test "X$ll" = "X$old_library" ; then # only static version available
found=no
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
lib=$ladir/$old_library
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
fi
fi
;;
*) ;;
esac
fi
fi
;; # -l
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
prog)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
if test "$pass" = scan; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
*)
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
;;
esac # linkmode
continue
;; # -L
-R*)
if test "$pass" = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
*" $dir "*) ;;
*) xrpath="$xrpath $dir" ;;
esac
fi
deplibs="$deplib $deplibs"
continue
;;
*.la) lib="$deplib" ;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
case $linkmode in
lib)
valid_a_lib=no
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
if eval $echo \"$deplib\" 2>/dev/null \
| $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
valid_a_lib=yes
fi
;;
pass_all)
valid_a_lib=yes
;;
esac
if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when"
$echo "*** you link to this library. But I can only do this if you have a"
$echo "*** shared version of the library, which you do not appear to have"
$echo "*** because the file extensions .$libext of this argument makes me believe"
$echo "*** that it is just a static archive that I should not used here."
else
$echo
$echo "*** Warning: Linking the shared library $output against the"
$echo "*** static library $deplib is not portable!"
deplibs="$deplib $deplibs"
fi
continue
;;
prog)
if test "$pass" != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
continue
;;
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
elif test "$linkmode" = prog; then
if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
newdlprefiles="$newdlprefiles $deplib"
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
newdlfiles="$newdlfiles $deplib"
fi
fi
continue
;;
%DEPLIBS%)
alldeplibs=yes
continue
;;
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
# Check to see that this really is a libtool archive.
if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
dlname=
dlopen=
dlpreopen=
libdir=
library_names=
old_library=
# If the library was installed with an old release of libtool,
# it will not redefine variables installed, or shouldnotlink
installed=yes
shouldnotlink=no
avoidtemprpath=
# Read the .la file
case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
if test "$pass" = conv; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit $EXIT_FAILURE
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
old_convenience="$old_convenience $ladir/$objdir/$old_library"
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib"
done
elif test "$linkmode" != prog && test "$linkmode" != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2
exit $EXIT_FAILURE
fi
continue
fi # $pass = conv
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
linklib="$l"
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit $EXIT_FAILURE
fi
# This library was specified with -dlopen.
if test "$pass" = dlopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
exit $EXIT_FAILURE
fi
if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
# bomb out in the load deplibs phase.
dlprefiles="$dlprefiles $lib $dependency_libs"
else
newdlfiles="$newdlfiles $lib"
fi
continue
fi # $pass = dlopen
# We need an absolute path.
case $ladir in
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
abs_ladir="$ladir"
fi
;;
esac
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
$echo "$modename: warning: library \`$lib' was moved." 1>&2
dir="$ladir"
absdir="$abs_ladir"
libdir="$abs_ladir"
else
dir="$libdir"
absdir="$libdir"
fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
dir="$ladir"
absdir="$abs_ladir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
fi
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
if test "$pass" = dlpreopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
exit $EXIT_FAILURE
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
if test -n "$old_library"; then
newdlprefiles="$newdlprefiles $dir/$old_library"
# Otherwise, use the dlname, so that lt_dlopen finds it.
elif test -n "$dlname"; then
newdlprefiles="$newdlprefiles $dir/$dlname"
else
newdlprefiles="$newdlprefiles $dir/$linklib"
fi
fi # $pass = dlpreopen
if test -z "$libdir"; then
# Link the convenience library
if test "$linkmode" = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
deplibs="$lib $deplibs" # used for prog,scan pass
fi
continue
fi
if test "$linkmode" = prog && test "$pass" != link; then
newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs"
linkalldeplibs=no
if test "$link_all_deplibs" != no || test -z "$library_names" ||
test "$build_libtool_libs" = no; then
linkalldeplibs=yes
fi
tmp_libs=
for deplib in $dependency_libs; do
case $deplib in
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
# Need to link against all dependency_libs?
if test "$linkalldeplibs" = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib"
done # for deplib
continue
fi # $linkmode = prog...
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
{ { test "$prefer_static_libs" = no ||
test "$prefer_static_libs,$installed" = "built,yes"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
*) temp_rpath="$temp_rpath $absdir" ;;
esac
fi
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir"
esac
;;
esac
fi # $linkmode,$pass = prog,link...
if test "$alldeplibs" = yes &&
{ test "$deplibs_check_method" = pass_all ||
{ test "$build_libtool_libs" = yes &&
test -n "$library_names"; }; }; then
# We only need to search for static libraries
continue
fi
fi
link_static=no # Whether the deplib will be linked statically
use_static_libs=$prefer_static_libs
if test "$use_static_libs" = built && test "$installed" = yes ; then
use_static_libs=no
fi
if test -n "$library_names" &&
{ test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
fi
# This is a shared library
# Warn about portability, can't link against -module's on
# some systems (darwin)
if test "$shouldnotlink" = yes && test "$pass" = link ; then
$echo
if test "$linkmode" = prog; then
$echo "*** Warning: Linking the executable $output against the loadable module"
else
$echo "*** Warning: Linking the shared library $output against the loadable module"
fi
$echo "*** $linklib is not portable!"
fi
if test "$linkmode" = lib &&
test "$hardcode_into_libs" = yes; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir"
esac
;;
esac
fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
set dummy $library_names
realname="$2"
shift; shift
libname=`eval \\$echo \"$libname_spec\"`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
soname="$dlname"
elif test -n "$soname_spec"; then
# bleh windows
case $host in
*cygwin* | mingw*)
major=`expr $current - $age`
versuffix="-$major"
;;
esac
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
# Make a new name for the extract_expsyms_cmds to use
soroot="$soname"
soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
$show "extracting exported symbol list from \`$soname'"
save_ifs="$IFS"; IFS='~'
cmds=$extract_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
$show "generating import library for \`$soname'"
save_ifs="$IFS"; IFS='~'
cmds=$old_archive_from_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
fi # test -n "$old_archive_from_expsyms_cmds"
if test "$linkmode" = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
lib_linked=yes
case $hardcode_action in
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
*-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
*-*-sysv4*uw2*) add_dir="-L$dir" ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
*-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
if /usr/bin/file -L $add 2> /dev/null |
$EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
$echo "** And there doesn't seem to be a static archive available"
$echo "** The link will probably fail, sorry"
else
add="$dir/$old_library"
fi
fi
esac
elif test "$hardcode_minus_L" = no; then
case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
esac
add_dir="-L$dir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = no; then
add_shlibpath="$dir"
add="-l$name"
else
lib_linked=no
fi
;;
relink)
if test "$hardcode_direct" = yes; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
esac
fi
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
add="-l$name"
else
lib_linked=no
fi
;;
*) lib_linked=no ;;
esac
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
exit $EXIT_FAILURE
fi
if test -n "$add_shlibpath"; then
case :$compile_shlibpath: in
*":$add_shlibpath:"*) ;;
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
if test "$linkmode" = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
if test "$hardcode_direct" != yes && \
test "$hardcode_minus_L" != yes && \
test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
fi
fi
fi
if test "$linkmode" = prog || test "$mode" = relink; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
if test "$hardcode_direct" = yes; then
add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
add="-l$name"
elif test "$hardcode_automatic" = yes; then
if test -n "$inst_prefix_dir" &&
test -f "$inst_prefix_dir$libdir/$linklib" ; then
add="$inst_prefix_dir$libdir/$linklib"
else
add="$libdir/$linklib"
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
add_dir="-L$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
esac
fi
add="-l$name"
fi
if test "$linkmode" = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
fi
fi
elif test "$linkmode" = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
if test "$hardcode_direct" != unsupported; then
test -n "$old_library" && linklib="$old_library"
compile_deplibs="$dir/$linklib $compile_deplibs"
finalize_deplibs="$dir/$linklib $finalize_deplibs"
else
compile_deplibs="-l$name -L$dir $compile_deplibs"
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
fi
elif test "$build_libtool_libs" = yes; then
# Not a shared library
if test "$deplibs_check_method" != pass_all; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
$echo
$echo "*** Warning: This system can not link to static lib archive $lib."
$echo "*** I have the capability to make that library automatically link in when"
$echo "*** you link to this library. But I can only do this if you have a"
$echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then
$echo "*** But as you try to build a module library, libtool will still create "
$echo "*** a static module, that should work as long as the dlopening application"
$echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
$echo
$echo "*** However, this would only work if libtool was able to extract symbol"
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
$echo "*** not find such a program. So, this module is probably useless."
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
fi
else
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
fi # link shared/static library?
if test "$linkmode" = lib; then
if test -n "$dependency_libs" &&
{ test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes ||
test "$link_static" = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
case $libdir in
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
case " $xrpath " in
*" $temp_xrpath "*) ;;
*) xrpath="$xrpath $temp_xrpath";;
esac;;
*) temp_deplibs="$temp_deplibs $libdir";;
esac
done
dependency_libs="$temp_deplibs"
fi
newlib_search_path="$newlib_search_path $absdir"
# Link against this library
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
# ... and its dependency_libs
tmp_libs=
for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs"
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib"
done
if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
case $deplib in
-L*) path="$deplib" ;;
*.la)
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$deplib" && dir="."
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
absdir="$dir"
fi
;;
esac
if grep "^installed=no" $deplib > /dev/null; then
path="$absdir/$objdir"
else
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
fi
path="$absdir"
fi
depdepl=
case $host in
*-*-darwin*)
# we do not want to link against static libs,
# but need to link against shared
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -n "$deplibrary_names" ; then
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
if test -f "$deplibdir/$depdepl" ; then
depdepl="$deplibdir/$depdepl"
elif test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl"
else
# Can't find it, oh well...
depdepl=
fi
# do not add paths which are already there
case " $newlib_search_path " in
*" $path "*) ;;
*) newlib_search_path="$newlib_search_path $path";;
esac
fi
path=""
;;
*)
path="-L$path"
;;
esac
;;
-l*)
case $host in
*-*-darwin*)
# Again, we only want to link against shared libraries
eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
for tmp in $newlib_search_path ; do
if test -f "$tmp/lib$tmp_libs.dylib" ; then
eval depdepl="$tmp/lib$tmp_libs.dylib"
break
fi
done
path=""
;;
*) continue ;;
esac
;;
*) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
esac
done
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
dependency_libs="$newdependency_libs"
if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
if test "$pass" != dlopen; then
if test "$pass" != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
case "$lib_search_path " in
*" $dir "*) ;;
*) lib_search_path="$lib_search_path $dir" ;;
esac
done
newlib_search_path=
fi
if test "$linkmode,$pass" != "prog,link"; then
vars="deplibs"
else
vars="compile_deplibs finalize_deplibs"
fi
for var in $vars dependency_libs; do
# Add libraries to $var in reverse order
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
# FIXME: Pedantically, this is the right thing to do, so
# that some nasty dependency loop isn't accidentally
# broken:
#new_libs="$deplib $new_libs"
# Pragmatically, this seems to cause very few problems in
# practice:
case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
-R*) ;;
*)
# And here is the reason: when a library appears more
# than once as an explicit dependence of a library, or
# is implicitly linked in more than once by the
# compiler, it is considered special, and multiple
# occurrences thereof are not removed. Compare this
# with having the same library being listed as a
# dependency of multiple other libraries: in this case,
# we know (pedantically, we assume) the library does not
# need to be listed more than once, so we keep only the
# last copy. This is not always right, but it is rare
# enough that we require users that really mean to play
# such unportable linking tricks to link the library
# using -Wl,-lname, so that libtool does not consider it
# for duplicate removal.
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$deplib $new_libs" ;;
esac
;;
esac
;;
esac
done
tmp_libs=
for deplib in $new_libs; do
case $deplib in
-L*)
case " $tmp_libs " in
*" $deplib "*) ;;
*) tmp_libs="$tmp_libs $deplib" ;;
esac
;;
*) tmp_libs="$tmp_libs $deplib" ;;
esac
done
eval $var=\"$tmp_libs\"
done # for var
fi
# Last step: remove runtime libs from dependency_libs
# (they stay in deplibs)
tmp_libs=
for i in $dependency_libs ; do
case " $predeps $postdeps $compiler_lib_search_path " in
*" $i "*)
i=""
;;
esac
if test -n "$i" ; then
tmp_libs="$tmp_libs $i"
fi
done
dependency_libs=$tmp_libs
done # for pass
if test "$linkmode" = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
case " $deplibs" in
*\ -l* | *\ -L*)
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
if test -n "$rpath"; then
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
fi
if test -n "$xrpath"; then
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
fi
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
fi
# Now set the variables for building old libraries.
build_libtool_libs=no
oldlibs="$output"
objs="$objs$old_deplibs"
;;
lib)
# Make sure we only generate libraries of the form `libNAME.la'.
case $outputname in
lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
;;
*)
if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
else
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
fi
;;
esac
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
exit $EXIT_FAILURE
else
$echo
$echo "*** Warning: Linking the shared library $output against the non-libtool"
$echo "*** objects $objs is not portable!"
libobjs="$libobjs $objs"
fi
fi
if test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
fi
set dummy $rpath
if test "$#" -gt 2; then
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
fi
install_libdir="$2"
oldlibs=
if test -z "$rpath"; then
if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
# Some compilers have problems with a `.al' extension so
# convenience libraries should have the same extension an
# archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
fi
else
# Parse the version information argument.
save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
IFS="$save_ifs"
if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
# convert absolute version numbers to libtool ages
# this retains compatibility with .la files and attempts
# to make the code below a bit more comprehensible
case $vinfo_number in
yes)
number_major="$2"
number_minor="$3"
number_revision="$4"
#
# There are really only two kinds -- those that
# use the current revision as the major version
# and those that subtract age and use age as
# a minor version. But, then there is irix
# which has an extra 1 added just for fun
#
case $version_type in
darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
;;
freebsd-aout|freebsd-elf|sunos)
current="$number_major"
revision="$number_minor"
age="0"
;;
irix|nonstopux)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
lt_irix_increment=no
;;
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit $EXIT_FAILURE
;;
esac
;;
no)
current="$2"
revision="$3"
age="$4"
;;
esac
# Check that each of the things are valid numbers.
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
if test "$age" -gt "$current"; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
fi
# Calculate the version variables.
major=
versuffix=
verstring=
case $version_type in
none) ;;
darwin)
# Like Linux, but with the current version available in
# verstring for coding it into the library header
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
major=".$current"
versuffix=".$current.$revision";
;;
freebsd-elf)
major=".$current"
versuffix=".$current";
;;
irix | nonstopux)
if test "X$lt_irix_increment" = "Xno"; then
major=`expr $current - $age`
else
major=`expr $current - $age + 1`
fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
esac
verstring="$verstring_prefix$major.$revision"
# Add in all the interfaces that we are compatible with.
loop=$revision
while test "$loop" -ne 0; do
iface=`expr $revision - $loop`
loop=`expr $loop - 1`
verstring="$verstring_prefix$major.$iface:$verstring"
done
# Before this point, $major must not contain `.'.
major=.$major
versuffix="$major.$revision"
;;
linux)
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
;;
osf)
major=.`expr $current - $age`
versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
while test "$loop" -ne 0; do
iface=`expr $current - $loop`
loop=`expr $loop - 1`
verstring="$verstring:${iface}.0"
done
# Make executables depend on our current version.
verstring="$verstring:${current}.0"
;;
sunos)
major=".$current"
versuffix=".$current.$revision"
;;
windows)
# Use '-' rather than '.', since we only want one
# extension on DOS 8.3 filesystems.
major=`expr $current - $age`
versuffix="-$major"
;;
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit $EXIT_FAILURE
;;
esac
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
case $version_type in
darwin)
# we can't check for "0.0" in archive_cmds due to quoting
# problems, so we reset it completely
verstring=
;;
*)
verstring="0.0"
;;
esac
if test "$need_version" = no; then
versuffix=
else
versuffix=".0.0"
fi
fi
# Remove version info from name if versioning should be avoided
if test "$avoid_version" = yes && test "$need_version" = no; then
major=
versuffix=
verstring=""
fi
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
build_libtool_libs=no
build_old_libs=yes
fi
else
# Don't allow undefined symbols.
allow_undefined_flag="$no_undefined_flag"
fi
fi
if test "$mode" != relink; then
# Remove our outputs, but don't remove object files since they
# may have been created when compiling PIC objects.
removelist=
tempremovelist=`$echo "$output_objdir/*"`
for p in $tempremovelist; do
case $p in
*.$objext)
;;
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
if test "X$precious_files_regex" != "X"; then
if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
then
continue
fi
fi
removelist="$removelist $p"
;;
*) ;;
esac
done
if test -n "$removelist"; then
$show "${rm}r $removelist"
$run ${rm}r $removelist
fi
fi
# Now set the variables for building old libraries.
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
oldlibs="$oldlibs $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
#for path in $notinst_path; do
# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
#done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
temp_xrpath=
for libdir in $xrpath; do
temp_xrpath="$temp_xrpath -R$libdir"
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
# Make sure dlfiles contains only unique files that won't be dlpreopened
old_dlfiles="$dlfiles"
dlfiles=
for lib in $old_dlfiles; do
case " $dlprefiles $dlfiles " in
*" $lib "*) ;;
*) dlfiles="$dlfiles $lib" ;;
esac
done
# Make sure dlprefiles contains only unique files
old_dlprefiles="$dlprefiles"
dlprefiles=
for lib in $old_dlprefiles; do
case "$dlprefiles " in
*" $lib "*) ;;
*) dlprefiles="$dlprefiles $lib" ;;
esac
done
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
;;
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
;;
*)
# Add libc to deplibs on all other systems if necessary.
if test "$build_libtool_need_lc" = "yes"; then
deplibs="$deplibs -lc"
fi
;;
esac
fi
# Transform deplibs into only deplibs that can be linked in shared.
name_save=$name
libname_save=$libname
release_save=$release
versuffix_save=$versuffix
major_save=$major
# I'm not sure if I'm treating the release correctly. I think
# release should show up in the -l (ie -lgmp5) so we don't want to
# add it in twice. Is that correct?
release=""
versuffix=""
major=""
newdeplibs=
droppeddeps=no
case $deplibs_check_method in
pass_all)
# Don't check for shared/static. Everything works.
# This might be a little naive. We might want to check
# whether the library exists or not. But this is on
# osf3 & osf4 and I'm not really sure... Just
# implementing what was already the behavior.
newdeplibs=$deplibs
;;
test_compile)
# This code stresses the "libraries are programs" paradigm to its
# limits. Maybe even breaks it. We compile a program, linking it
# against the deplibs as a proxy for the library. Then we can check
# whether they linked in statically or dynamically with ldd.
$rm conftest.c
cat > conftest.c </dev/null`
for potent_lib in $potential_libs; do
# Follow soft links.
if ls -lLd "$potent_lib" 2>/dev/null \
| grep " -> " >/dev/null; then
continue
fi
# The statement above tries to avoid entering an
# endless loop below, in case of cyclic links.
# We might still enter an endless loop, since a link
# loop can be closed while we follow links,
# but so what?
potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
done
done
fi
if test -n "$a_deplib" ; then
droppeddeps=yes
$echo
$echo "*** Warning: linker path does not have real file for library $a_deplib."
$echo "*** I have the capability to make that library automatically link in when"
$echo "*** you link to this library. But I can only do this if you have a"
$echo "*** shared version of the library, which you do not appear to have"
$echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
$echo "*** with $libname but no candidates were found. (...for file magic test)"
else
$echo "*** with $libname and none of the candidates passed a file format test"
$echo "*** using a file magic. Last file checked: $potlib"
fi
fi
else
# Add a -L argument.
newdeplibs="$newdeplibs $a_deplib"
fi
done # Gone through all deplibs.
;;
match_pattern*)
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $a_deplib "*)
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
;;
esac
fi
if test -n "$a_deplib" ; then
libname=`eval \\$echo \"$libname_spec\"`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do
potlib="$potent_lib" # see symlink-check above in file_magic test
if eval $echo \"$potent_lib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
done
done
fi
if test -n "$a_deplib" ; then
droppeddeps=yes
$echo
$echo "*** Warning: linker path does not have real file for library $a_deplib."
$echo "*** I have the capability to make that library automatically link in when"
$echo "*** you link to this library. But I can only do this if you have a"
$echo "*** shared version of the library, which you do not appear to have"
$echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
$echo "*** with $libname but no candidates were found. (...for regex pattern test)"
else
$echo "*** with $libname and none of the candidates passed a file format test"
$echo "*** using a regex pattern. Last file checked: $potlib"
fi
fi
else
# Add a -L argument.
newdeplibs="$newdeplibs $a_deplib"
fi
done # Gone through all deplibs.
;;
none | unknown | *)
newdeplibs=""
tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-e 's/ -[LR][^ ]*//g'`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
for i in $predeps $postdeps ; do
# can't use Xsed below, because $i might contain '/'
tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
done
fi
if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
| grep . >/dev/null; then
$echo
if test "X$deplibs_check_method" = "Xnone"; then
$echo "*** Warning: inter-library dependencies are not supported in this platform."
else
$echo "*** Warning: inter-library dependencies are not known to be supported."
fi
$echo "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
fi
;;
esac
versuffix=$versuffix_save
major=$major_save
release=$release_save
libname=$libname_save
name=$name_save
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
# On Rhapsody replace the C library is the System framework
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
;;
esac
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
$echo
$echo "*** Warning: libtool could not satisfy all declared inter-library"
$echo "*** dependencies of module $libname. Therefore, libtool will create"
$echo "*** a static module, that should work as long as the dlopening"
$echo "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
$echo
$echo "*** However, this would only work if libtool was able to extract symbol"
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
$echo "*** not find such a program. So, this module is probably useless."
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
else
$echo "*** The inter-library dependencies that have been dropped here will be"
$echo "*** automatically added whenever a program is linked with this library"
$echo "*** or is declared to -dlopen it."
if test "$allow_undefined" = no; then
$echo
$echo "*** Since this library must not contain undefined symbols,"
$echo "*** because either the platform does not support them or"
$echo "*** it was explicitly requested with -no-undefined,"
$echo "*** libtool will only create a static version of it."
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
fi
fi
fi
# Done checking deplibs!
deplibs=$newdeplibs
fi
# move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list
new_libs=
for path in $notinst_path; do
case " $new_libs " in
*" -L$path/$objdir "*) ;;
*)
case " $deplibs " in
*" -L$path/$objdir "*)
new_libs="$new_libs -L$path/$objdir" ;;
esac
;;
esac
done
for deplib in $deplibs; do
case $deplib in
-L*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$new_libs $deplib" ;;
esac
;;
*) new_libs="$new_libs $deplib" ;;
esac
done
deplibs="$new_libs"
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
dlname=
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
dep_rpath="$dep_rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
*) perm_rpath="$perm_rpath $libdir" ;;
esac
fi
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
case $archive_cmds in
*\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
*) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
fi
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
fi
shlibpath="$finalize_shlibpath"
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
if test -n "$shlibpath"; then
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
# Get the real and link names of the library.
eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
shift; shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
if test -z "$dlname"; then
dlname=$soname
fi
lib="$output_objdir/$realname"
linknames=
for link
do
linknames="$linknames $link"
done
# Use standard objects if they are pic
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
if len=`expr "X$cmd" : ".*"` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
$show "$cmd"
$run eval "$cmd" || exit $?
skipped_export=false
else
# The command line is too long to execute in one step.
$show "using reloadable object file for export list..."
skipped_export=:
# Break out early, otherwise skipped_export may be
# set to false by a later but shorter cmd.
break
fi
done
IFS="$save_ifs"
if test -n "$export_symbols_regex"; then
$show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
$run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
$run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
fi
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi
tmp_deplibs=
for test_deplib in $deplibs; do
case " $convenience " in
*" $test_deplib "*) ;;
*)
tmp_deplibs="$tmp_deplibs $test_deplib"
;;
esac
done
deplibs="$tmp_deplibs"
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
func_extract_archives $gentop $convenience
libobjs="$libobjs $func_extract_archives_result"
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
fi
# Make a backup of the uninstalled library when relinking
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
eval test_cmds=\"$module_expsym_cmds\"
cmds=$module_expsym_cmds
else
eval test_cmds=\"$module_cmds\"
cmds=$module_cmds
fi
else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval test_cmds=\"$archive_expsym_cmds\"
cmds=$archive_expsym_cmds
else
eval test_cmds=\"$archive_cmds\"
cmds=$archive_cmds
fi
fi
if test "X$skipped_export" != "X:" &&
len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
:
else
# The command line is too long to link in one step, link piecewise.
$echo "creating reloadable object files..."
# Save the value of $output and $libobjs because we want to
# use them later. If we have whole_archive_flag_spec, we
# want to use save_libobjs as it was before
# whole_archive_flag_spec was expanded, because we can't
# assume the linker understands whole_archive_flag_spec.
# This may have to be revisited, in case too many
# convenience libraries get linked in and end up exceeding
# the spec.
if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
fi
save_output=$output
output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and
# initialize k to one.
test_cmds=
concat_cmds=
objlist=
delfiles=
last_robj=
k=1
output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
if test "X$objlist" = X ||
{ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; }; then
objlist="$objlist $obj"
else
# The command $test_cmds is almost too long, add a
# command to the queue.
if test "$k" -eq 1 ; then
# The first file doesn't have a previous command to add.
eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
else
# All subsequent reloadable object files will link in
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1`
output=$output_objdir/$output_la-${k}.$objext
objlist=$obj
len=1
fi
done
# Handle the remaining objects by creating one last
# reloadable object file. All subsequent reloadable object
# files will link in the last one created.
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
if ${skipped_export-false}; then
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
libobjs=$output
# Append the command to create the export file.
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
# Set up a command to remove the reloadable object files
# after they are used.
i=0
while test "$i" -lt "$k"
do
i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
# Loop through the commands generated above and execute them.
save_ifs="$IFS"; IFS='~'
for cmd in $concat_cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
libobjs=$output
# Restore the value of output.
output=$save_output
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
fi
# Expand the library linking commands again to reset the
# value of $libobjs for piecewise linking.
# Do each of the archive commands.
if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
cmds=$module_expsym_cmds
else
cmds=$module_cmds
fi
else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
cmds=$archive_expsym_cmds
else
cmds=$archive_cmds
fi
fi
# Append the command to remove the reloadable object files
# to the just-reset $cmds.
eval cmds=\"\$cmds~\$rm $delfiles\"
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || {
lt_exit=$?
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
fi
exit $lt_exit
}
done
IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
if test -n "$convenience"; then
if test -z "$whole_archive_flag_spec"; then
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
fi
fi
exit $EXIT_SUCCESS
fi
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
fi
done
# If -module or -export-dynamic was specified, set the dlname.
if test "$module" = yes || test "$export_dynamic" = yes; then
# On all known operating systems, these are identical.
dlname="$soname"
fi
fi
;;
obj)
case " $deplibs" in
*\ -l* | *\ -L*)
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
esac
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
fi
if test -n "$rpath"; then
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
fi
if test -n "$xrpath"; then
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
fi
case $output in
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
exit $EXIT_FAILURE
fi
libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
;;
*)
libobj=
obj="$output"
;;
esac
# Delete the old objects.
$run $rm $obj $libobj
# Objects from convenience libraries. This assumes
# single-version convenience libraries. Whenever we create
# different ones for PIC/non-PIC, this we'll have to duplicate
# the extraction.
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec and hope we can get by with
# turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
func_extract_archives $gentop $convenience
reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
# Create the old-style object.
reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
# Exit if we aren't doing a library object file.
if test -z "$libobj"; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit $EXIT_SUCCESS
fi
if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
# $show "echo timestamp > $libobj"
# $run eval "echo timestamp > $libobj" || exit $?
exit $EXIT_SUCCESS
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit $EXIT_SUCCESS
;;
prog)
case $host in
*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
fi
if test "$preload" = yes; then
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
test "$dlopen_self_static" = unknown; then
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
fi
fi
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
# On Rhapsody replace the C library is the System framework
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
;;
esac
case $host in
*darwin*)
# Don't allow lazy linking, it breaks C++ global constructors
if test "$tagname" = CXX ; then
compile_command="$compile_command ${wl}-bind_at_load"
finalize_command="$finalize_command ${wl}-bind_at_load"
fi
;;
esac
# move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list
new_libs=
for path in $notinst_path; do
case " $new_libs " in
*" -L$path/$objdir "*) ;;
*)
case " $compile_deplibs " in
*" -L$path/$objdir "*)
new_libs="$new_libs -L$path/$objdir" ;;
esac
;;
esac
done
for deplib in $compile_deplibs; do
case $deplib in
-L*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$new_libs $deplib" ;;
esac
;;
*) new_libs="$new_libs $deplib" ;;
esac
done
compile_deplibs="$new_libs"
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
# This is the magic to use -rpath.
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
fi
# Now hardcode the library paths
rpath=
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
rpath="$rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
*) perm_rpath="$perm_rpath $libdir" ;;
esac
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
case :$dllsearchpath: in
*":$testbindir:"*) ;;
*) dllsearchpath="$dllsearchpath:$testbindir";;
esac
;;
esac
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
compile_rpath="$rpath"
rpath=
hardcode_libdirs=
for libdir in $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
rpath="$rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
*" $libdir "*) ;;
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
esac
fi
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
finalize_rpath="$rpath"
if test -n "$libobjs" && test "$build_old_libs" = yes; then
# Transform all the library objects into standard objects.
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
dlsyms=
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
if test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c"
else
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
fi
fi
if test -n "$dlsyms"; then
case $dlsyms in
"") ;;
*.c)
# Discover the nlist of each of the dlfiles.
nlist="$output_objdir/${outputname}.nm"
$show "$rm $nlist ${nlist}S ${nlist}T"
$run $rm "$nlist" "${nlist}S" "${nlist}T"
# Parse the name list into a source file.
$show "creating $output_objdir/$dlsyms"
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
#ifdef __cplusplus
extern \"C\" {
#endif
/* Prevent the only kind of declaration conflicts we can make. */
#define lt_preloaded_symbols some_other_symbol
/* External symbol declarations for the compiler. */\
"
if test "$dlself" = yes; then
$show "generating symbol list for \`$output'"
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
# Add our own program objects to the symbol list.
progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
for arg in $progfiles; do
$show "extracting global C symbols from \`$arg'"
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
if test -n "$exclude_expsyms"; then
$run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
if test -n "$export_symbols_regex"; then
$run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
*cygwin* | *mingw* )
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
;;
esac
else
$run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
case $host in
*cygwin* | *mingw* )
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
;;
esac
fi
fi
for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'"
name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
$run eval '$echo ": $name " >> "$nlist"'
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
if test -z "$run"; then
# Make sure we have at least an empty file.
test -f "$nlist" || : > "$nlist"
if test -n "$exclude_expsyms"; then
$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
$mv "$nlist"T "$nlist"
fi
# Try sorting and uniquifying the output.
if grep -v "^: " < "$nlist" |
if sort -k 3 /dev/null 2>&1; then
sort -k 3
else
sort +2
fi |
uniq > "$nlist"S; then
:
else
grep -v "^: " < "$nlist" > "$nlist"S
fi
if test -f "$nlist"S; then
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
else
$echo '/* NONE */' >> "$output_objdir/$dlsyms"
fi
$echo >> "$output_objdir/$dlsyms" "\
#undef lt_preloaded_symbols
#if defined (__STDC__) && __STDC__
# define lt_ptr void *
#else
# define lt_ptr char *
# define const
#endif
/* The mapping between symbol names and symbols. */
"
case $host in
*cygwin* | *mingw* )
$echo >> "$output_objdir/$dlsyms" "\
/* DATA imports from DLLs on WIN32 can't be const, because
runtime relocations are performed -- see ld's documentation
on pseudo-relocs */
struct {
"
;;
* )
$echo >> "$output_objdir/$dlsyms" "\
const struct {
"
;;
esac
$echo >> "$output_objdir/$dlsyms" "\
const char *name;
lt_ptr address;
}
lt_preloaded_symbols[] =
{\
"
eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
$echo >> "$output_objdir/$dlsyms" "\
{0, (lt_ptr) 0}
};
/* This works around a problem in FreeBSD linker */
#ifdef FREEBSD_WORKAROUND
static const void *lt_preloaded_setup() {
return lt_preloaded_symbols;
}
#endif
#ifdef __cplusplus
}
#endif\
"
fi
pic_flag_for_symtable=
case $host in
# compiling the symbol table file with pic_flag works around
# a FreeBSD bug that causes programs to crash when -lm is
# linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in
*" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
esac;;
*-*-hpux*)
case "$compile_command " in
*" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag";;
esac
esac
# Now compile the dynamic symbol file.
$show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
$run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
exit $EXIT_FAILURE
;;
esac
else
# We keep going just in case the user didn't refer to
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
# really was required.
# Nullify the symbol file.
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
$show "$rm $output_objdir/${outputname}S.${objext}"
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
exit $exit_status
fi
if test -n "$shlibpath_var"; then
# We should set the shlibpath_var
rpath=
for dir in $temp_rpath; do
case $dir in
[\\/]* | [A-Za-z]:[\\/]*)
# Absolute path.
rpath="$rpath$dir:"
;;
*)
# Relative path: add a thisdir entry.
rpath="$rpath\$thisdir/$dir:"
;;
esac
done
temp_rpath="$rpath"
fi
if test -n "$compile_shlibpath$finalize_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
fi
if test -n "$finalize_shlibpath"; then
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
compile_var=
finalize_var=
if test -n "$runpath_var"; then
if test -n "$perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
if test -n "$finalize_perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $finalize_perm_rpath; do
rpath="$rpath$dir:"
done
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
fi
if test "$no_install" = yes; then
# We don't need to create a wrapper script.
link_command="$compile_var$compile_command$compile_rpath"
# Replace the output file specification.
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
$run $rm $output
# Link the executable and exit
$show "$link_command"
$run eval "$link_command" || exit $?
exit $EXIT_SUCCESS
fi
if test "$hardcode_action" = relink; then
# Fast installation is not supported
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
$echo "$modename: \`$output' will be relinked during installation" 1>&2
else
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
fi
else
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
fi
fi
# Replace the output file specification.
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
# Delete the old output files.
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
$show "$link_command"
$run eval "$link_command" || exit $?
# Now create the wrapper script.
$show "creating $output"
# Quote the relink command for shipping.
if test -n "$relink_command"; then
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
relink_command="(cd `pwd`; $relink_command)"
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
case $progpath in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
fi
# Only actually do things if our run command is non-null.
if test -z "$run"; then
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
*.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
*cygwin*)
exeext=.exe
outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
*) exeext= ;;
esac
case $host in
*cygwin* | *mingw* )
output_name=`basename $output`
output_path=`dirname $output`
cwrappersource="$output_path/$objdir/lt-$output_name.c"
cwrapper="$output_path/$output_name.exe"
$rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <> $cwrappersource<<"EOF"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
#elif defined(MAXPATHLEN)
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
#endif
#ifndef DIR_SEPARATOR
# define DIR_SEPARATOR '/'
# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
# define HAVE_DOS_BASED_FILE_SYSTEM
# ifndef DIR_SEPARATOR_2
# define DIR_SEPARATOR_2 '\\'
# endif
# ifndef PATH_SEPARATOR_2
# define PATH_SEPARATOR_2 ';'
# endif
#endif
#ifndef DIR_SEPARATOR_2
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
#else /* DIR_SEPARATOR_2 */
# define IS_DIR_SEPARATOR(ch) \
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
#ifndef PATH_SEPARATOR_2
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
#else /* PATH_SEPARATOR_2 */
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
#endif /* PATH_SEPARATOR_2 */
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
/* -DDEBUG is fairly common in CFLAGS. */
#undef DEBUG
#if defined DEBUGWRAPPER
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
#else
# define DEBUG(format, ...)
#endif
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
const char * base_name (const char *name);
char * find_executable(const char *wrapper);
int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
int
main (int argc, char *argv[])
{
char **newargz;
int i;
program_name = (char *) xstrdup (base_name (argv[0]));
DEBUG("(main) argv[0] : %s\n",argv[0]);
DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
cat >> $cwrappersource <> $cwrappersource <<"EOF"
newargz[1] = find_executable(argv[0]);
if (newargz[1] == NULL)
lt_fatal("Couldn't find %s", argv[0]);
DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF"
return 127;
}
void *
xmalloc (size_t num)
{
void * p = (void *) malloc (num);
if (!p)
lt_fatal ("Memory exhausted");
return p;
}
char *
xstrdup (const char *string)
{
return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
;
}
const char *
base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
return base;
}
int
check_executable(const char * path)
{
struct stat st;
DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
if ((!path) || (!*path))
return 0;
if ((stat (path, &st) >= 0) &&
(
/* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
#if defined (S_IXOTH)
((st.st_mode & S_IXOTH) == S_IXOTH) ||
#endif
#if defined (S_IXGRP)
((st.st_mode & S_IXGRP) == S_IXGRP) ||
#endif
((st.st_mode & S_IXUSR) == S_IXUSR))
)
return 1;
else
return 0;
}
/* Searches for the full path of the wrapper. Returns
newly allocated full path name if found, NULL otherwise */
char *
find_executable (const char* wrapper)
{
int has_slash = 0;
const char* p;
const char* p_next;
/* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
int tmp_len;
char* concat_name;
DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
if ((wrapper == NULL) || (*wrapper == '\0'))
return NULL;
/* Absolute path? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
{
concat_name = xstrdup (wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
else
{
#endif
if (IS_DIR_SEPARATOR (wrapper[0]))
{
concat_name = xstrdup (wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
}
#endif
for (p = wrapper; *p; p++)
if (*p == '/')
{
has_slash = 1;
break;
}
if (!has_slash)
{
/* no slashes; search PATH */
const char* path = getenv ("PATH");
if (path != NULL)
{
for (p = path; *p; p = p_next)
{
const char* q;
size_t p_len;
for (q = p; *q; q++)
if (IS_PATH_SEPARATOR(*q))
break;
p_len = q - p;
p_next = (*q == '\0' ? q : q + 1);
if (p_len == 0)
{
/* empty path: current directory */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
tmp_len = strlen(tmp);
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, tmp, tmp_len);
concat_name[tmp_len] = '/';
strcpy (concat_name + tmp_len + 1, wrapper);
}
else
{
concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, p, p_len);
concat_name[p_len] = '/';
strcpy (concat_name + p_len + 1, wrapper);
}
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
}
/* not found in PATH; assume curdir */
}
/* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
tmp_len = strlen(tmp);
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, tmp, tmp_len);
concat_name[tmp_len] = '/';
strcpy (concat_name + tmp_len + 1, wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
return NULL;
}
char *
strendzap(char *str, const char *pat)
{
size_t len, patlen;
assert(str != NULL);
assert(pat != NULL);
len = strlen(str);
patlen = strlen(pat);
if (patlen <= len)
{
str += len - patlen;
if (strcmp(str, pat) == 0)
*str = '\0';
}
return str;
}
static void
lt_error_core (int exit_status, const char * mode,
const char * message, va_list ap)
{
fprintf (stderr, "%s: %s: ", program_name, mode);
vfprintf (stderr, message, ap);
fprintf (stderr, ".\n");
if (exit_status >= 0)
exit (exit_status);
}
void
lt_fatal (const char *message, ...)
{
va_list ap;
va_start (ap, message);
lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
va_end (ap);
}
EOF
# we should really use a build-platform specific compiler
# here, but OTOH, the wrappers (shell script and this C one)
# are only useful if you want to execute the "real" binary.
# Since the "real" binary is built for $host, then this
# wrapper might as well be built for $host, too.
$run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
;;
esac
$rm $output
trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
# $output - temporary wrapper script for $objdir/$outputname
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
# install mode needs the following variable:
notinst_deplibs='$notinst_deplibs'
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
echo=\"$qecho\"
file=\"\$0\"
# Make sure echo works.
if test \"X\$1\" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
# Yippee, \$echo works!
:
else
# Restart under the correct shell, and then maybe \$echo will work.
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
fi
fi\
"
$echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
while test -n \"\$file\"; do
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
# If there was a directory component, then change thisdir.
if test \"x\$destdir\" != \"x\$file\"; then
case \"\$destdir\" in
[\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
*) thisdir=\"\$thisdir/\$destdir\" ;;
esac
fi
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
done
# Try to get the absolute directory name.
absdir=\`cd \"\$thisdir\" && pwd\`
test -n \"\$absdir\" && thisdir=\"\$absdir\"
"
if test "$fast_install" = yes; then
$echo >> $output "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
if test ! -d \"\$progdir\"; then
$mkdir \"\$progdir\"
else
$rm \"\$progdir/\$file\"
fi"
$echo >> $output "\
# relink executable if necessary
if test -n \"\$relink_command\"; then
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
$echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\"
exit $EXIT_FAILURE
fi
fi
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
{ $rm \"\$progdir/\$program\";
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
$rm \"\$progdir/\$file\"
fi"
else
$echo >> $output "\
program='$outputname'
progdir=\"\$thisdir/$objdir\"
"
fi
$echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
# Export our shlibpath_var if we have one.
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
$echo >> $output "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
# The second colon is a workaround for a bug in BeOS R4 sed
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
"
fi
# fixup the dll searchpath if we need to.
if test -n "$dllsearchpath"; then
$echo >> $output "\
# Add the dll search path components to the executable PATH
PATH=$dllsearchpath:\$PATH
"
fi
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
"
case $host in
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
;;
*)
$echo >> $output "\
exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
;;
esac
$echo >> $output "\
\$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
# The program doesn't exist.
\$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit $EXIT_FAILURE
fi
fi\
"
chmod +x $output
fi
exit $EXIT_SUCCESS
;;
esac
# See if we need to build an old-fashioned archive.
for oldlib in $oldlibs; do
if test "$build_libtool_libs" = convenience; then
oldobjs="$libobjs_save"
addlibs="$convenience"
build_libtool_libs=no
else
if test "$build_libtool_libs" = module; then
oldobjs="$libobjs_save"
build_libtool_libs=no
else
oldobjs="$old_deplibs $non_pic_objects"
fi
addlibs="$old_convenience"
fi
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
func_extract_archives $gentop $addlibs
oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
exit_status=$?
if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
exit $exit_status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
cmds=$old_archive_cmds
else
# the command line is too long to link in one step, link in parts
$echo "using piecewise archive linking..."
save_RANLIB=$RANLIB
RANLIB=:
objlist=
concat_cmds=
save_oldobjs=$oldobjs
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
last_oldobj=$obj
done
for obj in $save_oldobjs
do
oldobjs="$objlist $obj"
objlist="$objlist $obj"
eval test_cmds=\"$old_archive_cmds\"
if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; then
:
else
# the above command should be used before it gets too long
oldobjs=$objlist
if test "$obj" = "$last_oldobj" ; then
RANLIB=$save_RANLIB
fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist=
fi
done
RANLIB=$save_RANLIB
oldobjs=$objlist
if test "X$oldobjs" = "X" ; then
eval cmds=\"\$concat_cmds\"
else
eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
fi
fi
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
eval cmd=\"$cmd\"
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
if test -n "$generated"; then
$show "${rm}r$generated"
$run ${rm}r$generated
fi
# Now create the libtool archive.
case $output in
*.la)
old_library=
test "$build_old_libs" = yes && old_library="$libname.$libext"
$show "creating $output"
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
# Only create the output if not a dry run.
if test -z "$run"; then
for installed in no yes; do
if test "$installed" = yes; then
if test -z "$install_libdir"; then
break
fi
output="$output_objdir/$outputname"i
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
case $deplib in
*.la)
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
newdependency_libs="$newdependency_libs $libdir/$name"
;;
*) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
newdlfiles=
for lib in $dlfiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
newdlfiles="$newdlfiles $libdir/$name"
done
dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
newdlprefiles="$newdlprefiles $libdir/$name"
done
dlprefiles="$newdlprefiles"
else
newdlfiles=
for lib in $dlfiles; do
case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
newdlfiles="$newdlfiles $abs"
done
dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
newdlprefiles="$newdlprefiles $abs"
done
dlprefiles="$newdlprefiles"
fi
$rm $output
# place dlname in correct position for cygwin
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='$tdlname'
# Names of this library.
library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
# Libraries that this one depends upon.
dependency_libs='$dependency_libs'
# Version information for $libname.
current=$current
age=$age
revision=$revision
# Is this an already installed library?
installed=$installed
# Should we warn about portability when linking against -modules?
shouldnotlink=$module
# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
if test "$installed" = no && test "$need_relink" = yes; then
$echo >> $output "\
relink_command=\"$relink_command\""
fi
done
fi
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
exit $EXIT_SUCCESS
;;
# libtool install mode
install)
modename="$modename: install"
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
$echo "X$nonopt" | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
install_prog="$arg "
arg="$1"
shift
else
install_prog=
arg=$nonopt
fi
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
install_prog="$install_prog$arg"
# We need to accept at least all the BSD install flags.
dest=
files=
opts=
prev=
install_type=
isdir=no
stripme=
for arg
do
if test -n "$dest"; then
files="$files $dest"
dest=$arg
continue
fi
case $arg in
-d) isdir=yes ;;
-f)
case " $install_prog " in
*[\\\ /]cp\ *) ;;
*) prev=$arg ;;
esac
;;
-g | -m | -o) prev=$arg ;;
-s)
stripme=" -s"
continue
;;
-*)
;;
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
prev=
else
dest=$arg
continue
fi
;;
esac
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
install_prog="$install_prog $arg"
done
if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
if test -z "$files"; then
if test -z "$dest"; then
$echo "$modename: no file or destination specified" 1>&2
else
$echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
# Strip any trailing slash from the destination.
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
# Check to see that the destination is a directory.
test -d "$dest" && isdir=yes
if test "$isdir" = yes; then
destdir="$dest"
destname=
else
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
test "X$destdir" = "X$dest" && destdir=.
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
# Not a directory, so check to see that there is only one file specified.
set dummy $files
if test "$#" -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
fi
case $destdir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
for file in $files; do
case $file in
*.lo) ;;
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
;;
esac
done
;;
esac
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
libtool_install_magic="$magic"
staticlibs=
future_libdirs=
current_libdirs=
for file in $files; do
# Do each installation.
case $file in
*.$libext)
# Do the static libraries later.
staticlibs="$staticlibs $file"
;;
*.la)
# Check to see that this really is a libtool archive.
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
library_names=
old_library=
relink_command=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Add the libdir to current_libdirs if it is the destination.
if test "X$destdir" = "X$libdir"; then
case "$current_libdirs " in
*" $libdir "*) ;;
*) current_libdirs="$current_libdirs $libdir" ;;
esac
else
# Note the libdir as a future libdir.
case "$future_libdirs " in
*" $libdir "*) ;;
*) future_libdirs="$future_libdirs $libdir" ;;
esac
fi
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
test "X$dir" = "X$file/" && dir=
dir="$dir$objdir"
if test -n "$relink_command"; then
# Determine the prefix the user has applied to our future dir.
inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
# Don't allow the user to place us outside of our expected
# location b/c this prevents finding dependent libraries that
# are installed to the same prefix.
# At present, this check doesn't affect windows .dll's that
# are installed into $libdir/../bin (currently, that works fine)
# but it's something to keep an eye on.
if test "$inst_prefix_dir" = "$destdir"; then
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
exit $EXIT_FAILURE
fi
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
exit $EXIT_FAILURE
fi
fi
# See the names of the shared library.
set dummy $library_names
if test -n "$2"; then
realname="$2"
shift
shift
srcname="$realname"
test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
$show "$install_prog $dir/$srcname $destdir/$realname"
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
if test -n "$stripme" && test -n "$striplib"; then
$show "$striplib $destdir/$realname"
$run eval "$striplib $destdir/$realname" || exit $?
fi
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
# Try `ln -sf' first, because the `ln' binary might depend on
# the symlink we replace! Solaris /bin/ln does not understand -f,
# so we also need to try rm && ln -s.
for linkname
do
if test "$linkname" != "$realname"; then
$show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
$run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
fi
done
fi
# Do each command in the postinstall commands.
lib="$destdir/$realname"
cmds=$postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || {
lt_exit=$?
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
fi
exit $lt_exit
}
done
IFS="$save_ifs"
fi
# Install the pseudo-library for information purposes.
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
$show "$install_prog $instname $destdir/$name"
$run eval "$install_prog $instname $destdir/$name" || exit $?
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;
*.lo)
# Install (i.e. copy) a libtool object.
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
destfile="$destdir/$destname"
else
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
destfile="$destdir/$destfile"
fi
# Deduce the name of the destination old-style object file.
case $destfile in
*.lo)
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
;;
*.$objext)
staticdest="$destfile"
destfile=
;;
*)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
;;
esac
# Install the libtool object if requested.
if test -n "$destfile"; then
$show "$install_prog $file $destfile"
$run eval "$install_prog $file $destfile" || exit $?
fi
# Install the old object if enabled.
if test "$build_old_libs" = yes; then
# Deduce the name of the old-style object file.
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi
exit $EXIT_SUCCESS
;;
*)
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
destfile="$destdir/$destname"
else
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
destfile="$destdir/$destfile"
fi
# If the file is missing, and there is a .exe on the end, strip it
# because it is most likely a libtool script we actually want to
# install
stripped_ext=""
case $file in
*.exe)
if test ! -f "$file"; then
file=`$echo $file|${SED} 's,.exe$,,'`
stripped_ext=".exe"
fi
;;
esac
# Do a test to see if this is really a libtool program.
case $host in
*cygwin*|*mingw*)
wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
;;
*)
wrapper=$file
;;
esac
if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
notinst_deplibs=
relink_command=
# Note that it is not necessary on cygwin/mingw to append a dot to
# foo even if both foo and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)! Also, sourcing
# `FILE.' does not work on cygwin managed mounts.
#
# If there is no directory component, then add one.
case $wrapper in
*/* | *\\*) . ${wrapper} ;;
*) . ./${wrapper} ;;
esac
# Check the variables that should have been set.
if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
exit $EXIT_FAILURE
fi
finalize=yes
for lib in $notinst_deplibs; do
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
# If there is no directory component, then add one.
case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
fi
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
if test -n "$libdir" && test ! -f "$libfile"; then
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
finalize=no
fi
done
relink_command=
# Note that it is not necessary on cygwin/mingw to append a dot to
# foo even if both foo and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)! Also, sourcing
# `FILE.' does not work on cygwin managed mounts.
#
# If there is no directory component, then add one.
case $wrapper in
*/* | *\\*) . ${wrapper} ;;
*) . ./${wrapper} ;;
esac
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
${rm}r "$tmpdir"
continue
fi
file="$outputname"
else
$echo "$modename: warning: cannot relink \`$file'" 1>&2
fi
else
# Install the binary that we compiled earlier.
file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
fi
fi
# remove .exe since cygwin /usr/bin/install will append another
# one anyway
case $install_prog,$host in
*/usr/bin/install*,*cygwin*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
;;
*.exe:*)
destfile=$destfile.exe
;;
*:*.exe)
destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
;;
esac
;;
esac
$show "$install_prog$stripme $file $destfile"
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
test -n "$outputname" && ${rm}r "$tmpdir"
;;
esac
done
for file in $staticlibs; do
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
# Set up the ranlib parameters.
oldlib="$destdir/$name"
$show "$install_prog $file $oldlib"
$run eval "$install_prog \$file \$oldlib" || exit $?
if test -n "$stripme" && test -n "$old_striplib"; then
$show "$old_striplib $oldlib"
$run eval "$old_striplib $oldlib" || exit $?
fi
# Do each command in the postinstall commands.
cmds=$old_postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
if test -n "$future_libdirs"; then
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
fi
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else
exit $EXIT_SUCCESS
fi
;;
# libtool finish mode
finish)
modename="$modename: finish"
libdirs="$nonopt"
admincmds=
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
for dir
do
libdirs="$libdirs $dir"
done
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
cmds=$finish_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || admincmds="$admincmds
$cmd"
done
IFS="$save_ifs"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
eval cmds=\"$finish_eval\"
$run eval "$cmds" || admincmds="$admincmds
$cmds"
fi
done
fi
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
$echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
done
$echo
$echo "If you ever happen to want to link against installed libraries"
$echo "in a given directory, LIBDIR, you must either use libtool, and"
$echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
$echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
$echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
$echo " during execution"
fi
if test -n "$runpath_var"; then
$echo " - add LIBDIR to the \`$runpath_var' environment variable"
$echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
$echo " - use the \`$flag' linker flag"
fi
if test -n "$admincmds"; then
$echo " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
$echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
$echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
# libtool execute mode
execute)
modename="$modename: execute"
# The first argument is the command name.
cmd="$nonopt"
if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help"
exit $EXIT_FAILURE
fi
# Handle -dlopen flags immediately.
for file in $execute_dlfiles; do
if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
dir=
case $file in
*.la)
# Check to see that this really is a libtool archive.
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
# Read the libtool library.
dlname=
library_names=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Skip this library if it cannot be dlopened.
if test -z "$dlname"; then
# Warn if it was a shared library.
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
continue
fi
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$file" && dir=.
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
if test ! -f "$dir/$dlname"; then
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit $EXIT_FAILURE
fi
fi
;;
*.lo)
# Just add the directory containing the .lo file.
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$file" && dir=.
;;
*)
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
continue
;;
esac
# Get the absolute pathname.
absdir=`cd "$dir" && pwd`
test -n "$absdir" && dir="$absdir"
# Now add the directory to shlibpath_var.
if eval "test -z \"\$$shlibpath_var\""; then
eval "$shlibpath_var=\"\$dir\""
else
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
fi
done
# This variable tells wrapper scripts just to set shlibpath_var
# rather than running their programs.
libtool_execute_magic="$magic"
# Check if any of the arguments is a wrapper script.
args=
for file
do
case $file in
-*) ;;
*)
# Do a test to see if this is really a libtool program.
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Transform arg to wrapped name.
file="$progdir/$program"
fi
;;
esac
# Quote arguments (to preserve shell metacharacters).
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
args="$args \"$file\""
done
if test -z "$run"; then
if test -n "$shlibpath_var"; then
# Export the shlibpath_var.
eval "export $shlibpath_var"
fi
# Restore saved environment variables
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
eval "if test \"\${save_$lt_var+set}\" = set; then
$lt_var=\$save_$lt_var; export $lt_var
fi"
done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
else
# Display what would be done.
if test -n "$shlibpath_var"; then
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
exit $EXIT_SUCCESS
fi
;;
# libtool clean and uninstall mode
clean | uninstall)
modename="$modename: $mode"
rm="$nonopt"
files=
rmforce=
exit_status=0
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
libtool_install_magic="$magic"
for arg
do
case $arg in
-f) rm="$rm $arg"; rmforce=yes ;;
-*) rm="$rm $arg" ;;
*) files="$files $arg" ;;
esac
done
if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
fi
rmdirs=
origobjdir="$objdir"
for file in $files; do
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
if test "X$dir" = "X$file"; then
dir=.
objdir="$origobjdir"
else
objdir="$dir/$origobjdir"
fi
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
test "$mode" = uninstall && objdir="$dir"
# Remember objdir for removal later, being careful to avoid duplicates
if test "$mode" = clean; then
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
esac
fi
# Don't error if the file doesn't exist and rm -f was used.
if (test -L "$file") >/dev/null 2>&1 \
|| (test -h "$file") >/dev/null 2>&1 \
|| test -f "$file"; then
:
elif test -d "$file"; then
exit_status=1
continue
elif test "$rmforce" = yes; then
continue
fi
rmfiles="$file"
case $name in
*.la)
# Possibly a libtool archive, so verify it.
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
. $dir/$name
# Delete the libtool libraries and symlinks.
for n in $library_names; do
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
case "$mode" in
clean)
case " $library_names " in
# " " in the beginning catches empty $dlname
*" $dlname "*) ;;
*) rmfiles="$rmfiles $objdir/$dlname" ;;
esac
test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
;;
uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
IFS="$save_ifs"
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
cmds=$old_postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
;;
esac
fi
;;
*.lo)
# Possibly a libtool object, so verify it.
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# Read the .lo file
. $dir/$name
# Add PIC object to the list of files to remove.
if test -n "$pic_object" \
&& test "$pic_object" != none; then
rmfiles="$rmfiles $dir/$pic_object"
fi
# Add non-PIC object to the list of files to remove.
if test -n "$non_pic_object" \
&& test "$non_pic_object" != none; then
rmfiles="$rmfiles $dir/$non_pic_object"
fi
fi
;;
*)
if test "$mode" = clean ; then
noexename=$name
case $file in
*.exe)
file=`$echo $file|${SED} 's,.exe$,,'`
noexename=`$echo $name|${SED} 's,.exe$,,'`
# $file with .exe has already been added to rmfiles,
# add $file without .exe
rmfiles="$rmfiles $file"
;;
esac
# Do a test to see if this is a libtool program.
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
relink_command=
. $dir/$noexename
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
if test "$fast_install" = yes && test -n "$relink_command"; then
rmfiles="$rmfiles $objdir/lt-$name"
fi
if test "X$noexename" != "X$name" ; then
rmfiles="$rmfiles $objdir/lt-${noexename}.c"
fi
fi
fi
;;
esac
$show "$rm $rmfiles"
$run $rm $rmfiles || exit_status=1
done
objdir="$origobjdir"
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
$show "rmdir $dir"
$run rmdir $dir >/dev/null 2>&1
fi
done
exit $exit_status
;;
"")
$echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2
exit $EXIT_FAILURE
;;
esac
if test -z "$exec_cmd"; then
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2
exit $EXIT_FAILURE
fi
fi # test -z "$show_help"
if test -n "$exec_cmd"; then
eval exec $exec_cmd
exit $EXIT_FAILURE
fi
# We need to display help for each of the modes.
case $mode in
"") $echo \
"Usage: $modename [OPTION]... [MODE-ARG]...
Provide generalized library-building support services.
--config show all configuration variables
--debug enable verbose shell tracing
-n, --dry-run display commands without modifying any files
--features display basic configuration information and exit
--finish same as \`--mode=finish'
--help display this help message and exit
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
--quiet same as \`--silent'
--silent don't print informational messages
--tag=TAG use configuration variables from tag TAG
--version print version information
MODE must be one of the following:
clean remove files from the build directory
compile compile a source file into a libtool object
execute automatically set library path, then run a program
finish complete the installation of libtool libraries
install install libraries or executables
link create a library or an executable
uninstall remove libraries from an installed directory
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
a more detailed description of MODE.
Report bugs to ."
exit $EXIT_SUCCESS
;;
clean)
$echo \
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
Remove files from the build directory.
RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, object or program, all the files associated
with it are deleted. Otherwise, only FILE itself is deleted using RM."
;;
compile)
$echo \
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
Compile a source file into a libtool library object.
This mode accepts the following additional options:
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
-prefer-pic try to building PIC objects only
-prefer-non-pic try to building non-PIC objects only
-static always build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.
The output file name is determined by removing the directory component from
SOURCEFILE, then substituting the C source code suffix \`.c' with the
library object suffix, \`.lo'."
;;
execute)
$echo \
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
Automatically set library path, then run a program.
This mode accepts the following additional options:
-dlopen FILE add the directory containing FILE to the library path
This mode sets the library path environment variable according to \`-dlopen'
flags.
If any of the ARGS are libtool executable wrappers, then they are translated
into their corresponding uninstalled binary, and any of their required library
directories are added to the library path.
Then, COMMAND is executed, with ARGS as arguments."
;;
finish)
$echo \
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
Complete the installation of libtool libraries.
Each LIBDIR is a directory that contains libtool libraries.
The commands that this mode executes may require superuser privileges. Use
the \`--dry-run' option if you just want to see what would be executed."
;;
install)
$echo \
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
Install executables or libraries.
INSTALL-COMMAND is the installation command. The first component should be
either the \`install' or \`cp' program.
The rest of the components are interpreted as arguments to that command (only
BSD-compatible install options are recognized)."
;;
link)
$echo \
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
Link object files or libraries together to form another library, or to
create an executable program.
LINK-COMMAND is a command using the C compiler that you would use to create
a program from several object files.
The following components of LINK-COMMAND are treated specially:
-all-static do not do any dynamic linking at all
-avoid-version do not add a version suffix if possible
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
-no-fast-install disable the fast-install mode
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-objectlist FILE Use a list of object files found in FILE to specify objects
-precious-files-regex REGEX
don't remove output files matching REGEX
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of uninstalled libtool libraries
-static-libtool-libs
do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
Every other argument is treated as a filename. Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
only library objects (\`.lo' files) may be specified, and \`-rpath' is
required, except when creating a convenience library.
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
using \`ar' and \`ranlib', or on Windows using \`lib'.
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."
;;
uninstall)
$echo \
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
Remove libraries from an installation directory.
RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, all the files associated with it are deleted.
Otherwise, only FILE itself is deleted using RM."
;;
*)
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2
exit $EXIT_FAILURE
;;
esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
exit $?
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
# them. This is particularly important on AIX, because we don't
# support having both static and shared libraries enabled at the same
# time on that platform, so we default to a shared-only configuration.
# If a disable-shared tag is given, we'll fallback to a static-only
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
disable_libs=shared
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
netatalk-2.2.2/VERSION0000644000175200017500000000000511703523027011306 000000000000002.2.2netatalk-2.2.2/bin/0000777000175200017500000000000011704770424011105 500000000000000netatalk-2.2.2/bin/Makefile.am0000644000175200017500000000026711655731126013063 00000000000000# Makefile.am for bin/
SUBDIRS = adv1tov2 afppasswd cnid megatron uniconv misc
if USE_APPLETALK
SUBDIRS += aecho getzones nbp pap psorder
endif
if HAVE_ATFUNCS
SUBDIRS += ad
endif
netatalk-2.2.2/bin/pap/0000777000175200017500000000000011704770424011665 500000000000000netatalk-2.2.2/bin/pap/Makefile.am0000644000175200017500000000041711655731126013640 00000000000000# Makefile.am for bin/pap/
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
bin_PROGRAMS = pap papstatus
pap_SOURCES = pap.c
pap_LDADD = $(top_builddir)/libatalk/libatalk.la
papstatus_SOURCES = papstatus.c
papstatus_LDADD = $(top_builddir)/libatalk/libatalk.la
netatalk-2.2.2/bin/pap/Makefile.in0000644000175200017500000004205011703521723013642 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for bin/pap/
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = pap$(EXEEXT) papstatus$(EXEEXT)
subdir = bin/pap
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
$(top_srcdir)/macros/cnid-backend.m4 \
$(top_srcdir)/macros/config-checks.m4 \
$(top_srcdir)/macros/cups.m4 $(top_srcdir)/macros/db3-check.m4 \
$(top_srcdir)/macros/grep-check.m4 \
$(top_srcdir)/macros/gssapi-check.m4 \
$(top_srcdir)/macros/iconv.m4 \
$(top_srcdir)/macros/largefile-check.m4 \
$(top_srcdir)/macros/libgcrypt.m4 \
$(top_srcdir)/macros/pam-check.m4 \
$(top_srcdir)/macros/perl-check.m4 \
$(top_srcdir)/macros/ps-check.m4 \
$(top_srcdir)/macros/quota-check.m4 \
$(top_srcdir)/macros/snprintf-check.m4 \
$(top_srcdir)/macros/srvloc.m4 \
$(top_srcdir)/macros/ssl-check.m4 \
$(top_srcdir)/macros/summary.m4 \
$(top_srcdir)/macros/tcp-wrappers.m4 \
$(top_srcdir)/macros/util.m4 $(top_srcdir)/macros/webmin.m4 \
$(top_srcdir)/macros/zeroconf.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_pap_OBJECTS = pap.$(OBJEXT)
pap_OBJECTS = $(am_pap_OBJECTS)
pap_DEPENDENCIES = $(top_builddir)/libatalk/libatalk.la
am_papstatus_OBJECTS = papstatus.$(OBJEXT)
papstatus_OBJECTS = $(am_papstatus_OBJECTS)
papstatus_DEPENDENCIES = $(top_builddir)/libatalk/libatalk.la
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(pap_SOURCES) $(papstatus_SOURCES)
DIST_SOURCES = $(pap_SOURCES) $(papstatus_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACL_LIBS = @ACL_LIBS@
AFS_CFLAGS = @AFS_CFLAGS@
AFS_LIBS = @AFS_LIBS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AVAHI_TPOLL_CFLAGS = @AVAHI_TPOLL_CFLAGS@
AVAHI_TPOLL_LIBS = @AVAHI_TPOLL_LIBS@
AWK = @AWK@
BDB_BIN = @BDB_BIN@
BDB_CFLAGS = @BDB_CFLAGS@
BDB_LIBS = @BDB_LIBS@
BDB_PATH = @BDB_PATH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILE_64BIT_KMODULE = @COMPILE_64BIT_KMODULE@
COMPILE_KERNEL_GCC = @COMPILE_KERNEL_GCC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LDFLAGS = @CUPS_LDFLAGS@
CUPS_LIBS = @CUPS_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_CNID_SCHEME = @DEFAULT_CNID_SCHEME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GSSAPI_CFLAGS = @GSSAPI_CFLAGS@
GSSAPI_LIBS = @GSSAPI_LIBS@
ICONV_CFLAGS = @ICONV_CFLAGS@
ICONV_LIBS = @ICONV_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFLAGS = @KCFLAGS@
KLDFLAGS = @KLDFLAGS@
KRB5_CONFIG = @KRB5_CONFIG@
LDFLAGS = @LDFLAGS@
LIBADD_DL = @LIBADD_DL@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETATALK_VERSION = @NETATALK_VERSION@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PAMDIR = @PAMDIR@
PAM_ACCOUNT = @PAM_ACCOUNT@
PAM_AUTH = @PAM_AUTH@
PAM_CFLAGS = @PAM_CFLAGS@
PAM_DIRECTIVE = @PAM_DIRECTIVE@
PAM_LIBS = @PAM_LIBS@
PAM_PASSWORD = @PAM_PASSWORD@
PAM_SESSION = @PAM_SESSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFDIR = @PKGCONFDIR@
PKG_CONFIG = @PKG_CONFIG@
PS = @PS@
PTHREAD_LIBS = @PTHREAD_LIBS@
QUOTA_LIBS = @QUOTA_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SERVERTEXT = @SERVERTEXT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SLP_CFLAGS = @SLP_CFLAGS@
SLP_LIBS = @SLP_LIBS@
SPOOLDIR = @SPOOLDIR@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
UAMS_PATH = @UAMS_PATH@
VERSION = @VERSION@
WEBMIN_PASS = @WEBMIN_PASS@
WEBMIN_PATH = @WEBMIN_PATH@
WEBMIN_PORT = @WEBMIN_PORT@
WEBMIN_USER = @WEBMIN_USER@
WEBMIN_VERSION = @WEBMIN_VERSION@
WRAP_LIBS = @WRAP_LIBS@
ZEROCONF_CFLAGS = @ZEROCONF_CFLAGS@
ZEROCONF_LIBS = @ZEROCONF_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
compiled_backends = @compiled_backends@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
pap_SOURCES = pap.c
pap_LDADD = $(top_builddir)/libatalk/libatalk.la
papstatus_SOURCES = papstatus.c
papstatus_LDADD = $(top_builddir)/libatalk/libatalk.la
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/pap/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign bin/pap/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
pap$(EXEEXT): $(pap_OBJECTS) $(pap_DEPENDENCIES)
@rm -f pap$(EXEEXT)
$(LINK) $(pap_OBJECTS) $(pap_LDADD) $(LIBS)
papstatus$(EXEEXT): $(papstatus_OBJECTS) $(papstatus_DEPENDENCIES)
@rm -f papstatus$(EXEEXT)
$(LINK) $(papstatus_OBJECTS) $(papstatus_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/papstatus.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
netatalk-2.2.2/bin/pap/pap.c0000644000175200017500000005024411655731126012533 00000000000000/*
* $Id: pap.c,v 1.14 2009-10-16 01:10:59 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef HAVE_FCNTL_H
#include
#endif /* HAVE_FCNTL_H */
#include
#include
#include
#include
#define FUCKED
#define _PATH_PAPRC ".paprc"
/* Forward Declarations */
static void updatestatus(char *s, int len);
static int send_file(int fd, ATP atp, int lastfile);
static void usage(char *path)
{
char *p;
if (( p = strrchr( path, '/' )) == NULL ) {
p = path;
} else {
p++;
}
fprintf( stderr,
"Usage:\t%s [ -A address ] [ -c ] [ -d ] [ -e ] [ -E ] [ -p printer ]\n"
" [ -s statusfile ] [ -w ] [ -W ] [ FILES ]\n"
" -A address - printer Appletalk address\n"
" -c - take cuts (lie about wait time)\n"
" -d - enable debug\n"
" -e - send stdout to stderr\n"
" -E - don't wait for EOF from printer\n"
" -p printer - printer name\n"
" -s statusfile - put current printer status in statusfile\n"
" -w - wait for printer status = 'waiting'\n"
" -W - wait for printer status = 'idle'\n"
" FILES - send FILES to printer\n"
, p );
exit( 2 );
}
static char *
paprc(void)
{
static char s[ 32 + 1 + 32 + 1 + 32 ];
char *name = NULL;
FILE *f;
if (( f = fopen( _PATH_PAPRC, "r" )) == NULL ) {
if ( errno == ENOENT ) {
return( NULL );
} else {
perror( _PATH_PAPRC );
exit( 2 );
}
}
while ( fgets( s, sizeof( s ), f ) != NULL ) {
s[ strlen( s ) - 1 ] = '\0'; /* remove trailing newline */
if ( *s == '#' ) {
continue;
}
name = s;
break;
}
fclose( f );
return( name );
}
static char *printer = NULL;
static char *status = NULL;
static int noeof = 0;
static int waitforprinter = 0;
static unsigned char connid, quantum, oquantum = PAP_MAXQUANTUM;
static struct sockaddr_at sat;
static char cbuf[ 8 ];
static struct nbpnve nn;
static ATP satp;
static char fbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
static struct iovec rfiov[ PAP_MAXQUANTUM ] = {
{ fbuf[ 0 ] + 4, 0 },
{ fbuf[ 1 ] + 4, 0 },
{ fbuf[ 2 ] + 4, 0 },
{ fbuf[ 3 ] + 4, 0 },
{ fbuf[ 4 ] + 4, 0 },
{ fbuf[ 5 ] + 4, 0 },
{ fbuf[ 6 ] + 4, 0 },
{ fbuf[ 7 ] + 4, 0 },
};
static struct iovec sniov[ PAP_MAXQUANTUM ] = {
{ fbuf[ 0 ], 0 },
{ fbuf[ 1 ], 0 },
{ fbuf[ 2 ], 0 },
{ fbuf[ 3 ], 0 },
{ fbuf[ 4 ], 0 },
{ fbuf[ 5 ], 0 },
{ fbuf[ 6 ], 0 },
{ fbuf[ 7 ], 0 },
};
static char nbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
static struct iovec rniov[ PAP_MAXQUANTUM ] = {
{ nbuf[ 0 ], 0 },
{ nbuf[ 1 ], 0 },
{ nbuf[ 2 ], 0 },
{ nbuf[ 3 ], 0 },
{ nbuf[ 4 ], 0 },
{ nbuf[ 5 ], 0 },
{ nbuf[ 6 ], 0 },
{ nbuf[ 7 ], 0 },
};
static struct iovec sfiov[ PAP_MAXQUANTUM ] = {
{ nbuf[ 0 ] + 4, 0 },
{ nbuf[ 1 ] + 4, 0 },
{ nbuf[ 2 ] + 4, 0 },
{ nbuf[ 3 ] + 4, 0 },
{ nbuf[ 4 ] + 4, 0 },
{ nbuf[ 5 ] + 4, 0 },
{ nbuf[ 6 ] + 4, 0 },
{ nbuf[ 7 ] + 4, 0 },
};
static int debug;
int main( int ac, char **av)
{
ATP atp;
struct atp_block atpb;
int c, err = 0, fd, cuts = 0;
char *obj = NULL, *type = "LaserWriter", *zone = "*";
struct timeval stv, tv;
char rbuf[ ATP_MAXDATA ];
struct iovec iov;
unsigned short waiting, result;
int connattempts = 10;
int waitforidle = 0;
struct at_addr addr;
extern char *optarg;
extern int optind;
memset(&addr, 0, sizeof(addr));
while (( c = getopt( ac, av, "dWwcep:s:EA:" )) != EOF ) {
switch ( c ) {
#ifdef FUCKED
case 'w' :
waitforprinter = 1;
break;
case 'W' :
waitforidle = 1;
break;
#endif /* FUCKED */
/* enable debugging */
case 'd' :
debug++;
break;
case 'c' :
cuts++;
break;
case 'e' : /* send stdout to stderr */
dup2( 2, 1 );
break;
case 'p' :
printer = optarg;
break;
case 's' :
status = optarg;
break;
case 'E' :
noeof = 1;
break;
case 'A':
if (!atalk_aton(optarg, &addr)) {
fprintf(stderr, "Bad address.\n");
exit(1);
}
break;
default :
err++;
}
}
if ( err ) {
usage( *av );
}
if ( printer == NULL && (( printer = paprc()) == NULL )) {
fprintf( stderr, "No printer specified and ./.paprc not found.\n" );
exit( 2 );
}
/*
* Open connection.
*/
if ( nbp_name( printer, &obj, &type, &zone ) < 0 ) {
fprintf( stderr, "%s: Bad name\n", printer );
exit( 2 );
}
if ( obj == NULL ) {
fprintf( stderr, "%s: Bad name\n", printer );
exit( 2 );
}
if ( nbp_lookup( obj, type, zone, &nn, 1, &addr ) <= 0 ) {
if ( errno != 0 ) {
perror( "nbp_lookup" );
exit( 2 );
}
fprintf( stderr, "%s:%s@%s: NBP Lookup failed\n", obj, type, zone );
exit( 1 );
}
if ( isatty( 1 )) {
printf( "Trying %u.%d:%d ...\n", ntohs( nn.nn_sat.sat_addr.s_net ),
nn.nn_sat.sat_addr.s_node, nn.nn_sat.sat_port );
}
if (( atp = atp_open( ATADDR_ANYPORT, &addr )) == NULL ) {
perror( "atp_open" );
exit( 2 );
}
if (( satp = atp_open( ATADDR_ANYPORT, &addr )) == NULL ) {
perror( "atp_open" );
exit( 2 );
}
while ( waitforidle ) {
char st_buf[ 1024 ]; /* XXX too big */
cbuf[ 0 ] = 0;
cbuf[ 1 ] = PAP_SENDSTATUS;
cbuf[ 2 ] = cbuf[ 3 ] = 0;
atpb.atp_saddr = &nn.nn_sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in SendStatus request */
atpb.atp_sreqto = 2; /* retry timer */
atpb.atp_sreqtries = 5; /* retry count */
if ( atp_sreq( satp, &atpb, 1, 0 ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "SENDSTATUS >\n" ), fflush( stdout );}
atpb.atp_saddr = &nn.nn_sat;
rniov[ 0 ].iov_len = PAP_MAXDATA + 4;
atpb.atp_rresiov = rniov;
atpb.atp_rresiovcnt = 1;
if ( atp_rresp( satp, &atpb ) < 0 ) {
perror( "atp_rresp" );
continue;
}
#ifndef NONZEROSTATUS
/*
* The stinking LaserWriter IINTX puts crap in this
* field.
*/
if ( ((char *)rniov[ 0 ].iov_base)[ 0 ] != 0 ) {
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
#endif /* NONZEROSTATUS */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
atpb.atp_rresiovcnt != 1 ) {
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
if(debug){ printf( "< STATUS\n" ), fflush( stdout );}
memcpy( st_buf, (char *) rniov[ 0 ].iov_base + 9,
((char *)rniov[ 0 ].iov_base)[ 8 ] );
st_buf[ (int) ((char *)rniov[ 0 ].iov_base)[ 8 ]] = '\0';
if ( strstr( st_buf, "idle" ) != NULL ) {
waitforidle = 0;
} else {
updatestatus( (char *) rniov[ 0 ].iov_base + 9,
((char *)rniov[ 0 ].iov_base)[ 8 ] );
sleep( 5 );
}
}
cbuf[ 0 ] = connid = getpid() & 0xff;
cbuf[ 1 ] = PAP_OPEN;
cbuf[ 2 ] = cbuf[ 3 ] = 0;
cbuf[ 4 ] = atp_sockaddr( atp )->sat_port;
cbuf[ 5 ] = oquantum; /* flow quantum */
if ( gettimeofday( &stv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
for (;;) {
if ( cuts ) {
waiting = 0xffff;
} else {
if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
waiting = htons( tv.tv_sec - stv.tv_sec );
}
memcpy(cbuf + 6, &waiting, sizeof( waiting ));
atpb.atp_saddr = &nn.nn_sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 8; /* bytes in OpenConn request */
atpb.atp_sreqto = 2; /* retry timer */
atpb.atp_sreqtries = 5; /* retry count */
if ( atp_sreq( atp, &atpb, 1, ATP_XO ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "OPEN >\n" ), fflush( stdout );}
iov.iov_base = rbuf;
iov.iov_len = sizeof( rbuf );
atpb.atp_rresiov = &iov;
atpb.atp_rresiovcnt = 1;
if ( atp_rresp( atp, &atpb ) < 0 ) {
perror( "atp_rresp" );
if ( connattempts-- <= 0 ) {
fprintf( stderr, "Can't connect!\n" );
exit( 1 );
}
continue;
}
/* sanity */
if ( iov.iov_len < 8 || (unsigned char)rbuf[ 0 ] != connid ||
rbuf[ 1 ] != PAP_OPENREPLY ) {
fprintf( stderr, "Bad response!\n" );
continue; /* This is weird, since TIDs must match... */
}
if(debug){ printf( "< OPENREPLY\n" ), fflush( stdout );}
if ( isatty( 1 )) {
printf( "%.*s\n", (int)iov.iov_len - 9, (char *) iov.iov_base + 9 );
}
updatestatus( (char *) iov.iov_base + 9, iov.iov_len - 9 );
memcpy( &result, rbuf + 6, sizeof( result ));
if ( result != 0 ) {
sleep( 2 );
} else {
memcpy( &sat, &nn.nn_sat, sizeof( struct sockaddr_at ));
sat.sat_port = rbuf[ 4 ];
quantum = rbuf[ 5 ];
break;
}
}
if ( isatty( 1 )) {
printf( "Connected to %.*s:%.*s@%.*s.\n",
nn.nn_objlen, nn.nn_obj,
nn.nn_typelen, nn.nn_type,
nn.nn_zonelen, nn.nn_zone );
}
if ( optind == ac ) {
send_file( 0, atp, 1 );
} else {
for (; optind < ac; optind++ ) {
if ( strcmp( av[ optind ], "-" ) == 0 ) {
fd = 0;
} else if (( fd = open( av[ optind ], O_RDONLY )) < 0 ) {
perror( av[ optind ] );
continue;
}
send_file( fd, atp, ( optind == ac - 1 ) ? 1 : 0 );
if ( fd != 0 ) {
close( fd );
}
}
}
/*
* Close connection.
*/
cbuf[ 0 ] = connid;
cbuf[ 1 ] = PAP_CLOSE;
cbuf[ 2 ] = cbuf[ 3 ] = 0;
atpb.atp_saddr = &sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in CloseConn request */
atpb.atp_sreqto = 2; /* retry timer */
atpb.atp_sreqtries = 5; /* retry count */
if ( atp_sreq( atp, &atpb, 1, ATP_XO ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "CLOSE >\n" ), fflush( stdout );}
iov.iov_base = rbuf;
iov.iov_len = sizeof( rbuf );
atpb.atp_rresiov = &iov;
atpb.atp_rresiovcnt = 1;
if ( atp_rresp( atp, &atpb ) < 0 ) {
perror( "atp_rresp" );
exit( 1 );
}
/* sanity */
if ( iov.iov_len != 4 || rbuf[ 1 ] != PAP_CLOSEREPLY ) {
fprintf( stderr, "Bad response!\n" );
exit( 1 );
}
#ifndef ZEROCONNID
/*
* The AGFA Viper Rip doesn't have the connection id in the close request.
*/
if ((unsigned char)rbuf[ 0 ] != connid ) {
fprintf( stderr, "Bad connid in close!\n" );
exit( 1 );
}
#endif /* ZEROCONNID */
if(debug){ printf( "< CLOSEREPLY\n" ), fflush( stdout );}
if ( isatty( 1 )) {
printf( "Connection closed.\n" );
}
exit( 0 );
}
static int data = 0;
static unsigned char port;
static u_int16_t seq = 0;
static int send_file( int fd, ATP atp, int lastfile)
{
struct timeval stv, tv;
struct sockaddr_at ssat;
struct atp_block atpb;
fd_set fds;
int fiovcnt = 0, eof = 0, senteof = 0, to = 0;
int cc, i;
unsigned short netseq;
if ( gettimeofday( &stv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
/*
* Ask for more data.
*/
cbuf[ 0 ] = connid;
cbuf[ 1 ] = PAP_READ;
if ( ++seq == 0 ) seq = 1;
netseq = htons( seq );
memcpy( cbuf + 2, &netseq, sizeof( netseq ));
atpb.atp_saddr = &sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in SendData request */
atpb.atp_sreqto = 15; /* retry timer */
atpb.atp_sreqtries = -1; /* retry count */
if ( atp_sreq( atp, &atpb, oquantum, ATP_XO ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "READ %d >\n", seq ), fflush( stdout );}
for (;;) {
if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
if (( tv.tv_sec - stv.tv_sec ) >= 60 ) {
stv = tv;
/*
* Send a tickle.
*/
cbuf[ 0 ] = connid;
cbuf[ 1 ] = PAP_TICKLE;
cbuf[ 2 ] = cbuf[ 3 ] = 0;
atpb.atp_saddr = &sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in Tickle request */
atpb.atp_sreqto = 0; /* retry timer */
atpb.atp_sreqtries = 1; /* retry count */
if ( atp_sreq( satp, &atpb, 0, 0 ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "TICKLE >\n" ), fflush( stdout );}
}
tv.tv_sec = stv.tv_sec + 60 - tv.tv_sec;
tv.tv_usec = 0;
FD_ZERO( &fds );
if ( !waitforprinter && !eof && fiovcnt == 0 ) {
FD_SET( fd, &fds );
}
FD_SET( atp_fileno( atp ), &fds );
if (( cc = select( FD_SETSIZE, &fds, NULL, NULL, &tv )) < 0 ) {
perror( "select" );
exit( 2 );
}
/*
* A timeout has occured. Keep track of it.
*/
if ( cc == 0 ) {
if ( to++ > 2 ) {
fprintf( stderr, "Connection timed out.\n" );
exit( 1 );
}
continue;
}
/*
* Read data.
*/
if ( !fiovcnt && FD_ISSET( fd, &fds )) {
for ( i = 0; i < quantum; i++ ) {
rfiov[ i ].iov_len = PAP_MAXDATA;
}
if (( cc = readv( fd, rfiov, quantum )) < 0 ) {
perror( "readv" );
exit( 2 );
}
if ( cc == 0 ) {
eof = 1;
}
fiovcnt = cc / PAP_MAXDATA + ( cc % PAP_MAXDATA > 0 );
for ( i = 0; cc > 0; i++ ) {
rfiov[ i ].iov_len = ( cc > PAP_MAXDATA ) ? PAP_MAXDATA : cc;
cc -= ( cc > PAP_MAXDATA ) ? PAP_MAXDATA : cc;
}
}
if ( FD_ISSET( atp_fileno( atp ), &fds )) {
ssat = sat;
ssat.sat_port = ATADDR_ANYPORT;
switch( atp_rsel( atp, &ssat, ATP_TRESP | ATP_TREQ )) {
case ATP_TREQ :
atpb.atp_saddr = &ssat;
atpb.atp_rreqdata = cbuf;
atpb.atp_rreqdlen = sizeof( cbuf );
if ( atp_rreq( atp, &atpb ) < 0 ) {
perror( "atp_rreq" );
exit( 1 );
}
if ( (unsigned char)cbuf[ 0 ] != connid ) {
break;
}
/* reset timeout counter for all valid requests */
to = 0;
switch ( cbuf[ 1 ] ) {
case PAP_READ :
memcpy( cbuf + 2, &netseq, sizeof( netseq ));
if(debug){ printf( "< READ %d\n", ntohs( netseq )), fflush( stdout );}
#ifdef notdef
if ( netseq != 0 ) {
if ( rseq != ntohs( netseq )) {
if(debug){ printf( "| DUP %d\n", rseq ), fflush( stdout );}
break;
}
if ( rseq++ == 0xffff ) rseq = 1;
}
#endif /* notdef */
data = 1;
port = ssat.sat_port;
break;
case PAP_CLOSE :
if(debug){ printf( "< CLOSE\n" ), fflush( stdout );}
/*
* Respond to the close request, and fail.
*/
sniov[ 0 ].iov_len = 4;
((char *)sniov[ 0 ].iov_base)[ 0 ] = connid;
((char *)sniov[ 0 ].iov_base)[ 1 ] = PAP_CLOSEREPLY;
((char *)sniov[ 0 ].iov_base)[ 2 ] =
((char *)sniov[ 0 ].iov_base)[ 3 ] = 0;
atpb.atp_sresiov = sniov;
atpb.atp_sresiovcnt = 1;
if ( atp_sresp( atp, &atpb ) < 0 ) {
perror( "atp_sresp" );
exit( 1 );
}
if(debug){ printf( "CLOSEREPLY >\n" ), fflush( stdout );}
fprintf( stderr, "Connection closed by foreign host.\n" );
exit( 1 );
case PAP_TICKLE :
if(debug){ printf( "< TICKLE\n" ), fflush( stdout );}
break;
default :
fprintf( stderr, "Bad PAP request!\n" );
exit( 1 );
}
break;
case ATP_TRESP :
/* reset timeout counter for all valid requests */
to = 0;
atpb.atp_saddr = &ssat;
for ( i = 0; i < oquantum; i++ ) {
rniov[ i ].iov_len = PAP_MAXDATA + 4;
}
atpb.atp_rresiov = rniov;
atpb.atp_rresiovcnt = oquantum;
if ( atp_rresp( atp, &atpb ) < 0 ) {
perror( "atp_rresp" );
exit( 1 );
}
#ifndef ZEROCONNID
/*
* The HP LJIIISI w/ BridgePort LocalTalk card sends
* zero instead of the connid.
*/
if ( ((unsigned char *)rniov[ 0 ].iov_base)[ 0 ] != connid ) {
fprintf( stderr, "Bad data response!\n" );
exit( 1 );
}
#endif /* ZEROCONNID */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_DATA ) {
fprintf( stderr, "Bad data response!\n" );
exit( 1 );
}
for ( cc = 0, i = 0; i < atpb.atp_rresiovcnt; i++ ) {
sfiov[ i ].iov_len = rniov[ i ].iov_len - 4;
cc += sfiov[ i ].iov_len;
}
if ( cc && writev( 1, sfiov, atpb.atp_rresiovcnt ) < cc ) {
perror( "writev" );
exit( 2 );
}
/* eof */
if ( ((char *)rniov[ 0 ].iov_base)[ 2 ] ) {
if(debug){ printf( "< DATA (eof)\n" ), fflush( stdout );}
return( 0 );
}
if(debug){ printf( "< DATA\n" ), fflush( stdout );}
/*
* Ask for more data.
*/
cbuf[ 0 ] = connid;
cbuf[ 1 ] = PAP_READ;
if ( ++seq == 0 ) seq = 1;
netseq = htons( seq );
memcpy( cbuf + 2, &netseq, sizeof( netseq ));
atpb.atp_saddr = &sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in SendData request */
atpb.atp_sreqto = 15; /* retry timer */
atpb.atp_sreqtries = -1; /* retry count */
if ( atp_sreq( atp, &atpb, oquantum, ATP_XO ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "READ %d >\n", seq ), fflush( stdout );}
break;
case 0:
if(debug){ printf( "| RETRANS\n" ), fflush( stdout );}
break;
default:
perror( "atp_rsel" );
exit( 1 );
}
}
/*
* Send whatever is pending.
*/
if ( !waitforprinter && !senteof && data && ( fiovcnt || eof )) {
ssat.sat_port = port;
atpb.atp_saddr = &ssat;
if ( fiovcnt ) {
for ( i = 0; i < fiovcnt; i++ ) {
sniov[ i ].iov_len = rfiov[ i ].iov_len + 4;
((char *)sniov[ i ].iov_base)[ 0 ] = connid;
((char *)sniov[ i ].iov_base)[ 1 ] = PAP_DATA;
senteof = ((char *)sniov[ i ].iov_base)[ 2 ] = eof;
((char *)sniov[ i ].iov_base)[ 3 ] = 0;
}
} else {
sniov[ 0 ].iov_len = 4;
((char *)sniov[ 0 ].iov_base)[ 0 ] = connid;
((char *)sniov[ 0 ].iov_base)[ 1 ] = PAP_DATA;
senteof = ((char *)sniov[ 0 ].iov_base)[ 2 ] = eof;
((char *)sniov[ 0 ].iov_base)[ 3 ] = 0;
}
atpb.atp_sresiov = sniov;
atpb.atp_sresiovcnt = fiovcnt ? fiovcnt : 1;
if ( atp_sresp( atp, &atpb ) < 0 ) {
perror( "atp_sresp" );
exit( 1 );
}
data = fiovcnt = 0;
if(debug){ printf( "DATA %s\n", eof ? "(eof) >" : ">" ), fflush( stdout );}
/*
* The Apple LaserWriter IIf, the HP LWIIISi, and IV, don't
* seem to send us an EOF on large jobs. To work around
* this heinous protocol violation, we won't wait for their
* EOF before closing.
*/
if ( eof && noeof && lastfile ) {
return( 0 );
}
} else {
/*
* If we can't send data right now, go ahead and get the
* status. This is cool, because we get here reliably
* if there is a problem.
*/
cbuf[ 0 ] = 0;
cbuf[ 1 ] = PAP_SENDSTATUS;
cbuf[ 2 ] = cbuf[ 3 ] = 0;
atpb.atp_saddr = &nn.nn_sat;
atpb.atp_sreqdata = cbuf;
atpb.atp_sreqdlen = 4; /* bytes in SendStatus request */
atpb.atp_sreqto = 2; /* retry timer */
atpb.atp_sreqtries = 5; /* retry count */
if ( atp_sreq( satp, &atpb, 1, 0 ) < 0 ) {
perror( "atp_sreq" );
exit( 1 );
}
if(debug){ printf( "SENDSTATUS >\n" ), fflush( stdout );}
atpb.atp_saddr = &nn.nn_sat;
rniov[ 0 ].iov_len = PAP_MAXDATA + 4;
atpb.atp_rresiov = rniov;
atpb.atp_rresiovcnt = 1;
if ( atp_rresp( satp, &atpb ) < 0 ) {
perror( "atp_rresp" );
continue;
}
#ifndef NONZEROSTATUS
/*
* The stinking LaserWriter IINTX puts crap in this
* field.
*/
if ( ((char *)rniov[ 0 ].iov_base)[ 0 ] != 0 ) {
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
#endif /* NONZEROSTATUS */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
atpb.atp_rresiovcnt != 1 ) {
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
if(debug){ printf( "< STATUS\n" ), fflush( stdout );}
#ifdef FUCKED
if ( waitforprinter ) {
char st_buf[ 1024 ]; /* XXX too big */
memcpy( st_buf, (char *) rniov[ 0 ].iov_base + 9,
((char *)rniov[ 0 ].iov_base)[ 8 ] );
st_buf[ (int) ((char *)rniov[ 0 ].iov_base)[ 8 ]] = '\0';
if ( strstr( st_buf, "waiting" ) != NULL ) {
waitforprinter = 0;
}
}
#endif /* FUCKED */
updatestatus( (char *) rniov[ 0 ].iov_base + 9,
((char *)rniov[ 0 ].iov_base)[ 8 ] );
}
}
}
static void updatestatus(char *s, int len)
{
int fd = -1;
struct iovec iov[ 3 ];
if ( status ) {
if (( fd = open( status, O_WRONLY|O_TRUNC )) < 0 ) {
perror( status );
status = NULL;
}
}
if ( fd < 0 ) {
fd = 2;
}
iov[ 0 ].iov_base = "%%[ ";
iov[ 0 ].iov_len = 4;
iov[ 1 ].iov_base = s;
iov[ 1 ].iov_len = len;
iov[ 2 ].iov_base = " ]%%\n";
iov[ 2 ].iov_len = 5;
writev( fd, iov, 3 );
if ( status ) {
close( fd );
}
}
netatalk-2.2.2/bin/pap/papstatus.c0000644000175200017500000001102611655731126013772 00000000000000/*
* $Id: papstatus.c,v 1.7 2009-10-14 01:38:28 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of The University
* of Michigan not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. This software is supplied as is without expressed or
* implied warranties of any kind.
*
* Research Systems Unix Group
* The University of Michigan
* c/o Mike Clark
* 535 W. William Street
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include
#include
#include
#include
#include
#include